radialIndicator icon indicating copy to clipboard operation
radialIndicator copied to clipboard

barColor range is based on value rather than percentage

Open masoudhaghi opened this issue 8 years ago • 1 comments

The barColor value can define the color range of the indicator, but the issue is the range is based on the value of the indicator and not the percentage of completion. When the range is based on value there are couple of issues as follow:

  1. When the indicator minValue is a negative number, you cannot assign a color for minimum value
  2. When the indicator value is higher than the maxValue or the maximum value in color range, the indicator color turns to transparent and does not show the indicator progress
  3. The color changes after the maxValue would not be calculated

Code Snippet from Documentation

$('#indicatorContainer').radialIndicator({
    barColor: {
        0: '#FF0000',
        33: '#FFFF00',
        66: '#0066FF',
        100: '#33CC33'
    },
    percentage: true
});

masoudhaghi avatar Sep 03 '16 22:09 masoudhaghi

This should be based on value instead of a percentage value, as when you are working with non-percentage values it becomes explicit to have the color range by values. Will figure out to fix the issues you reported.

s-yadav avatar Sep 04 '16 03:09 s-yadav