Can I give labels to the X and Y axis's by a bar or line chart like image below? I've searched in the documentation but nothing found that works.
I need to do that for show statistics for a big data site. The users will see how many users are registered by city, town or village.
I use the latest version of chart.js
I actually have the same question
Based on the documentation and a few examples, it should be feasible using the scale.scaleLabel.labelString
option:
options: {
scales: {
xAxes: [{
scaleLabel: {
labelString: 'Month'
}
}],
yAxes: [{
scaleLabel: {
labelString: 'New Items'
}
}]
}
}
@simonbrunel is correct.
Most helpful comment
Based on the documentation and a few examples, it should be feasible using the
scale.scaleLabel.labelString
option: