You can add new options that are not available by default. But you need to edit chart.js
In Chart.js add these lines of code Step 1:
Add these two lines to the defaultConfig column chart
Step 2:
calculateBarWidth : function(datasetCount){ **if(options.isFixedWidth){ return options.barWidth; }else{**
Add this condition to the calculateBarWidth barchart function
Now you can set barWidth to the user js file as parameter by setting
isFixedWidth:true, barWidth:xx
If you do not want to specify a fixed bandwidth, just change isFixedWidth:false
Ashwini bhat
source share