Weird marks on X axis

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 Aximili on 7th November 2012
I've got weird marks on my RGraph x-axis, in between the actual marks for labels. Any idea what's causing it?

Please see my StackOverflow question for the screenshot
stackoverflow.com/questions/13281372/rgraph-weird-marks-on-x-axis

Here is my JavaScript code that prints the line.

function PrintLine(labels, tooltips, data, color, legend) {
   var line = new RGraph.Line(CANVAS_ID, data);

   line.Set('chart.labels', labels);
   line.Set('chart.background.grid.hlines', false);
   line.Set('chart.background.grid.autofit.numvlines', labels.length-1);
   if(legend[0].length > 0) {
     line.Set('chart.colors', legend[0]);
     line.Set('chart.key', legend[1]);
     line.Set('chart.key.position', 'gutter');
     line.Set('chart.key.position.gutter.boxed', false);
     line.Set('chart.key.position.x', 400);
   }

   line.Set('chart.tooltips', tooltips);
   line.Set('chart.shadow', true);
   line.Set('chart.ylabels', false);
   line.Draw();
}
Posted by RGraph support on 8th November 2012
Hi,

Are you reusing the canvas from another chart? What you're seeing may be tickmarks from another chart. You can clear previous charts with this:

RGraph.ObjectRegistry.Clear();
Posted by Aximili on 8th November 2012
That's it!! Thank you!

Add a reply




« Back to message list