Hi, guys, welcome back to Appsloveworld. In our previous article, we learned about How to Create Multi-Line Chart Using Chart js in detail. And now moving ahead, let’s learn about another great feature of Chart Js i.eHow we can create straight lines and curves lines in the same graph using Chart.js.
Straight lines and curves lines in the same graph
*Thank you so much if you have a question please comment
So what I want to do here is it will be green. So I want to grab this green color here, I’ll set it in green, and else if that’s not the case I want the default color of red. We’re going to put it in their semicolon.
All right, so now we have this here and then of course what we need to do is to return so we’ll look through every item here based on this condition, and then it will return the matching value. So we say return it will say here return the value of the color.