I'm trying to dynamically create different types of nvd3 charts in one svg element (mainly because I want to switch chart types on the fly). To do this, everytime I change the chart type I delete every child of my svg-Element and add the new chart.
This is all working great, the problem comes when the I am resizing my window and calling chart.update through nv.utils.windowResize. For some strange reason, during this process, the old charts gets added to the DOM again, and 2 charts are displayed.
Here's a picture of the effect:

Here is an example plunker with the behaviour: Plunker. Simply click the button to change the chart type from line to bar, and resize the preview window, should do the trick.
Anyone had this problem before or knows anything I can try to solve this behaviour?
Thank you very much for any help!