static void ShowArrayValues(RollingGraphView view, double index, Array values) { if (values.Length != view.Graph.NumSeries) { view.Graph.NumSeries = values.Length; } view.Graph.AddValues(index, values); }
public override void Load(IServiceProvider provider) { view = CreateView(); view.Dock = DockStyle.Fill; GraphHelper.FormatDateAxis(view.Graph.GraphPane.XAxis); GraphHelper.SetAxisLabel(view.Graph.GraphPane.XAxis, "Time"); var visualizerService = (IDialogTypeVisualizerService)provider.GetService(typeof(IDialogTypeVisualizerService)); if (visualizerService != null) { visualizerService.AddControl(view); } }
public override void Load(IServiceProvider provider) { var context = (ITypeVisualizerContext)provider.GetService(typeof(ITypeVisualizerContext)); var lineChartBuilder = (RollingGraphBuilder)ExpressionBuilder.GetVisualizerElement(context.Source).Builder; controller = lineChartBuilder.Controller; view = new RollingGraphView(); view.Capacity = Capacity; view.AutoScale = AutoScale; if (!AutoScale) { view.Min = Min; view.Max = Max; } view.HandleDestroyed += delegate { Min = view.Min; Max = view.Max; AutoScale = view.AutoScale; Capacity = view.Capacity; }; view.NumSeries = controller.NumSeries; view.Dock = System.Windows.Forms.DockStyle.Fill; GraphHelper.FormatOrdinalAxis(view.Graph.GraphPane.XAxis, controller.IndexType); GraphHelper.SetAxisLabel(view.Graph.GraphPane.XAxis, controller.IndexLabel); var visualizerService = (IDialogTypeVisualizerService)provider.GetService(typeof(IDialogTypeVisualizerService)); if (visualizerService != null) { visualizerService.AddControl(view); } }
public override void Unload() { view.Dispose(); view = null; }