1π
β
You are trying to use V3 syntax with V2 that wonβt work. You will have to put it like this:
scales:{
xAxes: [
{
scaleLabel: {
display: true,
labelString: 'text'
}
}
],
yAxes: [
{
scaleLabel: {
display: true,
labelString: 'text'
}
}
]
}
0π
In Chartjs 2.x.x version, you have to specify scales options in an array not an object.
Try like this
xAxes: [{
scaleLabel: {
display: true,
labelString: 'LabelX',
},
gridLines: {
display: true
}
}]
Source:stackexchange.com