I want to change the Y-axis label font size.
I tried...
AxisY LineColor="64, 64, 64, 64" LabelAutoFitMinFontSize="5"
LabelStyle Font="NanumGothic, 5pt"
and
Chart1.ChartAreas["ChartArea1"].AxisX.LabelStyle.Font.Size = 5;
but it doesn't work. Its size cannot be modified even though I extend or minify it.
Please help me...!! :)
You seem to have forgotten to change auto fit style for this axis. It default setting replaces your font size
Chart1.ChartAreas.["ChartArea1"].AxisY.LabelAutoFitStyle
= LabelAutoFitStyles.None;
Chart1.ChartAreas.["ChartArea1"].AxisX.LabelStyle.Font
= new System.Drawing.Font("Trebuchet MS", 2.25F, System.Drawing.FontStyle.Bold);
You try this may be its working
Chart1.ChartAreas["ChartArea1"].AxisX.TitleFont = new Font("your required font",uyour required size, FontStyle.your required style);
Set Title Color
Chart1.ChartAreas["ChartArea1"].AxisX.ForeColor = Color.Red;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With