public virtual void OnWindowZoomed()
 {
     ResetXYScales();
     _horizontalAxisView.DrawRuler(StartFreqInMHz, EndFreqInMHz);
     VerticalAxisView.DrawRuler(Min, Max, this is PhaseDisplayAdapter);
     WavefromView.Reload();
     WavefromView.DrawGrid();
 }
 public void UpdatePhase([NotNull] double[] instant)
 {
     ResetYScales();
     SampleAverage(instant, _instantDispValues);
     WavefromView.Canvas.Dispatcher.InvokeAsync(
         () => {
         var instantPts = CreateGraphPoints(_dummyAxis, _instantDispValues, _instantPts);
         WavefromView.DrawWaveform(instantPts, Colors.OrangeRed, 0);
     });
     _instantPhaseCache = instant;
 }
 public void UpdateData([NotNull] ISpectrum instant, [NotNull] ISpectrum accumulated)
 {
     // called in background
     SampleAverageAndSquare(instant, _instantDispValues);
     SampleAverageAndSquare(accumulated, _accDispValues);
     WavefromView.Canvas.Dispatcher.InvokeAsync(
         () => {
         var instantPts = CreateGraphPoints(_dummyAxis, _instantDispValues, _instantPts);
         var accPts     = CreateGraphPoints(_dummyAxis, _accDispValues, _accPts);
         //                    WavefromView.ClearWaveform();
         DrawLockIndicator();
         WavefromView.DrawWaveform(instantPts, Colors.OrangeRed, 0);
         WavefromView.DrawWaveform(accPts, Colors.White, 1);
     });
     _instantSpectrumCache     = instant;
     _accumulatedSpectrumCache = accumulated;
 }