سؤال

I have set my MS chart look like this :

Y axis min = -100 ; max = 100
X axis min = -100 ; max = 100

my MS chart now

But I hope I can set the MS chart Y-axes and X-axes position cross at the center which is look exactly like this:

MS chart I want

Is it possible to do it?

هل كانت مفيدة؟

المحلول

Use the Axis.Crossing property. Given your ranges, you'd set

chart.ChartAreas[0].AxisX.Crossing = 0;
chart.ChartAreas[0].AxisY.Crossing = 0;
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top