Scatter chart: tickmarks don't show and labels are spaced evenly

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 Greg on 2nd February 2014
I love RGraph and all the examples and how easy it was to implement. Kudos to you! But wish there was a comprehensive listing somewhere of all the .Set( options for each type of chart. Maybe I missed it? Anyway, I have a scatter chart but I'm not seeing any tickmarks even though I have:
         .Set('tickmarks', 'circle')
         .Set('ticksize', 5)
Also, the x labels are spread evenly and don't line up with the tickmarks. I have dates on the x axis. Also, is there a way to set the vertical grid lines to only appear where there is a label and no others?
Posted by Richard on 3rd February 2014
Hi there,

There's a listing of chart properties in the docs here:

The two peoperties that you have there are the correct ones Here's an example:

There's no grid option like that - you will need to use the ondraw event, the obj.coordsText variable (to get the X coordinate) and the gutter options (to get the height).

You could also set the composite operation to destination-over so that what you draw (ie the grid) appears "at the back" of what is already on the canvas - so you can draw the grid in the ondraw RGraph event and still have access to the relevant coordinates.

obj.context.globalCompositeOperation = 'destination-over';

Please link to the RGraph website. Thanks!

Add a reply

« Back to message list