Scatter chart labels huddled after upgraded

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 sh2sg on 1st April 2013

I was using the stable version in January and it worked fine with the Date/time scatter chart. However after I upgraded to stable version in March, those x labels got huddled with the same code.

Here is the sample code:

<!DOCTYPE html >
<script type="text/javascript" src="RGraph.common.core.js" ></script>
<script type="text/javascript" src="RGraph.scatter.js" ></script>
<title>A Scatter chart using Date/Time values</title>

<canvas id="cvs" width="600" height="200">[No canvas support]</canvas>

window.onload = function ()
     var data = [

     var labels = [
         ['4 Mar', 1362355200000],
         ['11 Mar', 1362960000000],
         ['18 Mar', 1363564800000],
         ['25 Mar', 1364169600000]

     var scatter = new RGraph.Scatter('cvs', data);
     scatter.Set('chart.ymin', 0);
     scatter.Set('chart.ymax', 21);
     scatter.Set('chart.xmin', 1362355200000);
     scatter.Set('chart.xmax', 1364515200000);
     scatter.Set('chart.labels', labels);
     scatter.Set('chart.line', true);
     scatter.Set('chart.line.linewidth', 1);
     scatter.Set('chart.line.colors', ['red']);
     scatter.Set('chart.line.shadow.color', '#999');
     scatter.Set('chart.line.shadow.blur', 15);
     scatter.Set('chart.line.shadow.offsetx', 0);
     scatter.Set('chart.line.shadow.offsety', 0);
     scatter.Set('chart.tickmarks', null);


And here are the results:

Old version:

New version:

Any advice?

Posted by RGraph support on 1st April 2013
Hi there,

Ok, this is fixed now - so try the new library. Here's your example:

And the updated library:

Richard, RGraph Support

1 Year Priority Support now reduced to £299:
Posted by sh2sg on 1st April 2013
Hi Richard,

Thanks for your prompt response, the fix works perfectly.

Add a reply

« Back to message list