Datum pixel coordinates

Share RGraph:   To help my Google visibility (it can't get much worse!), if you like and use RGraph I'd appreciate it if you could link to me

« 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
Hi


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?


Thanks
Mark
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:

www.rgraph.net/docs/adjusting-your-charts-interactively.html




Richard, RGraph Support

5 developer license with Priority support for £299:
   www.rgraph.net/license#five-developer
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