Chartjs-How can I check when the Charts from chart.js are fully rendered in React?

1👍

This is because you are trying to read the canvas before the ami,mations and draws are finished, you either need to set the animations to false or use the onAnimationComplete callback:

options: {
  animations: false
}
options: {
  animations: {
    onComplete: ({initial}) => {
      if (initial) savechart();
    }
  }
}

Leave a comment