How to Fix the X Axis values length in Microsoft chart controls

Deadly 提交于 2020-01-25 08:25:06

问题


In My sample, I make the X axis to rotate to -90. Now the label values are vertical. Some of the values are huge like "Sample Quotes".

Due to this huge values, My label area is increased and chart area is decreased.

Is it possible to fix the X axis label length in Microsoft chart controls?


回答1:


I got the answer for this question.

This is possible by

       MSChart.ChartAreas[0].AxisX.LabelAutoFitStyle = LabelAutoFitStyles.WordWrap;
       MSChart.ChartAreas[0].AxisX.IsLabelAutoFit = true;

Regards, Karthik



来源:https://stackoverflow.com/questions/13737162/how-to-fix-the-x-axis-values-length-in-microsoft-chart-controls

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!