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

Setting color to Labels in Bar Chart

2 Answers 114 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Krishna Samaga
Top achievements
Rank 1
Krishna Samaga asked on 10 Feb 2010, 12:08 PM
Hi,

I have a page which contains Telerik RadChart. The Chart Series are dynamically created and displayed as bar graph. I also need to display the values of each bars on Bar Graph. Currently i am able to display the values at the end of each bar, but only concern being the color of value.

Clients are very perticular about the color to be black but i am not able to achieve it. As it is a immidiate requirement, please help me to display the labels on Bars in black color. Please find the graph on the attachment.

Thanks,
Krishna Samaga B.

2 Answers, 1 is accepted

Sort by
0
Schlurk
Top achievements
Rank 2
answered on 10 Feb 2010, 04:26 PM
This is a way to approach this:

myItem.Label.TextBlock.Appearance.TextProperties.Font = new Font("Century Gothic", 10, FontStyle.Italic); 

here "myItem" is of the type ChartSeriesItem. You can also do this:

RadChart1.Series[0].Items[0].Label.TextBlock.Appearance.TextProperties.Font = new Font("Century Gothic", 10, FontStyle.Italic); 

Both approaches should work :)
0
Krishna Samaga
Top achievements
Rank 1
answered on 11 Feb 2010, 01:04 PM
Cool! This works :)

Thanks for the timely reply!
Tags
Chart (Obsolete)
Asked by
Krishna Samaga
Top achievements
Rank 1
Answers by
Schlurk
Top achievements
Rank 2
Krishna Samaga
Top achievements
Rank 1
Share this question
or