Setting color to Labels in Bar Chart

Thread is closed for posting
3 posts, 0 answers
  1. Krishna Samaga
    Krishna Samaga avatar
    15 posts
    Member since:
    Oct 2009

    Posted 10 Feb 2010 Link to this post

    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. Schlurk
    Schlurk avatar
    812 posts
    Member since:
    May 2009

    Posted 10 Feb 2010 Link to this post

    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 :)
  3. Krishna Samaga
    Krishna Samaga avatar
    15 posts
    Member since:
    Oct 2009

    Posted 11 Feb 2010 Link to this post

    Cool! This works :)

    Thanks for the timely reply!
Back to Top