/// <summary> /// Foundational constructor on the series class /// </summary> /// <param name="name">Name of the series</param> /// <param name="type">Type of the series</param> /// <param name="index">Index position on the chart of the series</param> public Series(string name, SeriesType type, int index) { Name = name; SeriesType = type; Index = index; Unit = "$"; Color = Color.Empty; ScatterMarkerSymbol = ScatterMarkerSymbol.None; }
/// <summary> /// Foundational constructor on the series class /// </summary> /// <param name="name">Name of the series</param> /// <param name="type">Type of the series</param> /// <param name="index">Index position on the chart of the series</param> /// <param name="unit">Unit for the series axis</param> public Series(string name, SeriesType type, int index, string unit) { Name = name; SeriesType = type; Index = index; Unit = unit; Color = Color.Empty; ScatterMarkerSymbol = ScatterMarkerSymbol.Circle; }
/// <summary> /// Constructor method for Chart Series /// </summary> /// <param name="name">Name of the chart series</param> public Series(string name) { Name = name; SeriesType = SeriesType.Line; Unit = "$"; Index = 0; Color = Color.Empty; ScatterMarkerSymbol = ScatterMarkerSymbol.None; }
/// <summary> /// Foundational constructor on the series class /// </summary> /// <param name="name">Name of the series</param> /// <param name="type">Type of the series</param> public Series(string name, SeriesType type) { Name = name; SeriesType = type; Index = 0; Unit = "$"; Color = Color.Empty; ScatterMarkerSymbol = ScatterMarkerSymbol.Circle; }
/// <summary> /// Constructor method for Chart Series /// </summary> /// <param name="name">Name of the chart series</param> /// <param name="type">Type of the chart series</param> /// <param name="unit">Unit of the serier</param> /// <param name="color">Color of the series</param> /// <param name="symbol">Symbol for the marker in a scatter plot series</param> public Series(string name, SeriesType type, string unit, Color color, ScatterMarkerSymbol symbol = ScatterMarkerSymbol.None) { Name = name; Values = new List <ChartPoint>(); SeriesType = type; Unit = unit; Index = 0; Color = color; ScatterMarkerSymbol = symbol; }
/// <summary> /// Constructor method for Chart Series /// </summary> /// <param name="name">Name of the chart series</param> /// <param name="type">Type of the chart series</param> /// <param name="unit">Unit of the serier</param> public Series(string name, SeriesType type = SeriesType.Line, string unit = "$") { Name = name; Values = new List <ChartPoint>(); SeriesType = type; Unit = unit; Index = 0; Color = Color.Empty; ScatterMarkerSymbol = ScatterMarkerSymbol.None; }
/// <summary> /// Gets Series if already present in chart, else will add a new series and return it /// </summary> /// <param name="name">Name of the series</param> /// <param name="type">Type of the series</param> /// <param name="index">Index position on the chart of the series</param> /// <param name="unit">Unit for the series axis</param> /// <param name="color">Color of the series</param> /// <param name="symbol">Symbol for the marker in a scatter plot series</param> /// <param name="forceAddNew">True will always add a new Series instance, stepping on existing if any</param> public Series TryAddAndGetSeries(string name, SeriesType type, int index, string unit, Color color, ScatterMarkerSymbol symbol, bool forceAddNew = false) { Series series; if (forceAddNew || !Series.TryGetValue(name, out series)) { series = new Series(name, type, index, unit) { Color = color, ScatterMarkerSymbol = symbol }; Series[name] = series; } return(series); }
private static Geometry GetPointGeometry(ScatterMarkerSymbol symbol) { switch (symbol) { case ScatterMarkerSymbol.None: return(DefaultGeometries.Circle); case ScatterMarkerSymbol.Circle: return(DefaultGeometries.Circle); case ScatterMarkerSymbol.Diamond: return(DefaultGeometries.Diamond); case ScatterMarkerSymbol.Square: return(DefaultGeometries.Square); case ScatterMarkerSymbol.Triangle: case ScatterMarkerSymbol.TriangleDown: return(DefaultGeometries.Triangle); default: return(DefaultGeometries.Circle); } }
/// <summary> /// Constructor method for Chart Series /// </summary> /// <param name="name">Name of the chart series</param> /// <param name="type">Type of the chart series</param> /// <param name="unit">Unit of the serier</param> /// <param name="color">Color of the series</param> /// <param name="symbol">Symbol for the marker in a scatter plot series</param> public Series(string name, SeriesType type, string unit, Color color, ScatterMarkerSymbol symbol = ScatterMarkerSymbol.Circle) { Name = name; Values = new List<ChartPoint>(); SeriesType = type; Unit = unit; Index = 0; Color = color; ScatterMarkerSymbol = symbol; }
/// <summary> /// Constructor method for Chart Series /// </summary> /// <param name="name">Name of the chart series</param> /// <param name="type">Type of the chart series</param> /// <param name="unit">Unit of the serier</param> public Series(string name, SeriesType type = SeriesType.Line, string unit = "$") { Name = name; Values = new List<ChartPoint>(); SeriesType = type; Unit = unit; Index = 0; Color = Color.Empty; ScatterMarkerSymbol = ScatterMarkerSymbol.Circle; }
/// <summary> /// Constructor method for Chart Series /// </summary> /// <param name="name">Name of the chart series</param> public Series(string name) { Name = name; SeriesType = SeriesType.Line; Unit = "$"; Index = 0; Color = Color.Empty; ScatterMarkerSymbol = ScatterMarkerSymbol.Circle; }