victory icon indicating copy to clipboard operation
victory copied to clipboard

Jumping domain after zoomeed

Open azizmuradovar opened this issue 9 years ago • 6 comments

jumping domain

azizmuradovar avatar Oct 12 '17 11:10 azizmuradovar

I have the exact same issue. For me, setting zoomActive on the container fixed it.

denniseijpe avatar Oct 12 '17 13:10 denniseijpe

@denniseijpe i try it) but dont work

azizmuradovar avatar Oct 12 '17 14:10 azizmuradovar

@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.

ecnaidar avatar Oct 26 '17 09:10 ecnaidar

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.

kbrgl avatar Oct 27 '19 01:10 kbrgl

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

kbrgl avatar Jan 04 '21 06:01 kbrgl

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

  1. Zoom to 0.0010 ~ 0.0013
  2. Click the reset button.
  3. Move cursor to another place and zoom.
  4. 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

ericlo23 avatar Dec 14 '22 10:12 ericlo23