Hi,
If I create a bar chart with the scales option:
{
scales: {
xAxes: [{
barThickness : 45,
barPercentage: 1.0,
categoryPercentage: 1.0,
}],
}
}
Here is the fiddle https://jsfiddle.net/07pzys9t/ .
barPercentage: 1.0
and categoryPercentage: 1.0
don’t remove the space between the bars in the chart, although, as I understood, they should, as it’s said here:
Any advice on how to achieve this on ChartJS 2.5.0?
You need to remove the
barThickness
property from your configuration. See https://jsfiddle.net/07pzys9t/1/The
barPercentage
andcategoryPercentage
(the default values are 0.9 and 0.8) are used to size the bar only ifbarThickness
is not set.