In My D3 Chart, Zoom Selection Disappears When I Change The Brush And Click On Not Selected Range
In my d3 chart, Zoom selection disappears when I change the brush and click on not selected range. This is my working code - https://codesandbox.io/s/eager-shirley-cxq99 When I ch
Solution 1:
Just un-comment this part in your code to actually produce the zoom rect, which gets used in the brushed
function.
svg
.append("rect")
.attr("class", "zoom")
.attr("width", containerWidth - 20)
.attr("height", height)
.attr("transform", "translate(0,20)")
.call(zoom);
See working codesandbox.io
Post a Comment for "In My D3 Chart, Zoom Selection Disappears When I Change The Brush And Click On Not Selected Range"