Chartjs-CharJS 2.5.0 – How to remove space between bars

0👍

If you use chart with responsive aspect, you don’t be force a width value to your bars.

You just need set your xAxes with this two attributes

xAxes: [{
    barPercentage: 1.0,
    categoryPercentage: 1.0
}]

Instead of :

xAxes: [{
    barPercentage: 1,
    categoryPercentage: 1,
    barThickness : 45
}]

You need use percent value with responsive aspect using barPercentage and categoryPercentage attributes.

Leave a comment