Hi,
I’m using SCiChart version 2.0 and trying to use the VisibleRange in realtime mode with zooming mode on DateTime axis. I want to when chart is zooming I see only zoom area, and chart shouldn’t be calculate VisibleRange, after that, when I’m double clicking on the surface, the chart should be continue working in realtime mode.
var visibleMax = (DateTime)Properties.XAxis.VisibleRange.Max; var seriesMax = (DateTime)provider.DataSeries.XMax; if (_lastXMax != null && !Properties.XAxis.VisibleRange.IsZero) { var diff = seriesMax.Subtract((DateTime)_lastXMax); if (visibleMax + diff >= seriesMax) { var existingRange = (DateRange)Properties.XAxis.VisibleRange; var newRange = new DateRange(existingRange.Min, visibleMax + diff); Properties.XAxis.VisibleRange = newRange; } } _lastXMax = provider.DataSeries.XMax;
But when I’m double clicking on the surface, the chart is froze(visible range doesn’t calculate correctly).. How can I calculate the VisibleRange correctly?
Thanks,
Arthur
- Arthur Romanov asked 11 years ago
- You must login to post comments
Hi Arthur,
There isn’t any built-in way to check if chart is zoomed. Alternatively, you could try firing some event after zooming (see Event after zoom in thread), or compare current VisibleRange with actual DataRange.
Best regards,
Yuriy
- Yuriy Zadereckiy answered 11 years ago
- You must login to post comments
Please login first to submit.