MS Chart AxisX标签应该对齐而不是交替

时间:2013-03-14 09:14:46

标签: c# asp.net mschart

有了这里的图像,我希望我的AxisX标签(Mar Apr May Jun ... Totals)完全对齐,而不是如图所示交替。我应该修改哪些属性?如果你能尽快提供答案,我们非常感激。

enter image description here

1 个答案:

答案 0 :(得分:0)

经过多次修补,我终于找到了解决上述问题的财产。

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;

enter image description here