2👍
✅
You could define your yAxis
values as numbers. In my code “Yes” = 2 and “No” = 1.
data: [2, 1, 2, 1]
Then use yAxist.ticks.callback
to return meaningful tick labels
yAxes: [{
ticks: {
beginAtZero: true,
stepSize: 1,
callback: value => {
if (value == 0) {
return '';
}
return value == 1 ? 'No' : 'Yes';
}
}
}]
Please have a look at the following StackBlitz
Source:stackexchange.com