public static LineAndMarker <ElementMarkerPointsGraph> AddLineGraph(this Plotter2D plotter, IPointDataSource pointSource, Pen linePen, ElementPointMarker marker, Description description) { if (pointSource == null) { throw new ArgumentNullException("pointSource"); } var res = new LineAndMarker <ElementMarkerPointsGraph>(); if (linePen != null) // We are requested to draw line graphs { LineGraph graph = new LineGraph { DataSource = pointSource, LinePen = linePen }; if (description != null) { NewLegend.SetDescription(graph, description.Brief); graph.Description = description; } if (marker == null) { // Add inclination filter only to graphs without markers // graph.Filters.Add(new InclinationFilter()); } graph.Filters.Add(new FrequencyFilter()); res.LineGraph = graph; plotter.Children.Add(graph); } if (marker != null) // We are requested to draw marker graphs { ElementMarkerPointsGraph markerGraph = new ElementMarkerPointsGraph { DataSource = pointSource, Marker = marker }; res.MarkerGraph = markerGraph; plotter.Children.Add(markerGraph); } return(res); }
public static LineAndMarker<ElementMarkerPointsGraph> AddLineGraph(this Plotter2D plotter, IPointDataSource pointSource, Pen linePen, ElementPointMarker marker, Description description) { if (pointSource == null) throw new ArgumentNullException("pointSource"); var res = new LineAndMarker<ElementMarkerPointsGraph>(); if (linePen != null) // We are requested to draw line graphs { LineGraph graph = new LineGraph { DataSource = pointSource, LinePen = linePen }; if (description != null) { graph.Description = description; } if (marker == null) { // Add inclination filter only to graphs without markers graph.Filters.Add(new InclinationFilter()); } graph.Filters.Add(new FrequencyFilter()); //graph.Filters.Add(new CountFilter()); res.LineGraph = graph; plotter.Children.Add(graph); } if (marker != null) // We are requested to draw marker graphs { ElementMarkerPointsGraph markerGraph = new ElementMarkerPointsGraph { DataSource = pointSource, Marker = marker }; res.MarkerGraph = markerGraph; plotter.Children.Add(markerGraph); } return res; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 7 "..\..\..\..\View\ChartView.xaml" ((techdata_charting_wpf.View.ChartView)(target)).Loaded += new System.Windows.RoutedEventHandler(this.UserControl_Loaded); #line default #line hidden return; case 2: this.chartPlotter = ((Microsoft.Research.DynamicDataDisplay.ChartPlotter)(target)); return; case 3: this.dateAxis = ((Microsoft.Research.DynamicDataDisplay.Charts.HorizontalDateTimeAxis)(target)); return; case 4: this.countAxis = ((Microsoft.Research.DynamicDataDisplay.Charts.Axes.VerticalIntegerAxis)(target)); return; case 5: this.lineGraph = ((Microsoft.Research.DynamicDataDisplay.LineGraph)(target)); return; case 6: this.temp = ((Microsoft.Research.DynamicDataDisplay.ElementMarkerPointsGraph)(target)); return; case 7: #line 87 "..\..\..\..\View\ChartView.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click); #line default #line hidden return; case 8: this.lnkHelp = ((System.Windows.Documents.Hyperlink)(target)); return; } this._contentLoaded = true; }