private void cbPlotElement_SelectedIndexChanged(object sender, System.EventArgs e) { // Default values SymbolShapeEnum ss = SymbolShapeEnum.Dot; int thickness = 1; if (cbPlotElement.SelectedItem.ToString() == "Points") { c1Chart1.ToolTip.PlotElement = PlotElementEnum.Points; } else { // Hide symbols and increase thickness ss = SymbolShapeEnum.None; thickness = 3; c1Chart1.ToolTip.PlotElement = PlotElementEnum.Series; } // Change appearance of series foreach (ChartDataSeries ds in c1Chart1.ChartGroups[0].ChartData.SeriesList) { ds.SymbolStyle.Shape = ss; ds.LineStyle.Thickness = thickness; } }
public void SetStuff(ChartDataSeries ser) { if (!wasSet) { lineColor = ser.LineStyle.Color; symbolColor = ser.SymbolStyle.Color; symbolShape = ser.SymbolStyle.Shape; wasSet = true; } }
private SymbolShapeEnum NextShape(SymbolShapeEnum ss) { Type t = typeof(SymbolShapeEnum); int iss = (int)ss + 1; if (!Enum.IsDefined(t, iss)) { iss = 0; } return((SymbolShapeEnum)iss); }