chartjs / chartjs/chartjs-plugin-annotation

label annotation not showing

Open
#926 1 comment 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
JavaScript
Stars
623
Forks
377
PR merge metrics
No merged PRs in 30d

Description

const options = {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
position: "bottom" as const,
},
annotation: {
annotations: {
point1: {
type: 'point',
x: lineChartData?.maxSolar?.ts,
y: lineChartData?.maxSolar?.m_s,
backgroundColor: 'rgba(0, 255, 8, 0.25)'
}
}
}
},
scales: {
y: {
ticks: {
font: {
size: 14,
},
callback: function(value: any) {
return value + ' kWh';
}
},
stacked: true,
},
x:{
ticks: {
font: {
size: 14,
},

},
},
},
};



Screenshot 2024-03-21 at 7 58 08 PM

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.