How do I do the following with an MSChart?
- Set axes to x: [0 - 1000] and y: [0 - 1].
- Show the gridlines when chart has no points.
- Disable auto adjusting of gridlines.
Note: Setting Axis(X/Y).(Min/Max)imum seems to have no effect if a point exists inside the bounds.
Question 1) is nicely answered by Bentley Davis, by setting the min and max values of the X and Y axes.
Question 3) requires one more property for each axis; the .Interval property. If you do not set the Interval, the MSChart will automatically do a best-fit interval between your declared min and max, thus potentially changing the positioning of the gridlines and the labels.
Question 2): You must add at least 1 data point to some series to display the gridlines. There is no way around this. I add the following series to my Charts when I want to duplicate that behavoir:
The point does not display on the chart, but the gridlines are displayed.
I am not able to recreate your problem. When I set the axes and the grid lines display then I add points the grid lines to not chnage. You seem to say that they do change. Here is the code I am using. I might be able to help if I can see example code.