2

i am creating a gauge using jsGauge

the answers in this link Create a gauge using jsgauge has helped me but i am trying to make a gauge that can display percentage for example 55.57%.

as shown on jsgauge plugin page http://code.google.com/p/jsgauge/ the fourth gauge shows the value 10.55. is it possible using jsgauge and the examples shown in the answers if yes how can it be done.

Community
  • 1
  • 1
user1852933
  • 117
  • 1
  • 3
  • 11

1 Answers1

0

You can use the valueFormat option for this. For example:

 valueFormat: function (value, decimals) {
                  return value.toFixed(decimals) + '%';
              }

There is also a decimals option that you may need to specify to ensure the proper number of decimal places:

options = {
    ...
    decimals: 2,
    ...
 }

Does that help?

Justin Ethier
  • 131,333
  • 52
  • 229
  • 284