awsomesroka Github contribution chart
awsomesroka Github Stats
awsomesroka Most Used Languages

Activity

28 Sep 2022

Awsomesroka

[Bug]: Canvas is already in use. Chart with ID '0' must be destroyed before the canvas can be reused.

Would you like to work on a fix?

  • [ ] Check this if you would like to implement a PR, we are more than happy to help you go through the process.

Current and expected behavior

Getting this error after upgrading to new version.

Reproduction

hmm

chart.js version

3.7.1

react-chartjs-2 version

4.1.0

Possible solution

No response

Forked On 28 Sep 2022 at 11:54:48

Awsomesroka

Hi,

After upgrade to the newest version and adding ref to the Chart tag all works good, that means there is no more error in component.

Thx, Ola


From: Dan Onoshko @.> Sent: Wednesday, September 28, 2022 1:50:30 PM To: reactchartjs/react-chartjs-2 @.> Cc: Aleksandra Sroka @.>; Mention @.> Subject: Re: [reactchartjs/react-chartjs-2] [Bug]: Canvas is already in use. Chart with ID '0' must be destroyed before the canvas can be reused. (Issue #1037)

Hi @dinaAlsaidhttps://github.com/dinaAlsaid @HernanGHhttps://github.com/HernanGH ! We've had no luck trying to reproduce the issue. Would you please fork this codesandboxhttps://codesandbox.io/s/github/reactchartjs/react-chartjs-2/tree/master/sandboxes/chart/ref?from-embed and replicate it?

@jefelewishttps://github.com/jefelewis Is it the reproduction of the issue? Your example is perfectly working: https://codesandbox.io/s/jolly-pateu-wiuvn1?file=/App.tsx

— Reply to this email directly, view it on GitHubhttps://github.com/reactchartjs/react-chartjs-2/issues/1037#issuecomment-1260789673, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARXAYVGCTEW4JJIYY34QHK3WAQWINANCNFSM5S4EOZPQ. You are receiving this because you were mentioned.Message ID: @.***>

Commented On 28 Sep 2022 at 11:54:48