문제

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? :)

도움이 되었습니까?

해결책

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;

다른 팁

You can use Maximum and Minimum properties of AxisX here.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top