With the Fuel Gauge: I'm having trouble with the options scaleVisible, labelsCount, labelsEmpty

« 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 Robert on 30th January 2016
Hello Again,

I'm attempting to reset the scale of the Fuel Gauge.
Instead of it being sectioned into 5ths, I would prefer it being sectioned into 8ths.

I read the docs, but am failing to understand what is probably obvious and trivial. Nonetheless, it isn't working for me.

Here's my code:

  var Gas = [12.5,25,37.5,50,62.5,75,87.5];
  var a = Gas[rand(0,6)];
         var fuel = new RGraph.Fuel({
         id: 'cvs1',
  scaleVisible: true,
  labelsEmpty: 'Empty',
  labelsCount: 9,
         min: 0,
         max: 100,
         value: a,

Thank you so much,

Not really part of the above problem but, when I redrew the fuel gauge, the "needle" would not clear, but draw another needle. Thus the "RGraph.Reset(cvs1)

Posted by Richard on 30th January 2016

There isn't a lot of options for the Fuel Gauge, but to get 8 labels you can do this:


Posted by Robert on 31st January 2016
Yes Sir, that worked.

I need to remember the "options" idea:

    options: {

Thanks again Richard.

Add a reply

« Back to message list