SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

0
0

I’m revisiting a problem I asked about here a year ago. My goal was to create a chart where the visible range is scrolling “window” that advances ahead of the most recent data point when the data hits the edge so that the line is always moving from the center of the chart towards the edge.

I was able to get something to work by inheriting from the NumericAxis type and overriding CalculateDataRange(). I’m trying this again with a more recent version of SciChart (4.2.2) and it looks as though, while CalculateDataRange is still present, it isn’t called when a data point is added to the chart.

My questions are:
a) Since then, is there a better way to create a scrolling window of data?
b) If not, what has taken the place of CalculateDataRange if I were to again attempt to intervene in the calculation of the visible data range when a point is added?

Thanks.

Version
4.2.2.9521
  • You must to post comments
0
0

I think I found the answer to (b) with the chart’s DataRangeChanged event.

  • You must to post comments
0
0

Hi Mike,

Thank you for getting in touch. Concerning your question, the CalculateDataRange() method is called only in the getter of the DataRange property on axis. This is done for performance reasons. The property is used by SciChartScrollbar (Overview), so maybe you stopped using the Overview control and thus the method isn’t called any more.

Besides the DataRangeChanged event, there is a possible alternative in providing a custom ViewportManager. It gives you full control over VisibleRanges on all axes. I think it is the best candidate for your purposes.

Hope this helps!

Best regards,
Yuriy

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.