質問

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