Chart JS annotation issues #713
-
I am trying to load annotation the dynamic chart that I create after receiving data from the database and I have tried all possible options but somehow the chart loads but no the annotations. chart.js version = v2.9.4 chart-plugin-annotation.min.js version = 0.5.7 Function in JS that runs when data is receiving from db: ` function DrawChart(timeLabelList, unitsProducedList, goalList){
} Can anyone help with it. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
@devv3899 I would suggest to use CHART.JS 3.x and plugin annotation1.x because there are more recent and many bugs are solved. I think the issue is in Using Codepen (I used a category axis instead of time one but it should be affected the result): https://codepen.io/stockinail/pen/KKZXNQL |
Beta Was this translation helpful? Give feedback.
@devv3899 I would suggest to use CHART.JS 3.x and plugin annotation1.x because there are more recent and many bugs are solved.
I think the issue is in
scaleID: "y-axis-0",
because your scale id is set toid: 'A',
.Using
scaleID: "A",
in the plugin configuration should work.Codepen (I used a category axis instead of time one but it should be affected the result): https://codepen.io/stockinail/pen/KKZXNQL