0👍
I would create the image on the onComplete
event, than everything should be visible, atleast this works in browsers.
from the documentation: "…The animation configuration provides callbacks which are useful for synchronizing an external draw to the chart animation….", but works surely for your image creating process. link to documentation
...
options: {
animation:{
duration: 0, // "no" animation
onComplete: () => {
...
// create image
...
}
}
}
...
Ofcourse: in this case your function plotData
would have to be async or pass a callback function for when the event onComplete
fires.
- Chartjs-Chart js show levels on top. (Bar chart with Stacked group)
- Chartjs-ChartJS – How to choose the visible datalabels
Source:stackexchange.com