[英]How can i make the label to be left aligned in MS Chart
I am using MS Chart control. 我正在使用MS Chart控件。 I have label on X axis.
我在X轴上有标签。 How can I make the label to be left aligned.
如何使标签左对齐。 Currently by default it is aligned in center.
当前默认情况下,它居中对齐。 For eg in below chart, I want the label like Jun, Jul to start from left.
例如在下面的图表中,我希望像Jun,Jul这样的标签从左开始。
Thanks in advance. 提前致谢。
Try 尝试
chart1.ChartAreas[0].AxisX.Title = "Test Title";
chart1.ChartAreas[0].AxisX.TitleAlignment = StringAlignment.Near;
If your layout is from left to right, StringAlignment.Near will align it left, otherwise it will align it to the right. 如果布局是从左到右,则StringAlignment.Near将其向左对齐,否则将其向右对齐。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.