I need to show in Y-Axis the labels of my max value in array from 0, 25%, 50%, 75% and 100% values.
My example max value is 100,000. Output in Y-Axis should be: 0, 25,000, 50,000, 75,000, 100,000.
Not sure what should I put in stepSize. For the max, I can filter the maxAmount in the array.
yAxes: [
{
ticks: {
min: 0,
max: ???
beginAtZero: true,
stepSize: ???,
callback(value) {
return `Php ${formatHelper.kFormatter(value)}`;
},
},
},
],
Output in Y-Axis should be: 0, 25,000, 50,000, 75,000, 100,000.
2
Answers
set
max
to 100000 andstepSize
to 25000codepen exmaple
we can use
afterBuildTicks
options to set our own ticks,afterBuildTicks
option