I'm using the C3 graph library to draw some graphs in my Javascript application.
What I'm trying to accomplish is to draw various parts of my area line graph sections in different colors. Specifically what I want to achieve is that when my graph goes down that the specific area section (column) is draw in red until the value goes up again, where it should revert back to it's default blue color.
I have put together a simple JSFiddle to demonstrate what I currently have:
c3.generate({
bindto: "#chart",
data: {
columns: [
['data', 30, 200, 100, 400, 150, 250, 40, 134, 60],
],
types: {
data: 'area'
}
}
});
In this example I want the area section (column) between index 1 and 2 to be colored red.