Page 1 of 1
Modifying fonts and colors
Posted: Fri Jun 09, 2006 12:18 pm
by 9078681
Hello,
What properties do I modify to change the following at Runtime?
1) Chart Grid Color
2) Chart Line Color (the color of the line connecting each data point)
3) X and Y axis label Font Name
4) X and Y axis label Font Size
5) X and Y axis label Font Color
Thanks very much...
Posted: Fri Jun 09, 2006 1:20 pm
by narcis
Hi NewToThis1,
Please find below the answers to your questions:
1) Chart Grid Color
Code: Select all
tChart1.Axes.Bottom.Grid.Color = Color.Red;
tChart1.Axes.Left.Grid.Color = Color.Red;
2) Chart Line Color (the color of the line connecting each data point)
This may depend on the series style you are using and how is your chart set. In a 2D line series would be:
Code: Select all
line1.LinePen.Color = Color.Green;
3) X and Y axis label Font Name
Code: Select all
tChart1.Axes.Left.Labels.Font.Name = "Verdana";
tChart1.Axes.Bottom.Labels.Font.Name = "Verdana";
4) X and Y axis label Font Size
Code: Select all
tChart1.Axes.Left.Labels.Font.Size = 18;
tChart1.Axes.Bottom.Labels.Font.Size = 18;
5) X and Y axis label Font Color
Code: Select all
tChart1.Axes.Left.Labels.Font.Color = Color.Blue;
tChart1.Axes.Bottom.Labels.Font.Color = Color.Blue;
Posted: Sat Jun 10, 2006 6:27 pm
by 9078681
Thank you Narcis!!
You are a life saver.