Hi,
when I use the jgauge-widget, than the displayed value is calculated wrong.
For example: The feed-value is 12000. Then the jgauge is displaying 1199. Always missing "one"
This is only when the value is ascending. -> value changes from 1000 to 1200 -> displayed value stays at 1199
On descending: -> value changes from 1400 to 1200 -> displayed value stays at 1200
bar-widget and dial-widget are working proper!
regards/brutzler
Edit:
Looking at the jgauge_render.js: Why rounding always to the next lower value? ctx.fillText(Math.floor(value)+units, 37*(size/100), 85*(size/100));
Shouldn't it be: ctx.fillText(Math.round(value)+units, 37*(size/100), 85*(size/100));
only a suggest from me.
jgauge : Value is "wrong rounded"! Math.floor <-> Math.round
Submitted by brutzler on Sun, 03/08/2014 - 10:54Hi,
when I use the jgauge-widget, than the displayed value is calculated wrong.
For example: The feed-value is 12000. Then the jgauge is displaying 1199. Always missing "one"
This is only when the value is ascending. -> value changes from 1000 to 1200 -> displayed value stays at 1199
On descending: -> value changes from 1400 to 1200 -> displayed value stays at 1200
bar-widget and dial-widget are working proper!
regards/brutzler
Edit:
Looking at the jgauge_render.js: Why rounding always to the next lower value?
ctx.fillText(Math.floor(value)+units, 37*(size/100), 85*(size/100));
Shouldn't it be:
ctx.fillText(Math.round(value)+units, 37*(size/100), 85*(size/100));
only a suggest from me.