How would I implement multi-channel Line charts?

Posted by Vladimir at 08:33 on Thursday 19th August 2021 [link]
Hi, how can you implement multi-channel line graphs in rgraph, where each channel is represented by a separate graph (a sine wave), but all channels are displayed in a single coordinate system on the X axis(timestamps) and on the Y axis these are separate graphs. An example picture

Posted by Richard at 13:26 on Thursday 19th August 2021 [link]
If by "multi-channel" you mean multiple datasets then yes you can do that with RGraph.

Here's some demos from the download archive ( ) that show Line charts with multiple datasets.


Simply, whereas normally you would give your data as an array:


To show multiple datasets you'd change that to give an array of arrays.

[ [4,8,6,3,5,4,2], [8,7,9,6,4,8,8] ]

Posted by Vladimir at 05:10 on Friday 20th August 2021 [link]
Thank you Richard for the excellent examples. They are really good, but they will not work in my task. I would like to divide the graphs into different coordinate planes. as it is shown in the picture by the link in my question. Thank you again for your attention to my question.

Posted by Richard at 10:16 on Friday 20th August 2021 [link]
I see. Well if you're using the Scatter chart there's a backgroundVbars option that you could use to do that.

The Line chart won't really work in this case because the Line chart doesn't have an X axis scale (each point is just spread equally across the chart) - so use the Scatter chart (so effectively you'd have an X/Y chart where you give the X and Y values of each point) with the line option specified:

[Replies are now closed]