MSChart X axis starts at -1 instead of 0

I posted this before, but just registered on the site today,

I tried to use

  YourChartArea.AxisX.IsStartedFromZero = true;

but it still starts with -1: (

I even tried increasing the Xaxis value (+1 value), the data is displayed at point 2 along the X axis, but the X axis still starts at -1.

Any other suggestions please

Thanks in advance

+5
source share
2 answers

I think this may help:

Chart1.ChartAreas [0] .AxisX.Minimum = 0;

+7
source

According to docs this property

, ,

-1, , .

0

All Articles