jeudi 3 janvier 2019

How to pass endValue to horizontal annotation in chart.js?

I am drawing a line chart with chart.js and I can't figure out how to pass endValue to the horizontal annotation.

I've tried passing any possible value and even changing axis but it doesn't work.

annotation: { drawTime: 'afterDatasetsDraw', annotations: [{ type: 'line', mode: 'horizontal', scaleID: 'y-axis-0', value: 0.5, endValue: 1, borderColor: 'green', borderWidth: 4 },

As you can see the line starts at value 0.5 and I want to go only till the next label.

Any help is incredibly helpfull.




Aucun commentaire:

Enregistrer un commentaire