Chart.js: Bar Chart with a full height background colour for each bar

Created on 25 Sep 2017  路  2Comments  路  Source: chartjs/Chart.js

Hi,

I am trying to replication the same bar chart in chartjs2 as displayed in this stackoverflow ticket: https://stackoverflow.com/questions/31791034/how-to-set-a-full-length-background-color-for-each-bar-in-chartjs-bar/31875649#31875649

2tvej

Could would really appreciate any assistance in achieving this?

support

Most helpful comment

You can make a stacked bar chart where the data value for each point in the second dataset is 90 minus the value in the first dataset.

All 2 comments

You can make a stacked bar chart where the data value for each point in the second dataset is 90 minus the value in the first dataset.

@benmccann's answer is what I was going to suggest. That's the easiest way to achieve this. An alternative is a plugin that goes and draws the background but it would need to be able to figure out where the bars are which is difficult.

Was this page helpful?
0 / 5 - 0 ratings