Skip to main content Skip to footer

How to draw dotted grid lines or dotted line chart type

If you are wanting to change the line on a FlexChart from a solid line to a dotted line, you can utilize the Axis.MinorGridStyle and Axis.MajorGridStyle properties to customize the style and line patterns for the GridLines.

flexChart1.AxisY.MinorGrid = true;
flexChart1.AxisY.MinorGridStyle.LinePattern = C1.Chart.LinePatternEnum.Dot;
flexChart1.AxisY.MajorGridStyle.LinePattern = C1.Chart.LinePatternEnum.Dot;

flexChart1.AxisX.MinorGrid = true;
flexChart1.AxisX.MinorGridStyle.LinePattern = C1.Chart.LinePatternEnum.Dot;
flexChart1.AxisX.MajorGridStyle.LinePattern = C1.Chart.LinePatternEnum.Dot;

To customize the style and line pattern for the plotted chart line, you can use the Series.Style and Series.SymbolStyle properties. 

var series = flexChart1.Series[0];

series.Style.LinePattern = C1.Chart.LinePatternEnum.Dash;
series.Style.StrokeColor = Color.DarkOliveGreen;

series.SymbolStyle.StrokeColor = Color.DarkOliveGreen;
series.SymbolStyle.FillColor = Color.DarkSlateBlue;