mongodb-js / charts-embed-sdk

The easiest way to embed MongoDB Charts visualisations into your web app
https://docs.mongodb.com/charts/master/embedding-charts-sdk/
Apache License 2.0
43 stars 31 forks source link

Chart is not re-render when switching route on react application #23

Closed Riri-Z closed 3 years ago

Riri-Z commented 3 years ago

Hello,

I tried using chats-sdk on react application (took your react example "timeline chart example" to display the issue) .

The issue is when I am switching route :

-When I land on the chart page for the first time , there is no issue.

-But if I switch route, and then comeback on my chart page, I get the following error :

     "A chart can only be rendered into a container once". 

And the chart wont render. My code may be wrong too...

Could you enlighten me ?

I have created this repository if you want a quick view : https://github.com/Riri-Z/mongoDBskD