This is a migrated thread and some comments may be shown as answers.

Bar chart - Label Colors

2 Answers 161 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
awni
Top achievements
Rank 1
awni asked on 07 Sep 2011, 03:46 PM
Hi,
I'm trying to change the font color of the labels in the bar chart. Please see image here:

http://twitpic.com/6hduhh/full


Thanks in advance :)
awni

2 Answers, 1 is accepted

Sort by
0
Accepted
Steve
Telerik team
answered on 08 Sep 2011, 03:07 PM
Hello Awni,

According to your screenshot and Chart Basics help article, you want to change the color and font of the X and Y Axis items and the series item labels.
These changes have to be applied to the TextProperties.Color and TextProperties.Font properties e.g.:

chart1.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Color = System.Drawing.Color.Lime;
chart1.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Font = new System.Drawing.Font("Arial Narrow", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
chart1.PlotArea.YAxis.Appearance.TextAppearance.TextProperties.Color = System.Drawing.Color.Lime;
chart1.PlotArea.YAxis.Appearance.TextAppearance.TextProperties.Font = new System.Drawing.Font("Arial Narrow", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
chart1.Series[0].Appearance.TextAppearance.TextProperties.Color = System.Drawing.Color.Lime;
chart1.Series[0].Appearance.TextAppearance.TextProperties.Font = new System.Drawing.Font("Tunga", 8.25F);

Regards,
Steve
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
awni
Top achievements
Rank 1
answered on 14 Sep 2011, 09:05 PM
Thanks, 
That did the trick and thanks for the Chart Basics article, I had not seen that :)

regards,
awni
Tags
General Discussions
Asked by
awni
Top achievements
Rank 1
Answers by
Steve
Telerik team
awni
Top achievements
Rank 1
Share this question
or