/// <summary> /// Pans the view by the key in the specified vector. /// </summary> /// <param name="view">The view.</param> /// <param name="dx">The horizontal delta (percentage of plot area width).</param> /// <param name="dy">The vertical delta (percentage of plot area height).</param> private static void HandlePan(IPlotView view, double dx, double dy) { dx *= view.ActualModel.PlotArea.Width; dy *= view.ActualModel.PlotArea.Height; view.ActualModel.PanAllAxes(dx, dy); view.InvalidatePlot(false); }
/// <summary> /// Zooms the view by the key in the specified factor. /// </summary> /// <param name="view">The view.</param> /// <param name="args">The <see cref="OxyInputEventArgs" /> instance containing the event data.</param> /// <param name="delta">The zoom factor (positive zoom in, negative zoom out).</param> private static void HandleZoomCenter(IPlotView view, OxyInputEventArgs args, double delta) { args.Handled = true; view.ActualModel.ZoomAllAxes(1 + (delta * 0.12)); view.InvalidatePlot(false); mw.onUpdate(); }
/// <summary> /// Handles the reset event. /// </summary> /// <param name="view">The view to reset.</param> /// <param name="args">The <see cref="OxyInputEventArgs" /> instance containing the event data.</param> private static void HandleReset(IPlotView view, OxyInputEventArgs args) { args.Handled = true; view.ActualModel.ResetAllAxes(); view.InvalidatePlot(false); mw.onUpdate(); }
/// <summary> /// Pans the view by the key in the specified vector. /// </summary> /// <param name="view">The view.</param> /// <param name="args">The <see cref="OxyInputEventArgs" /> instance containing the event data.</param> /// <param name="dx">The horizontal delta (percentage of plot area width).</param> /// <param name="dy">The vertical delta (percentage of plot area height).</param> private static void HandlePan(IPlotView view, OxyInputEventArgs args, double dx, double dy) { args.Handled = true; dx *= view.ActualModel.PlotArea.Width; dy *= view.ActualModel.PlotArea.Height; view.ActualModel.PanAllAxes(dx, dy); view.InvalidatePlot(false); }
public void Append(IPlotView plot, dynamic j) { if (j.Flag == 1) { System.Diagnostics.Debugger.Break(); } // the first message (with data) sets the keys to plot if (Series.Count == 0) { List <string> keys = Util.GetMemberNames(j, true); keys.Remove("T"); keys.Remove("Time"); keys.Remove("Flag"); foreach (string k in keys) { Series.Add(new LineSeries { Title = k }); } } foreach (LineSeries ls in Series) { while (ls.Points.Count > pointLimit) { ls.Points.RemoveAt(0); } try { ls.Points.Add(new DataPoint((double)j.Time, (double)j[ls.Title])); } catch (Exception) { Series.Remove(ls); break; } } plot.InvalidatePlot(); }
/// <summary> /// Zooms the view by the key in the specified factor. /// </summary> /// <param name="view">The view.</param> /// <param name="delta">The zoom factor (positive zoom in, negative zoom out).</param> private static void HandleZoomCenter(IPlotView view, double delta) { view.ActualModel.ZoomAllAxes(1 + (delta * 0.12)); view.InvalidatePlot(false); }
/// <summary> /// Handles the reset events. /// </summary> /// <param name="view">The view to reset.</param> private static void HandleReset(IPlotView view) { view.ActualModel.ResetAllAxes(); view.InvalidatePlot(false); }
/// <summary> /// Zooms the view by the key in the specified factor. /// </summary> /// <param name="view">The view.</param> /// <param name="args">The <see cref="OxyInputEventArgs" /> instance containing the event data.</param> /// <param name="delta">The zoom factor (positive zoom in, negative zoom out).</param> private static void HandleZoomCenter(IPlotView view, OxyInputEventArgs args, double delta) { args.Handled = true; view.ActualModel.ZoomAllAxes(1 + (delta * 0.12)); view.InvalidatePlot(false); }
/// <summary> /// Handles the reset event. /// </summary> /// <param name="view">The view to reset.</param> /// <param name="args">The <see cref="OxyInputEventArgs" /> instance containing the event data.</param> private static void HandleReset(IPlotView view, OxyInputEventArgs args) { args.Handled = true; view.ActualModel.ResetAllAxes(); view.InvalidatePlot(false); }