bernii / gauge.js

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

Gauge range color does not change #47

Closed selvamani-subramani closed 10 years ago

selvamani-subramani commented 10 years ago

Hi, Its really nice plugin, I like Very much.

The problem is when I chance start and end color of the Gauge http://bernii.github.io/gauge.js/ here, It wont change the start and end color. If I set start color as #CF170A(red) and end color as #2CCF13(green), it wont change. It works only on default color.

Thank you

niftytushar commented 10 years ago

I also encountered the same issue. I wanted to set a single color for all values, but its working on some defaults. Green to yellow to red. Also I don't seem to understand the effect of changing "generateGradient" value to false.

jurajseffer commented 10 years ago

If you use Gauge, not Donut, you may want to set: percentColors: [[0.0, "#1153E2"], [1.0, "#1153E2"]] in options to make it go blue.

niftytushar commented 10 years ago

Yah, thanks. I found it already, just forgot to update the issue. The gauge.js plugin does not have any problem, the only problem is that the documentation is either not complete or is outdated. I found a few methods and clarifications which should have been included in the documentation. The plugin is great, I've used it in a project of mine, works perfectly!

gudh commented 10 years ago

same thing here, thanks @jurajseffer :+1:

bernii commented 10 years ago

Fixed that and updated the docs( http://bernii.github.io/gauge.js/#advanced-options ) , thanks!