Hi all,
I'm trying to create a simple line chart using numeric x and y axes. I would like to have minor grid lines visible, and as long as I let the axes autorange, everything seems to work correctly. However, as soon as I try to manually set the minimum and/or maximum range for an axis, the minor grid lines disappear. Is this the intended behavior? Is there a way to manually set the range of the axis and also display minor grid lines?
As an example, this correctly displays major lines every 100 units, and 9 minor lines between each major line:
ChartAxisTitle primaryTitle = new ChartAxisTitle();
primaryTitle.Text = "X-Axis";
NumericalAxis primaryAxis = new NumericalAxis();
primaryAxis.Title = primaryTitle;
primaryAxis.Interval = 100;
primaryAxis.MinorTicksPerInterval = 9;
primaryAxis.ShowMinorGridLines = true;
chart.PrimaryAxis = primaryAxis;
This, however, displays the major lines spaced 100 units apart, from 0 to 500, but does not display any minor lines or ticks:
ChartAxisTitle primaryTitle = new ChartAxisTitle();
primaryTitle.Text = "X-Axis";
NumericalAxis primaryAxis = new NumericalAxis();
primaryAxis.Title = primaryTitle;
primaryAxis.Interval = 100;
primaryAxis.MinorTicksPerInterval = 9;
primaryAxis.ShowMinorGridLines = true;
primaryAxis.Maximum = 500;
primaryAxis.Minimum = 0;
chart.PrimaryAxis = primaryAxis;