ZingChart: Dynamically Set Bar Color Based on Previous Node Value

You can use our dataparse() method to dynamically determine color value of bars at parse time. That event is fired when the data is ready to be parsed by ZingChart. So I loop through and add color based on the previous value dynamically. I left the first bar a neutral color because there is no previous value to compare it to.

Example: https://demos.zingchart.com/view/embed/0P1S746R

Documentation

dataparse Event
styling nodes

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us