Pre loader

Customising the overview control to limit original data

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

I have a project that shows some data series and their FFTs on a scichart.

Now I need the chart to only show an FFT from a portion of the data series. The overview control’s functionality is perfect for this, but as far as I understand it only shows the parent surface’s data and cannot be bound to ViewModel itself (I’m using MVVM pattern)? So if I bind the overview control to the parent (FFT) control, then the overview shows a part of an FFT, and that’s not what I want.

Is there any way I could use the overview control for limiting the data range of the original data and then processing the data manually? Or do I have to create a custom control for this?

Thanks.

Version
4.2.2.9777
Images
  • You must to post comments
0
0

Hi Alex

Clamping Axis.Visiblerange in SciChart WPF can be achieved with a VisibleRangeChanged event handler

Take a look at Clipping the Axis.VisibleRange on Zoom and Pan

Clipping Axis.VisibleRange in Code To clip the VisibleRange and force a certain maximum or minimum, just use the following code:

axis.VisibleRangeChanged += (s, e) =>
  {
     // e is VisibleRangeChangedEventArgs
     // Assuming axis is NumericAxis
  
     if (e.NewVisibleRange != null && e.NewVisibleRange.Min < 0)
     {
        // Force minimum visiblerange to zero always
        ((NumericAxis)sender).VisibleRange = new DoubleRange(0, e.NewVisibleRange.Max);
     }
  };
  

There are other methods in there such as using VisibleRangeLimit but these have their limitations (no pun intended), such as not clamping when user zoom/pan occurs

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.