I employed a simple zooming with d3-zoom which works fine using rescaleX and rescaleY for my axes, and yust setting the transform of my line chart objects to the transform of the event object, and setting the stroke width accordingly.
Now I added a reset button that does plotsContainer.call(zoom.transform, d3.zoomIdentity.scale(1)), but I have one problem: When zooming again, the picture "jumps" to the previous zoom state.
I employed a simple zooming with d3-zoom which works fine using
rescaleX
andrescaleY
for my axes, and yust setting thetransform
of my line chart objects to thetransform
of the event object, and setting the stroke width accordingly.Now I added a reset button that does
plotsContainer.call(zoom.transform, d3.zoomIdentity.scale(1))
, but I have one problem: When zooming again, the picture "jumps" to the previous zoom state.Is there a way to remove all stored zoom state?