I've been trying to set the position on the X axis from which the data starts getting plotted with no luck. It always start at 1 no matter what. I've tried doing
chartArea.AxisX.Minimum = -1;
chartArea.AxisX.Maximum = 5;
But it doesn't work. Even if I do:
chartArea.AxisX.Minimum = 3;
chartArea.AxisX.Maximum = 6;
The bars will be invisible rather than start at 3.
manaCurveChart.ChartAreas[0].AxisX.IsStartedFromZero = true;
Doesn't seem to do anything either.
EDIT: Here's the code
ChartArea chartArea = manaCurveChart.ChartAreas[0];
chartArea.AxisX.IsStartedFromZero = true;
chartArea.AxisX.Minimum = -1;
chartArea.AxisX.Maximum = 5;
string[] Pets = new string[] { "Dog", "Cat" };
int[] PointArray = new int[] { 1, 2 };
manaCurveChart.Titles.Add("Pets");
for (int i = 0; i < Pets.Length; i++)
{
Series series = manaCurveChart.Series.Add(Pets[i]);
series.Points.Add(PointArray[i]);
}