gauge.js icon indicating copy to clipboard operation
gauge.js copied to clipboard

when the current value is 0

Open webexpressor opened this issue 11 years ago • 5 comments

when the current value is 0, the canvas render two pointer,however,there should be one.

webexpressor avatar Mar 05 '13 03:03 webexpressor

this happen when set angle: 0.05 ,it default 0.15

webexpressor avatar Mar 05 '13 04:03 webexpressor

I have the same issue

PavelPolyakov avatar Mar 11 '13 14:03 PavelPolyakov

Gauge has several default values, also this one: Gauge.prototype.displayedValue = 0

When the current value is set to 0, it has the side effect that options are not applied correctly. Quickfix is to set the internal default value Gauge.prototype.displayedValue = 1. Then the display is fine and the textfield is also initialized correctly.

I have commited this quickfix in my fork.

mark-sch avatar Mar 13 '13 00:03 mark-sch

Here is a fiddle to illustrate the situation http://jsfiddle.net/niftytushar/vAnGE/1/ When the value of gauge is set to 0 initially, two pointers are rendered on the canvas. Also no text is displayed in the text field in this situation. However, when we set the value initially to 1 and then to 0 again, then everything works just as expected.

niftytushar avatar Feb 08 '14 12:02 niftytushar

This is the duplicate of #71 and seems to be fixed.

vvnc avatar Apr 20 '18 12:04 vvnc