I have an entity called Order Which look like this. I want to make a line graph as shown below. I am unable to add 2 types of data point while configuring the line graph.
If such graph is not possible please recommend any other type of graph.
(Note: I want to compare the amount and the number of orders with respect to date.)
You can also check OutSystems documentation on how to create line charts.
Create Line and Area Charts - OutSystems 11 Documentation
Hello @Shlok Agrawal!
Assuming you are using OutSystems charts, to have multiple lines(or slices of pie, or any other division of data on a chart) you need to specify different data series when providing the source data to the chart.
Example:
For the chart you have shown in your picture, you would have to build a list each datapoint, using the Date in the Label attribute of the list structure, the numbers as the Value attribute and either "Total Number of orders" or "Total Amount" as the value in the DataSeriesName attribute.
The chart component will then group datapoints with the same DataSeriesName in same line.
I am not able to add multiple data series, could you help me please.
Here is one way you can do it
1. Fetch data to your screen and set the output variable's datatype to DataPoint List. This structure is from the Outsystems chart module.
2. Then use the ListAppendAll server action from the System module to add your data to the Outout variable. As the data type of the output var is not the same as the datatype of the agreggate, you will be forced to do the mapping of the attributes to the structure. In this mapping is where you will specify the DataSeriesName. I Used Brand 1 and Brand 2.
3. Then you can use the GetDatapoints.Datapoints variable as the source list of your chart!
Hope this helps to answer your question :)