简体   繁体   中英

MS Chart AxisX Labels Should Be Aligned Not Alternating

With the image here, I want my AxisX labels (Mar Apr May Jun ... Totals) to be aligned altogether not alternating as shown. What properties should I modify? Much appreciated if you could provide an answer asap.

在此处输入图片说明

After much tinkering, I finally found a property that solved the problem above.

Chart1.ChartAreas["ChartArea1"].AxisX.LabelAutoFitStyle = LabelAutoFitStyles.WordWrap; 
//This is a style that automatically changes during runtime.
//I added another line for the font size, just to be sure.  Consider it optional.
Chart1.ChartAreas["ChartArea1"].AxisX.LabelAutoFitMinFontSize = 11;

在此处输入图片说明

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