Tihauan / jsgauge

Automatically exported from code.google.com/p/jsgauge
0 stars 0 forks source link

setValue not displaying Float values? #30

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. store a float val in a variable
2. call the setValue function and give it the variable

What is the expected output? What do you see instead?
expect to see Float value in gauge output - but see Int value

What version of the product are you using? On what operating system?
0.4.4.
Mac OS 10.7.3
Firefox 11.0

Please provide any additional information below.
if I alert the variable, i can confirm that it contains a Floating point value. 
But when I pass the variable to setValue, it only outputs the Integer portion 
of the value.  See attached screengrabs of the alert and then the gauge

Original issue reported on code.google.com by jrloo...@gmail.com on 20 Apr 2012 at 3:12

Attachments:

GoogleCodeExporter commented 9 years ago
so it looks like, if I do this:

valueFormat: function (value, decimals) { return parseFloat(value).toFixed(2);},

Then the values dispalys correctly. However now the Max and Min labels display 
with 2 decimal points also and I don't want that.

Thoughts?

Original comment by jrloo...@gmail.com on 20 Apr 2012 at 4:35

Attachments: