0👍
To achieve expected result , use scales option for x axis
barPercentage vs categoryPercentage section of https://www.chartjs.org/docs/latest/charts/bar.html?h=scales
Both of 1.0 will stack together , so adjust according to your requirement
scales: {
xAxes: [{
categoryPercentage: 0.99,
barPercentage: 1.0
}]
}
codepen – https://codepen.io/nagasai/pen/yGYJKE
- Chartjs-Updating chart.js with a dataset of different size not working
- Chartjs-Update ChartJS with MySQL Data
Source:stackexchange.com