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; }
public static LineGraph AddLineGraph(this Plotter2D plotter, IPointDataSource pointSource, Pen linePen, Description description) { if (pointSource == null) throw new ArgumentNullException("pointSource"); if (linePen == null) throw new ArgumentNullException("linePen"); LineGraph graph = new LineGraph { DataSource = pointSource, LinePen = linePen }; if (description != null) { graph.Description = description; } graph.Filters.Add(new InclinationFilter()); graph.Filters.Add(new FrequencyFilter()); //graph.Filters.Add(new CountFilter()); plotter.Children.Add(graph); return graph; }
/// <summary> /// Initializes a new instance of the <see cref="LegendItem"/> class. /// </summary> /// <param name="description">The description.</param> protected LegendItem(Description description) { Description = description; }