Jumping domain after zoomeed

I have the exact same issue. For me, setting zoomActive on the container fixed it.
@denniseijpe i try it) but dont work
@azizmuradovar I think the issue is in having the custom zoomDomain and minimumZoom together
In theory, manually controlling your domain size should work in this case and you should be able to manually write logic for the zoom related properties such as minimumZoom and zoomDimension.
Sounds good, does not work. See https://stackblitz.com/edit/react-tqjzj8
It is possible to observe that brushDomain stops shrinking while referring to same values as zoomDomain but the zooming is still possible and if you add the logic to lock zoomDimension by only changing x in handleZoom function it won't affect zooming with scroll either.
Any update on this? Were you able to fix your issue?
Oddly enough, the problem is present in the official documentation as well: https://formidable.com/open-source/victory/docs/victory-zoom-container/.
Try zooming in all the way, and take note of the X-axis.
Hi @boygirl!
Was this bug fixed? If not, I think the issue should still remain open—the official docs still contain this bug.
https://user-images.githubusercontent.com/13417496/103506692-5c3b3b00-4e83-11eb-9c76-5ea6a6df35a8.mov
I have a similar issue. I use onZoomDomainChange and zoomDomain to control the zoom.
const [zoomDomain, setZoomDomain] = useState(null);
<VictoryZoomVoronoiContainer
responsive={false}
onZoomDomainChange={setZoomDomain}
zoomDomain={zoomDomain}
zoomDimension="x"
/>
I also have a button to reset the zoom.
<Button onClick={() => setZoomDomain(null)}>reset</Button>
Steps to reproduce the issue
- Zoom to 0.0010 ~ 0.0013
- Click the reset button.
- Move cursor to another place and zoom.
- The domain will jump to 0.0010 ~ 0.0013 and start zooming.
The following code sample shows the issue. https://codesandbox.io/s/friendly-framework-4hvt6b?file=/src/App.tsx