简体   繁体   English

MS Chart AxisX标签应对齐且不能交替

[英]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. 使用此处的图像,我希望我的AxisX标签(3月4月5月6月...总计)完全对齐,而不是如图所示。 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;

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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