Skip to content Skip to sidebar Skip to footer

CharJS 2.5.0 - How To Remove Space Between Bars

I created this fiddle. It contains a ChartJS bar chart: https://jsfiddle.net/07pzys9t/ var options = { legend: { display: false }, animation: {

Solution 1:

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.


Post a Comment for "CharJS 2.5.0 - How To Remove Space Between Bars"