5👍
Yes, use the Annotations plugin:Chart.Annotation.js
annotation: {
annotations: [{
type: 'line',
mode: 'horizontal',
scaleID: 'y-axis-0',
value: '26',
borderColor: 'tomato',
borderWidth: 1
}],
drawTime: "afterDraw" // (default)
}
Result:
Codepen: Chart.js Annotations BarChart
Note: I am using V 2.2.1, your syntax is I believe from a previous version, so I am only using your Data and some options.
- [Chartjs]-Show all values in Chart js y axis
- [Chartjs]-How to hide Chart.js data labels for small screens
Source:stackexchange.com