How can I set the number of labels on a Meter chart?

« 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 Richard Roeder on 8th May 2014

How can I set the number of labels that must appear in the graph meter?

I am using the graphical meter and if the labels are overlapping , making the visualization of values

Below is the code generator :

var grafico1 = new RGraph.Meter('grafico1', 0, 4187662.3, 4186662.30);
grafico1.Set('', 0);
grafico1.Set('', 391500);
grafico1.Set('chart.yellow.start', 391500);
grafico1.Set('chart.yellow.end', 783000.00);
grafico1.Set('', 783000.00);
grafico1.Set('', 4187662.3);
grafico1.Set('chart.gutter.bottom', 25);
grafico1.Set('chart.gutter.left', 35);
grafico1.Set('chart.gutter.right', 25);
grafico1.Set('', 25);
grafico1.Set('chart.labels.above', false);
grafico1.Set('chart.labels.above.decimals', 0);
grafico1.Set('chart.scale.point', ',');
grafico1.Set('chart.scale.thousand', '.');
grafico1.Set('chart.shadow', true);
grafico1.Set('chart.shadow.blur', 15);
grafico1.Set('chart.shadow.color', '#000000');
grafico1.Set('chart.title', 'PRIMEIRO TURNO');
grafico1.Set('chart.title.vpos', '0.6');
grafico1.Set('chart.linewidth', 1);

<canvas id="grafico1" width=500px height=250px>[No canvas support]</canvas>
Posted by Richard on 8th May 2014

The number of labels for the Meter is fixed at ten you could modify the source if you wanted to - the relevant for loop is in the drawLabels function.

Posted by Richard Roeder on 8th May 2014
Thank you

Add a reply

« Back to message list