Details and suggestions on "An SVG Line chart using the trace effect"


« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Rainer on 28th August 2017
I was testing the -->'An SVG Line chart using the trace effect'<-- on a web side I'm just working on.
The single graph worked somehow, but when I tried to show two or more graphs overlayed I failed.

My intention is to display more than one temperature graphs on the same axis in different colors.
The horizontal scale should always be fixed over the whole page.
Means should start at 00:00 on the left side and end 23:59 on the right side.
The graph(s) would be filled during the day, and should also show the time and temperature like on the example.

Is something like that possible with this (RGraph.SVG.Line) graph ? Or would another be a better choice ?
Is there a limit to the number of graphs on the same axis ?
Where do I find details on the parameters for i.e. RGraph.SVG.Line
When I worked on them, some times the page didn't fill the axis correct.
Was distorted or deformed.

Any suggestions ?

Thanks
Rainer
Posted by Richard on 28th August 2017
Hi there,

Well first thing - to add new data to the Line chart you need to append it to the .originalData array - not the .data array. Then use the .redraw() function.

I've made example that does this here:

www.rgraph.net/tests/svg.line/multiple-lines.html

It auto-updates every 2 seconds.

On the other hand if you have irregular intervals you could use the SVG Scatter chart with a joining line. The concept is similar - add the new data and redraw.

Richard
Posted by Rainer on 28th August 2017
Hi Richard,
thank you very much for your suggestions.
I will try it within the next days.

Any hints about where to find detailed descriptions on the parameter / classes ?

Thanks
Rainer
Posted by Richard on 28th August 2017
Hi there,

> Any hints about where to find detailed descriptions on the parameter / classes ?

Missed that question in your post - are you referring to the docs page for the SVG Line chart?

www.rgraph.net/svg/docs/line.html


Richard

Add a reply




« Back to message list