1๐
I think you just can set a range for the second y-axis, like this:
Maybe set a value with relation to your first y-axis
โ> suggestedMin โ suggestedMax
options: {
scales: {
yAxes: [{
ticks: {
suggestedMin: 50,
suggestedMax: 100
}
}]
}
}
In the first y-axis you can access the values of y-axis by the callback-function see below:
yAxes : [{
ticks : {
beginAtZero : true,
**callback** : function(value,index,values){
yAxesticks = values;
return value;
}
}
}]
The first value in the array should be the highest one.
- Chartjs-Chartjs xAxes gridline html (html in ticks callback)
- Chartjs-How to load new chart (chartsjs) from api call with jquery?
Source:stackexchange.com