Text Color of Series Items labels

Thread is closed for posting
3 posts, 0 answers
  1. Randy
    Randy avatar
    3 posts
    Member since:
    Mar 2012

    Posted 06 May 2012 Link to this post

    How do you change the text color of a series item label.  I cannot see some of them sometimes because the color is similar tot he bar and the grid sometimes puts them over the bar.  I can see where to change the fill style like the following code but I want to change the text color itself.

            foreach (ChartSeriesItem c in chrtBar.Series[0].Items)
            {
                //I want to change the text color here.
                c.Label.Appearance.FillStyle.MainColor = System.Drawing.Color.Red;

                

            }
  2. Sia
    Admin
    Sia avatar
    667 posts

    Posted 10 May 2012 Link to this post

    Hi Randy,

    You need to use the TextProperties in order to change the text color as shown below:
    foreach (ChartSeriesItem c in chrtBar.Series[0].Items)
    {
        c.Label.TextBlock.Appearance.TextProperties.Color = Color.Red;
    }

    Greetings,
    Sia
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jason Sheats
    Jason Sheats avatar
    6 posts
    Member since:
    Mar 2009

    Posted 01 Nov 2012 Link to this post

    Thank you very much.  It worked perfectly.
Back to Top