Label above the bar

2 posts, 0 answers
  1. Paulo
    Paulo avatar
    56 posts
    Member since:
    Apr 2012

    Posted 16 Apr 2013 Link to this post

    How can I do to put above the bar(series) some information, like a count or sum from my query?

    I need sum two values and to put above the bar. I use StackedBar.

    How can I do to change color the label of my series?
    chartSeries1.Appearance.TextAppearance.TextProperties.Font = new System.Drawing.Font("Arial", 10, System.Drawing.FontStyle.Bold
    );) Style and family ok, but color, how can I do?
  2. Petar Kirov
    Petar Kirov avatar
    425 posts

    Posted 19 Apr 2013 Link to this post

    Hi Paulo,

    1. You can use the ChartSeries.DefaultLabelValue property to specify the series label format and if for more advance scenarios you can use the ItemDataBound event. In the event handler you can use arguments to get the underlying data item and to modify the current series item that is being processed. I have attached a sample project to help you get started.

    2. To specify the color of the label for all series item labels of a chart series, you can use the 
    chartSeries.Appearance.TextAppearance.TextProperties.Color property. To specify the color of an individual series item, you can use the seriesItem.Label.TextBlock.Appearance.TextProperties.Color
    property. I have attached a sample project to demonstrate this.

    Petar Kirov
    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.
Back to Top