如何更改C#中的MS Charts标签字体大小?
问题描述:
我创建了很少的MS图表。以下代码从我的应用程序中提取它工作正常。但我想增加标签的字体大小。我如何更改标签的字体大小?如何更改C#中的MS Charts标签字体大小?
谢谢。
Series MIN = Chart2.Series.Add("Minimum");
MIN.Points.DataBindXY(listVersion, MIN_list[j]);
MIN.ChartType = SeriesChartType.Line;
MIN.Color = Color.Red;
MIN.BorderWidth = 3;
MIN.IsValueShownAsLabel = true;
MIN.LabelBackColor = System.Drawing.Color.Red;
MIN.LabelForeColor = System.Drawing.Color.White;
答
Chart2.ChartAreas.["yourChartArea"].AxisY.LabelAutoFitStyle = LabelAutoFitStyles.None;
Chart2.ChartAreas.["yourChartArea"].AxisX.LabelStyle.Font
= new System.Drawing.Font("Trebuchet MS", 2.25F, System.Drawing.FontStyle.Bold);
它改变了X轴的标签。其实我想改变图上的标签。请参考这个[图片](http://oi67.tinypic.com/vyxe29.jpg) – Sachith