How to turn off the scale with additional marks from 0 to 45000 which I highlighted in the screenshot? I have tried everything possible. it seems that it is possible to update chartjs to the latest version, but I'm interested in the possibility of correcting the behavior in version 3.7.1 there is also a problem that at the point at the very top where 100% the label with a value of 100 of this point is cut off, until I also found how to fix it.
Options:
export const chartOptions: ICustomChartOptions = {
responsive: true,
layout: {},
elements: {
bar: {
borderRadius: 4,
},
line: {
borderWidth: 3,
},
point: {
backgroundColor: '#FFFFFF',
borderWidth: 2,
radius: 4,
},
},
clip: false,
scales: {
x: {
grid: {
display: false,
},
ticks: {
font: {
size: 10,
},
},
min: 0,
max: 100000,
},
y: {
position: 'left',
grid: {
drawBorder: false,
},
ticks: {
callback: function (value) {
return `${value}%`;
},
stepSize: 25,
font: {
size: 10,
},
},
min: 0,
max: 100,
beginAtZero: true,
},
},
plugins: {},
};
UPD: This is data for chart
export const chartData: ChartData<'line'> = {
labels: chartLabels,
datasets: [
{
type: 'line',
// yAxisID: 'line',
data: [100, 20, 49, 10, 97],
order: 1,
datalabels: {
anchor: 'start',
align: 'end',
color: color['Purple/Purple 80'],
formatter(value) {
return `${value}%`;
},
},
},
{
type: 'bar' as 'line',
yAxisID: 'bar',
data: [22000, 17500, 12000, 10000, 44000],
order: 2,
datalabels: {
align: 'end',
},
},
],
};
UPD 2 for display values, i use ChartDataLabels