Unable to create multi line chart in OutSystems Reactive website Chart Control

I have below dataset, which has been created using SQL Query. I want all red dots should be connected using one line and all blue dots should be connected using other line 


The output I am as below. Additionally the chart is not showing all data points. 


Dear Avijit,

Please refer the attached OML, I just made in the way to fetch from data action. I don't know what query you are executing, but you can follow the similar method.

Thank you.

Charts1.oml

Thanks, Your solution works well. 

Hi AVIJIT,

Please find the attached OML, that might help you. And I haven't fetched from SQL, you can change that.

Charts.oml

Hi Porselvan,


Thanks for your code. But in my scenario I am using custom query, using Data Action, to get the data and then populates that data into datapoint list, which is dynamic.  

In your example you have used chart data a static database table. Could you please let me know how to transfer data from Dataaction to the Database table.


Thanks,

Avijit

Hi Avijit,

I see at least following 2 problems with your data

1) the dataseries name : all the datapoints that you want to connect should have the same series name, so in your case, all red dots should be for series "red" and all blue dots should be for series "blue".  You can use any series name you like, the name will show under the chart

2) your sort order : it looks like you sort on the string representation of the month, that's probably not what you want ?

I'm not sure why it doesn't show all points, maybe some points are on top of each other (for example in Apr2021 2 values 10), that will get more visible when lines are connected.  So start by changing these 2 points and then see where you are.  Come back with an oml and we'll help you further.

Dorine

Dear Avijit,

Please refer the attached OML, I just made in the way to fetch from data action. I don't know what query you are executing, but you can follow the similar method.

Thank you.

Charts1.oml

Thanks, Your solution works well. 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.