Nice to meet you. I'm making a chart with version chart.js3.6.2, and I want to make a label-like shape on the y-axis like an image. I tried to use generateLegend, but it was already deleted, where is the center code implemented in 3.x or higher? Thank you.
- i want
=========================================
options : {
plugins: {
legend: {
display: false
},
autocolors: false,
annotation: {
annotations: {
line1: {
type: 'line',
yMin: 2.2,
yMax: 2.2,
borderDash: [4, 3],
borderColor: 'rgb(255, 99, 132)',
borderWidth: 1,
},
line2: {
type: 'line',
yMin: 2.4,
yMax: 2.4,
borderDash: [4, 3],
borderColor: 'rgb(255, 99, 132)',
borderWidth: 2,
label: {
enabled: true,
fontStyle: 'normal',
position: 'start',
content: 2.2,
backgroundColor: 'rgb(255, 99, 132)'
}
}
}
}
},
responsive: true,
spanGaps: true,
scales: {
y: {
min:0,
max:max,
ticks: {
stepSize:0.2
}
},
x: {
grid:{
display: false,
}
}
},
gridLines:{
lineWidth:0
}
}
});
}