I have a chart.js which displays two different lines, on which will always be positive and one which will always be negative.
I want to visualize the area between both lines and a value of 0 on the y axis and therefore want to fill in below the the positive line and above the negative line both ending at 0. Chart.js however always fills in the line to the bottom right of a given line as far as I cant tell.
Correct Behaviour: (from chartist.js)
Incorrect Behavior (from chart.js)
Does anyone know if it is possible to achieve something similar to the look of the first graph with chart.js?
edits:
I am using chart.js through it's ember plugin
{{ember-chart type='Line' data=dataPanelService.chartData width=500 height=600}}
so I am only passing in chartData. It should be using the default options.
The chart data in the dataPanelService:
chartData: {
labels: ["9 /15 /15", "9 /28 /15", "10 /5 /15", "10 /13 /15", "10 /19 /15", "10 /30 /15", "11 /15 /15"],
datasets: {
{
fillColor: "#FF1717",
pointColor: "#da3e2f",
data: [200000, 180000, 150000, 110000, 60000, 0, 0]
},
{
fillColor: "#4575b5",
pointColor: "#1C57A8",
data: [-300000, -300000, -300000, -150000, -150000, -20000, 0]
},
}
}