Question

friends! Today I want to ask you next question - how to change points on x-axis?

See what I have.

chart1.Series[0].Points.Clear();
chart1.Series[0].Color = Color.Red;
chart1.Series[0].BorderWidth = 2;
...
for (double i = step; i <= T; i += step)
{...
   chart1.Series[0].Points.AddXY(i, SomeVar);
}

And so I have that. enter image description here

But I don't want to see number 11. Can you understand me what I want? :)

Was it helpful?

Solution

Try to change the min max values of your axis, this will hide the auto generated axis labels.

chart1.ChartAreas[0].AxisX.Minimum = 0;
chart1.ChartAreas[0].AxisX.Maximum = 10;

OTHER TIPS

You can use Maximum and Minimum properties of AxisX here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top