SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components
Our charts receives data over time, so the visual range is continuously updated. This has effects on zooming since it also changes the visual range. So when the user tries to zoom at a part of the chart, the chart goes back to “normal” when a new sample is received (hence moving the time window). How do you solve this problem? I haven’t found any property that can tell me whether the user has zoomed the chart or not.
Many people have used this as a way of solving this problem:
This has the effect that when you mouse-down to zoom, the axis visiblerange stops updating in response to new data-points. Then, when the zoom is performed, the chart is frozen at that point in time. Finally, when you double click, the chart not only zooms to extents but autorange is re-enabled, so it continues to fit the data.
Another different technique is to not use AutoRange, but to manually update the VisibleRange of the chart, depending on whether the last point of the DataSeries is inside the viewport or not. Please see the article How to have a Fixed Scrolling Time-Range on the XAxis that works with Modifiers which explains how we achieved this in the Real Time Stock Charts example example.
Try that example -> Zoom in to the chart and then double click to zoom back out. It only updates the chart’s XAxis and YAxis VisibleRange when not zoomed.
Can you posted your code please to resolve this problem because i have the same problem but i don’t found a solution for this : always when i make the zoom the chart goes back to “normal” when a new sample is received !!
And thank you !
Please login first to submit.