Hi, I would like to create a burndown chart and I've read the documentation about Creating line and area chart. From my reading I've understood that the data points cannot be a series of values coming from a table list from a preparation as I see that only 1 value is extracted from them... Is there anyone who already struggling with this kind of topic? thanks

Hi Lorenzo,

If you are using the high charts from platform to create a line chart, you can format your table values in datapoint needed for the charts, and this way you can achieve what you are trying.

Leandro Correa wrote:

Hi Lorenzo,

Take a look at this example:

https://success.outsystems.com/Documentation/11/Reference/OutSystems_APIs/Charts_API/Create_Line_and_Area_Charts


Best regards,

Leandro.

 

 Hi, thanks but this is not exactly what I want. Let me better explain: I need to plot 2 different lines coming from the values of 2 different aggregates (1 for baseline and 1 for actual values). In the example in the documentation, the list of values that you can plot in the chart are fixed or comes from only 1 single list ("GetProduct.List"). Instead I need to put 2 different source data point lists.

Hope the attached image better clarifies my problem.

Lorenzo,

In the link that Leandro sent, has an example of variable number of points too.
A little bit bellow the fixed one:



See here.


To use more than one aggregate, you can create a DataPoint List, and format it with two series, one for each aggregate, and pass this list as the source DataPoint List of the chart.


In the link it also has an example on how to create multiple series:


Hi,

You can create yours DataPoint dinamically too using the Clients or Server Actions from Charts and OutSystemsCharts module:



Leandro Correa wrote:

Hi,

You can create yours DataPoint dinamically too using the Clients or Server Actions from Charts and OutSystemsCharts module:



 

 Hi, I've put 2 data sources with the lists coming from the aggregate but I've seen that only the 1st record is plotted in the chart, not the entire series of value of the lists.

As you can see in the picture below, I've included a new data sources [0] and [1] and for each one I assigned the label and value with the values coming from the aggregate. I've understood that in this way only 1 record is plotted. Also, I've tried to create a data point list through a For Each cycle after the aggregate and the server action DataPoint_Init, but this does not produce my expected results. 

Moreover, I've used ListAppend with a For Each cycle in order to append each record of the aggregate in a list, but the result is the same.



Hi,

Can you share your .oml or screenshots of your logic?


Regards,

Leandro.

Lorenzo,

Also take a look at this sample in forge.

See if it helps.

Leandro Correa wrote:

Hi,

Can you share your .oml or screenshots of your logic?


Regards,

Leandro.

Hi Leandro, here the 2 lists - local variables of DataPoint list data type. As you can see I've put them as source data point lists in the line chart.

 

In the preparation, for each record of the aggregate I initialize one data point and then it will be appended in the List1. And this is also repeated for the 2nd aggregate ("GetBaselines") that feeds the List2. 



The result is the plot of only 2 points, 1 from the 1st aggregate and 1 from the 2nd one. So, not what I'm expecting.




thank you for your support.

 

 

Lorenzo,

When you are adding List1.Current and List2.Current in position [0] and [1] in the line chart source data list, you are "appending" just the first element from both lists.

Try to first use just one list receiving the data from both aggregates.

And then pass this list to source list of  your line chart:


You will define different lines (Series) in the attribute from the data point element:



Solution

Lorenzo.

Did a sample for you... take a look, oml attached:




What you have to look is how to build data point list:



Cheers,


RR

Solution

Hi Lorenzo,

I think Raphael solved it for you.

I was creating a sample but I couldn't finish him at time.

As Raphael said differents series names will create differents lines in the plot.

You define the serie name in the 3rd parameter on the DataPoint_Init function.


Best Regards,

Leandro.

Follow another sample... 

Thank you very much Raphael and Leandro for your support! I've fixed my problem following your example Rapahel. Regards

Very Nice Lorenzo! 

You are very welcome!


Best regards,

Leandro.

:) Happy to help


Cheers