Closed ashish-chopra closed 6 years ago
The threshold value used a key is used a string in the algorithm to compare with each other, therefore always wrong color get selected due to string comparison, not number comparison. For example if this is the case:
$scope.gaugeThreshold = { '0': {color: '#228B22'}, '8': {color: "#AABC22"}, '21': {color: '#FFF54C'}, '31': {color: '#DF9111'}, '41': {color: '#FF0000'} };
The color related to 8 is always shown for anything >= 8.
Resolved. Thanks @donghopark for pull request.
The threshold value used a key is used a string in the algorithm to compare with each other, therefore always wrong color get selected due to string comparison, not number comparison. For example if this is the case:
The color related to 8 is always shown for anything >= 8.