I'm trying to draw minor gridlines in the center between major gridlines.
chart1.ChartAreas[0].AxisX.MajorGrid.Interval = 4;
chart1.ChartAreas[0].AxisX.MinorGrid.Enabled = true;
chart1.ChartAreas[0].AxisX.MinorGrid.Interval = 3;
chart1.ChartAreas[0].AxisX.MinorGrid.LineColor = Color.Cornsilk;
chart1.ChartAreas[0].AxisX.MinorGrid.LineDashStyle= ChartDashStyle.Solid;
I tried to set different values of chart1.ChartAreas[0].AxisX.MinorGrid.Interval but didn't get expected result.Here what I got so far.
Arrow points to right located minor gridline
I tried to change chart1.ChartAreas[0].AxisX.MinorGrid.IntervalOffset property but it does not change anything. Has someone any suggestions? Thank you in advance.
EDIT Based on TaW's answer tried to set intervals
chart1.ChartAreas[0].AxisX.MajorGrid.Interval = 4;
chart1.ChartAreas[0].AxisX.MinorGrid.Interval = 2;
EDIT 2
It was a good idea proposed by TaW, but since for me was not important LineDashStyle and custom labels are used, I decided to abandon minor lines and instead use major lines and custom labels, plotted for each second line. Issue resolved


