Hi,
I just want to know if it is possible to have multiple fill color on Line chart that only have one dataset?
I’m trying to create a line chart that will change the fill color whenever the value on Y-Axis becomes negative.
I can do multiple colors using 2 datasets but it will look like this:https://jsfiddle.net/mzborromeo/26hbaza4/ which is not what I want. I need only one dataset and all the positive values must have a blue green fill color and negatives will have red fill color. Will it be possible?
Thanks
Found a way. In this example I’m using the option
fill: 'origin'
on my dataset:berosoboy code wasn’t working for me on chart.js 2.5.0, I had to change it for:
And it seems to be working:
https://jsfiddle.net/x4dvotLn/
@cesartl thanks so much! You just made my charts beautiful