Label in 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 Thiago Maturana de Oliveira on 4th December 2015
The common way for using label in meter chart is enabling them(that is the default) and specifying the labelsCount.

Until there it's ok, i would like to implement something different. Instead of having 10 20 30 ... like we have here(Meter chart example) www.rgraph.net/examples/meters-and-gauge-charts.html
i would like to have these labels to show the difference between the colors.

An Example:
Let's suppose that the Red color goes from 0 to 15.55.
Instead of having 10, 20, 30 ... i would like to have 0 .. 15.55, then the Yellow from 15.56 to 29.67 and so on.

I couldn't accomplish this yet, can someone help me or try to explain how to do that?

Thank you!
Posted by Richard on 4th December 2015
Hi,

I don't follow - what labels would you like to see (all of them)? For 0-30, for example, the labels would be:

0,3,6,9,12,15,18,21,24,27,30

What labels do you want to see on your chart?




Richard
Posted by Thiago Maturana de Oliveira on 4th December 2015
Hi Richard,

Let's assume that the Red mark of the Meter goes from 0 to 20.55%

I am trying to show a label that says exatly this: "0 - 20.55".

The yellow goes from 20.56 to 40%, so i would have a label showing "20.56 - 40".

Something like that!
Is it possible with the current version?
Posted by Richard on 4th December 2015
Hi,

I see. Not possible with the current version no - I'll need to add a labelsSpecific option for it.



Richard
Posted by Thiago Maturana de Oliveira on 4th December 2015
Thank's for replying Richard, this could be a cool feature in the future!
Posted by Richard on 12th December 2015
Hi there,

I've implemented the labelsSpecific option and there's a picture of an example chart here:

www.rgraph.net/images/meter-specific-labels.png

Here's what it looks like in the code:

...
labelsSpecific: [['Low',25],['Refill',75],['OK', 150]]
...





The actual text og the labels is configurable so if you wanted to change it to "0-29.99" you can.



Richard
If RGraph has helped you - please share the website and give your feedback - thanks!

www.rgraph.net/testimonials

Add a reply

 




« Back to message list
RGraph on social media