Winforms图表控件更改axislabel字体大小

问题描述 投票:0回答:1

如何更改 Winforms 图表控件中轴标签的字体大小? 我这样创建图表:

chart1.Series.Clear();
        var series = chart1.Series.Add("Difetti");

        foreach (var stat in Stats)
        {
            var pt = series.Points.Add(stat.Count);
            pt.AxisLabel = stat.Nome_TipoDifetto;
            pt.Label = stat.Count.ToString();
        }
winforms charts
1个回答
0
投票

我发现我可以写:

chart1.ChartAreas[0].AxisX.LabelStyle.Font = new Font(chart1.ChartAreas[0].AxisX.LabelStyle.Font.FontFamily, 14);
© www.soinside.com 2019 - 2024. All rights reserved.