bernii / gauge.js

100% native and cool looking JavaScript gauge
MIT License
1.42k stars 391 forks source link

Using percentColors "pops" the color after animation #207

Open nospam2k opened 5 years ago

nospam2k commented 5 years ago

adding percentColors : [[0.00, "#00b500" ], [0.65, "#e6e600"], [.70, "#ca3838"]],

When the gauge refreshes and the needle animation reaches the set value, the color "pops" into the gauge rather than gradually changing to the appropriate color. I set gauge.set(70) and gauge.maxValue = 100 and gauge.setMinValue(0). As it reaches 70 it flashes from yellow to red.