简体   繁体   中英

How to set the position of X and Y axes in MS chart?

I have set my MS chart look like this :

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

我的MS图表现在

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图表

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;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM