You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I removed:
var color;
if (typeof(options.barColor) === 'function') {
color = options.barColor(percent);
} else {
color = options.barColor;
}
in the JQuery file and replaced it with:
if(percent >= 90){
color = '#5ebe01'; //green
}else if(percent <= 89 && percent >= 51){
color = '#fe7903';//orange
}else if(percent <= 50){
color = '#ed2e08'; //red
}
How can I associate percentages to different colors? For barcolor in your key it says:
"But you can also pass a function that accepts the current percentage as a value to return a dynamically generated color."
Can you please give me some steps to do this? I'd like it to transition from Green 0-40, Yellow 40-85, Red from 85-100.
Thank you!!
The text was updated successfully, but these errors were encountered: