Chart position inside canvas

Share RGraph:   Share or Like RGraph on Facebook!

« 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 arnaud on 12th January 2013
Hi,

I would like to know how we could manage the positionning of a graph (like pie) inside the canvas.

My concern is the pie is automatically center in the canvas. I would like to stick the pie to the left of the canvas.

Is there a properties to do so ? or i need to use a css approach ?

Regards,

Arnaud
Posted by arnaud on 13th January 2013
I found properties in documentation on Pie part (www.rgraph.net/docs/pie.html#properties).

What is sill weird is the relative position of the image regarding canvas. Where is the O,O position of image versus canvas ?
Posted by RGraph support on 13th January 2013
Hi,

The [0,0] is in the top left corner - in the same way that HTML coordinates start in the top left of the page.

With regard to positioning the Pie you can either use the gutter properties so that the Pie is centered in the resulting area. Or you can use the centerx/centery/radius properties to position it precisely.

Richard, RGraph support
Posted by Arnaud on 15th January 2013
Yes it is more clear. In Fact centerx attributs is based on the center of the pie versus the 0,0 top left corner of the canvas.
Posted by RGraph support on 15th January 2013
Hi,

Yes - the chart.centerx and chart.centery are the center of the Pie - measured using the same coordinate system as the canvas.



  

Richard, RGraph Support

Add a reply




« Back to message list