How do I retrieve a datums pixel coordinates?

« 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 Mark on 2nd July 2013

for performance reasons I'm looking to replace an SVG chart with a canvas one. Just evaluating RGraph to see if it's a suitable fit. Does the API offer any way of getting the pixel coordinates of each datum once the graph has been rendered? I need this as I'll have to add functionality so that a user can drag an area of the chart to create a subselection.

I there isn't any official method in the API is it possible by any (potentially hacky) route?

Posted by RGraph support on 2nd July 2013
Hi there,

There's the .coords array - which contains the coordinates of each point/shape. What the array is called sometimes varies - but for the most part it's called .coords. If you're interested in dragging the actual points/bars then you might want to have a look at the adjusting:

Richard, RGraph Support
Posted by Mark on 2nd July 2013
Hey Richard

thanks for the really speedy reply :) It isn't to modify the data, just to test what data fits within a rectangle dragged by the user. I'll have a play with .coords and see where I get

thanks again

Add a reply

« Back to message list