Category / Section
How to customize Axes Grid Lines in chartControl?
2 mins read
You can customize the Gridlines by setting its Forecolor and Width property and also to turn of any axis.
C#
this.chartControl1.PrimaryXAxis.GridLineType.ForeColor = Color.BlanchedAlmond ;
this.chartControl1.PrimaryYAxis.GridLineType.ForeColor = Color.IndianRed;
this.chartControl1.PrimaryXAxis.GridLineType.Width = 5;
this.chartControl1.PrimaryXAxis.DrawGrid=false;
this.chartControl1.PrimaryYAxis.DrawGrid=false;
VB
Me.chartControl1.PrimaryXAxis.GridLineType.ForeColor = Color.BlanchedAlmond
Me.chartControl1.PrimaryYAxis.GridLineType.ForeColor = Color.IndianRed
Me.chartControl1.PrimaryXAxis.GridLineType.Width = 5
Me.chartControl1.PrimaryXAxis.DrawGrid = false
Me.chartControl1.PrimaryYAxis.DrawGrid = false