Getting Error while trying to render a DataBar whose range has Negative Values

Posted by: hghanta on 11 December 2017, 5:47 am EST

  • 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);

  • Posted 14 December 2017, 1:02 pm EST

    Hello,

    I am not able to replicate this issue using the code similar to yours. Please refer to the attached sample page. Please provide me your sample application in case the issue continues.

    Thanks,

    Deepak SharmaSpreadJSDataBar.html.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels