I can set the chart into the Excel but when I draw a chart using c# the X-Axis value is not have perfect gap.
like if i set
serie1.Points.AddXY(0.003247884, 16808.99);
serie1.Points.AddXY(0.006495768, 16794.35);
serie1.Points.AddXY(0.009743652, 16783.6);
serie1.Points.AddXY(0.012991540, 16767.22);
serie1.Points.AddXY(0.016239420, 16760.1);
serie1.Points.AddXY(0.019487300, 16748.68);
serie1.Points.AddXY(0.022735190, 16729.46);
I want X-serices 1.00000 , 2.00000 , 3.00000 , an so on...
in Excel the chart is

but in C# desktop application

To set the interval:
chart1.ChartAreas[0].AxisX.Minimum = 0;
chart1.ChartAreas[0].AxisX.Interval = 0.01; // Whatever you like
To "ignore" the X-Values and make them 1,2,3,4,etc.:
chart1.Series[0].IsXValueIndexed = true;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With