[Chartjs]-How to reuse a Chartjs Chart component in with different Data and get past the **Canvas is already in use** error?

1👍

ID’s in web design should be unique. At the moment each time you create a new BoxPlotChart component it adds a canvas with id 'myChart' to the DOM.

You either have to generate a random ID within your BoxPlotChart chart component or pass along an ID in the props which you give to the canvas

Leave a comment