FormidableLabs / victory

A collection of composable React components for building interactive data visualizations
http://commerce.nearform.com/open-source/victory/
Other
10.86k stars 525 forks source link

Jumps when zoom in #2762

Open omid opened 5 months ago

omid commented 5 months ago

Describe the bug There is a jump when you zoom in the chart!

Victory version Your version at: https://formidable.com/open-source/victory/docs/victory-zoom-container/

Code Sandbox link Your online example: https://formidable.com/open-source/victory/docs/victory-zoom-container/

To Reproduce Just zoom in somewhere in the chart, like the screencast below.

https://github.com/FormidableLabs/victory/assets/45714/cc2309d8-16a8-4751-954c-8d7f17ba713d

Desktop (please complete the following information):

carbonrobot commented 5 months ago

This appears to be working as intended. Can you describe what behavior are you expecting?

omid commented 5 months ago

@carbonrobot I zoom in on exactly the dots. Between seconds 6 and 7, the dots disappear from the chart. If you focus on the numbers on axises (in this case, x-axis) you'll see the number jumps from 0.5000 to 0.2802 in this case.

carbonrobot commented 5 months ago

That's likely because we are using a circle to calculate the datum. Try this chart with static data.

https://formidable.com/open-source/victory/guides/brush-and-zoom/

omid commented 5 months ago

same bug on that chart. between seconds 6 and 7, jumps from 26.000 to 14.560.

https://github.com/FormidableLabs/victory/assets/45714/6c29f209-2e0f-49f9-a41f-08d4a09a5bb0

carbonrobot commented 5 months ago

Thanks, now I understand what you are asking. Looks like at some point the zoom container loses its x/y handle and the steps become larger.

yuryprokashev commented 3 weeks ago

Hi guys,

I encountered the same problem with VictoryZoomContainer for VictoryCandleStick. It happens when the minimumZoom is reached. The chart jumps back in time when it happens. Please, check out this video

I would expect it just stops zooming, leaving me with what had been rendered so far.

Here is the code