0👍
ReAd ThE DoCuMEnTaTIoN
https://www.chartjs.org/docs/latest/axes/cartesian/linear.html
options: {
indexAxis: 'x',
title: {
display: false,
text: 'Average SAT Score'
},
legend: {
display: true
},
tooltips: {
enabled: false
},
scales: {
xAxes: [{
ticks: {
suggestedMin: 800,
suggestedMax: 1600
}
}]
}
}
- [Chartjs]-Update Chart JS with date range selector
- [Chartjs]-How to assign a logarithmic scale to y axis in chart.js?
0👍
This is what worked for me
options: {
scales: {
x: {
min: 0,
max: 100,
display: false,
},
}
}
Display equals to false was set since if not it appears another scale bar below the one I had chosen for my data.
According to the docs:
min: User defined minimum number for the scale, overrides minimum value from data.
max: User defined maximum number for the scale, overrides maximum value from data.
Source:stackexchange.com