You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a Map or Scatter, e.g. one of the pointMapChart + pointLayer in the examples
Destroy the chart with pointMapChart.destroyChart()
Re-create a brand new chart => Error related to chartBody being undefined, the new chart still displays properly
Description of issue:
It looks like destroying the chart does not clean up the chart registry and therefore the old chart is still attempted to be rendered (and fails because it was previoulsy destroyed). After some digging, it looks like a simple call to deregisterChart() in the destroyChart() method solves the problem:
Also, I found out that if we switch between a Scatter and a Map (i-e: destroy the scatter, create a new map in the same <div> container), the X and Y axis of the scatter are now shown on the maps. Since the axis are elements in the container, adding the following to the destroyChart() seems to make things right:
I am not enough familiar with the chart rendering elements and lifecycle to know if this is actually a correct fix and whether it is the only calls to make. I hope it helps though.
The text was updated successfully, but these errors were encountered:
pointMapChart
+pointLayer
in the examplespointMapChart.destroyChart()
It looks like destroying the chart does not clean up the chart registry and therefore the old chart is still attempted to be rendered (and fails because it was previoulsy destroyed). After some digging, it looks like a simple call to
deregisterChart()
in thedestroyChart()
method solves the problem:Also, I found out that if we switch between a Scatter and a Map (i-e: destroy the scatter, create a new map in the same
<div>
container), the X and Y axis of the scatter are now shown on the maps. Since the axis are elements in the container, adding the following to thedestroyChart()
seems to make things right:I am not enough familiar with the chart rendering elements and lifecycle to know if this is actually a correct fix and whether it is the only calls to make. I hope it helps though.
The text was updated successfully, but these errors were encountered: