Hi All
Here we can see in Centre 1 we are projecting two bars. I want to know how to project two bars by using Dynamic(Database Values). For example : In Centre 1 as per the data they are projecting Bars in a Static way. As shown in the above Diagram. In the same way i want to know how to project the bars in Dynamic Data.
Hello soumya,
First thing I want to clear for you that image you paste is column graph not a bar graph.
I have create one sample OML for you I have attached for your reference.
Create one local variable with datapoint list data type
create on after fetch action on the aggregate and create the logic what ever I used on above first imageI am center "two series"(A and B) if you want you will add more series in that for each loop
assign the data point list in source data point list you will get the record in screen dynamically to see that same: https://akshayproject.outsystemscloud.com/Chart/
you can also add the center there also details screen present and list as well
Hope this will helps you,
Thanks and Regards,
Akshay Deshpande
Hi Soumya,
What do you mean exactly with dynamic? Do you want to change the bars based on user input? How are you currently making the bar chart? Are you using OS highcharts API?
Gr
Hi Jochem
Thanks for your response. No the data will not come from the user input. It will come from Database. I want to compare two Data(Initial vs Targeted) one which is coming under one label and the data will come from the database itself.
You just need to map the input of the chart to an aggregate / SQL query to have it populated with data from the database:
You can follow the OutSystems documentation on how to do it, step-by-step with screenshots.
Kind Regards,João
Hi João
Thank for your response. Here i want to project two bars containing the data from the database. Two bars should take the data from the database. Here its like Intial vs Targeted one and both the data will be compared inside one label. Here in your diagram you are projecting one bar which is taking the Data from database like but i want to compare two amount for the same month and project that amount in the graph. As shown in the above Screenshot. Both the Data will come from Database.
To make this happen, you can use DataSeries. In short, you can cast your aggregates to a series of data points in which you specify which column it displays. The documentation mentioned by @João Marques should cover all the information you need to make this work.
Please let us know if you have further questions.
I dont want static entities. I want the data as Dynamic. The data will regulate according to the datas in the database. Two bars that are projected the requirement is that i want that Data directly in the form of aggregates and i want to display and compare the two data for a particular label. I dont want the data as Static.
In the documentation I shared, you can check the last section Create a Column or Bar Chart with multiple series, where it shows you how to achieve what you want.
To use data coming from the database do an aggregate or an advanced SQL, and map its output to the output of the chart, just like it is shown on the documentation, on the second screenshot (the first one shows a hardcoded mapping):
The proposed approach does not use static entities, so I am still confused by your definition of static data. Maybe you can share the OML file of the project, so I can show you how to apply DataSeries.