Hi guys, I want to create a Cumulative Line Chart that will add a value to the next value. For example, the data are:January - 3
February - 2
The graph will show January - 3 and February - 5. Is it possible to be done? If so, please help with my problem. Thank you!
Hi Afiq,
A chart shows whatever value you have in the data points. So if the database returns "January - 3; February - 2", you need to create a DataPoint List that has "January - 3; February - 5". That probably means looping over a list and adding the value of the previous item to the current.
as Kilian suggested, I have made a looping for the data
Have 2 Local Variable for a temp store data ( one has type Long Intenger and other one is Datapoint) and assign them
Then Append the list from the Local Variable to the Variable that you will use for the graph
Hope others will find this useful
Hey Afiq!
To create a chart you will need a list of DataPoints right? Each record of the DataPoints List will have (at least) the Label, that will refer to your months, and the Value that will be filled in with the value that you want to show. With that said, you just need to grant that on the Value you will have the data that you need. If you are doing your DataPoints List with a query you need to grant that it is cumulative. If you are doing it with a cycle you need to keep the previous value and add the new value to it. It is quite easy to do! Hope that it is more clear to you now.