I am trying to remove the gap between the bars of the bar charts, but although I see this solution in many places, it does not work for me. It is also not mentioned in the Chart.js docs, so it is odd. Can someone tell me how to specify it?
var options = { barValueSpacing : 1, // doesn't work; find another way barDatasetSpacing : 1, // doesn't work; find another way legend: { display: false // Hides annoying dataset label }, tooltips: { callbacks: { label: function(tooltipItem) { return tooltipItem.yLabel; } } } }; var ctx = document.getElementById("canvasX").getContext("2d"); var myBarChart = new Chart(ctx, { type: 'bar', data: data, options: options });
source share