What does the obj.coords variable do in this code sample?

« 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 Husein on 23rd October 2015
Hi ...
I'm new to RGraph and learning it intensively ...
I try to draw a marker on a line chart ....
in your example (www.rgraph.net/canvas/docs/drawing-api-marker1.html) there are properties for the marker coordinates i.e x: line.coords [2][0] ....
Could you tell me what does the array represent are ? ..

Posted by Richard on 23rd October 2015

There's no special reason for it - I did it that way to keep some sort of similarity with the APIs of other charts. So take the Line chart for example - the coords array might have 10 points, each with an x/y coordinate so a 2D array there makes perfect sense.

Imagine that we have the just one of those points for the marker and that we've kept the same structure of the array.


Add a reply

« Back to message list