Posted 11 December 2017, 5:47 am EST
Getting the below error while trying to render a databar whose range has negative values.
Failed to execute ‘addColorStop’ on ‘CanvasGradient’: The value provided (‘undefined’) could not be parsed as a color.
Below is the code block i am using .
dataBarRule.minimumType(ruleData.minType);
dataBarRule.minimumValue(ruleData.minValue);
dataBarRule.maximumType(ruleData.maxType);
dataBarRule.maximumValue(ruleData.maxValue);
dataBarRule.color(ruleData.color);
dataBarRule.showBorder(ruleData.showBorder);
dataBarRule.borderColor(ruleData.borderColor);
dataBarRule.dataBarDirection(ruleData.direction);
if(ruleData.useNegColor)
dataBarRule.negativeFillColor(dataBarRule.negColor);
dataBarRule.useNegativeFillColor(ruleData.useNegColor);
if (ruleData.useNegBorColor)
dataBarRule.negativeBorderColor(ruleData.negBorColor);
dataBarRule.useNegativeBorderColor(ruleData.useNegBorColor);
dataBarRule.axisPosition(ruleData.axisPosition);
dataBarRule.axisColor(ruleData.axisColor);
dataBarRule.gradient(ruleData.isGradient);
dataBarRule.showBarOnly(ruleData.showBarOnly);
