VictoryZoomContainer - hard to use with real-time / dynamic data #2098
Replies: 15 comments
-
cc @arwinsardana, who found this and posted it to gitter |
Beta Was this translation helpful? Give feedback.
-
also, resetting the |
Beta Was this translation helpful? Give feedback.
-
@arwinsardana, i want to make sure I don't assume too much -- could you tell me how you envision VictoryZoomContainer working in this scenario? (a detailed step-by-step would be helpful, e.g. "the user zooms in and the chart does ____") |
Beta Was this translation helpful? Give feedback.
-
@boygirl I'd also love your thoughts - how "should" the chart react in situations like this: https://jsfiddle.net/chrisbolin/hjy9v9z4/ |
Beta Was this translation helpful? Give feedback.
-
@chrisbolin thanks for following up! When the user zooms in, I'd imagine the domain stays fixed and everything works the same as it would with a fixed data set. In other words, once zoomed in to a range smaller than the full chart's domain, that view stays fixed until further action. When you pan to the right edge of the chart while zoomed in, I'm not sure if the behavior should be that the window stays where it is or slides as new data comes in. I'd be fine with the former, static window, approach when in a zoomed state. Once the user zooms out to the point where the current domain is equivalent to the full domain of the chart, the container should update itself to display the full domain going forward (until another zoom event). In other words, once fully zoomed out, the chart should appropriately display new data points as it would without ever "remembering" that the user had zoomed in, just as it would be displaying without the zoom feature enabled. Let me know if I can provide any more details and thanks again! |
Beta Was this translation helpful? Give feedback.
-
@chrisbolin I think the behavior should be:
Does that sound right? We will need to re-calculate the domain much more frequently, and not used the cached |
Beta Was this translation helpful? Give feedback.
-
@boygirl @arwinsardana cool! I think we all agree then on the functionality. I'll see what I can put together. |
Beta Was this translation helpful? Give feedback.
-
@chrisbolin I've noticed that the y domain doesn't update on zoom out. Here's your example modified to start with less initial data and draw slower: https://jsfiddle.net/kfy2ce5m/ If you zoom in and out before a full cycle of the sin wave, you'll notice the full wave can never be seen because the y domain doesn't correct itself. Thoughts? Thanks! CC @boygirl |
Beta Was this translation helpful? Give feedback.
-
Hey @chrisbolin! Let me know if you have any thoughts. Thanks! |
Beta Was this translation helpful? Give feedback.
-
hey @arwinsardana! sorry for my tardiness! let me quickly check this out tomorrow and get back to you |
Beta Was this translation helpful? Give feedback.
-
good morning! it looks like are "reset" logic that looks to see if we are zoomed in or not needs to be reworked. It also needs to respect the |
Beta Was this translation helpful? Give feedback.
-
also, i cannot get this to happen if I remove |
Beta Was this translation helpful? Give feedback.
-
Have changes been implemented to allow for zooming in and allows the domain to automatically scroll right as new data comes in? |
Beta Was this translation helpful? Give feedback.
-
@boygirl Do you know anything about the status of this one? |
Beta Was this translation helpful? Give feedback.
-
I believe this is still an issue |
Beta Was this translation helpful? Give feedback.
-
demo: https://jsfiddle.net/chrisbolin/hjy9v9z4/
Usually when using Victory with real-time datasets (i.e. that grow over time) the visible domain will keep "growing" to accommodate new data.
However, once you zoom the first time with VictoryZoomContainer, you cannot get back to the state where the visible domain automatically grows. No matter how much you zoom out, you are still stuck with static view.
Beta Was this translation helpful? Give feedback.
All reactions