15👍
For drawing my chart.Line with a fixed Y axis scale, I use this code:
mychart.Line(data,{scaleOverride: true, scaleStartValue: 0, scaleStepWidth: 1, scaleSteps: 30});
This should also work for the chart.Bar object.
- [Chartjs]-How to add an offset to a dataset in Chart js
- [Chartjs]-How to display data values on Chart.js
0👍
Check these answers out:
chartjs : how to set custom scale in bar chart
how to change the Y-axis values from real numbers to integer in chartjs?
Basically you’d add this to your datasets (where n is the number of scale steps you want):
scaleOverride:true,
scaleSteps:n,
scaleStartValue:0,
scaleStepWidth:500,
- [Chartjs]-Is it possible to produce circular (round) shaped radar chart in Chart.js?
- [Chartjs]-Different color for each column in angular-chartjs bar chart
Source:stackexchange.com