Replied 10 November 2020, 9:50 am EST
Hi Ashwin, thanks for the reply. I know it could be a little hassle but I'm not quite sure why most of the things added to the parent div cannot be saved. Like for event listeners there would be handler function name or namespace, and for other properties that wijmo added/modified on that parent container, they would be traceable by saving them in a dictionary. So those can be properly reset after disposing of the chart. If an event listener is added by the user, then it should just leave it as it is. Same for other properties (e.g., background-color, width, height) that users have modified for the parent div after the chart is created, they should be left untouched when the chart is disposed.
By saving the original HTML it would save a lot of effort and it's pretty straight-forward, but it would affect further interaction with the container once the chart is created and it would also cause confusion when the chart is disposed.