StackedBarchart ItemLabelFormat

2 posts, 0 answers
  1. ALAN
    ALAN avatar
    5 posts
    Member since:
    Jan 2012

    Posted 07 Aug 2014 Link to this post


    I have a stacked bar chart and am trying to get the chart to show the % of the category for the specific series.  For example, If I have the following data structure:

    Category: 2014-01
    Series 1:  150
    Series 2:     75

    This generates a stacked bar chart. In the ItemLabel I want to show the relative percentages of each series so that the following is displayed:

    Series 1 label = 66.7%
    Series 2 label = 33.3%

    I have tied using the various formatting options, but none seem to deliver what I want. Any ideas?


  2. Petar Marchev
    Petar Marchev avatar
    968 posts

    Posted 11 Aug 2014 Link to this post

    Hi Alan,

    We have an old RadChart control and a new ChartView set of controls. The new control is much faster than the old component, it resolves many limitations the RadChart has, it is very flexible and easy to set up. If you are indeed using the old RadChart and you have not yet integrated it in your application, we strongly suggest you remove it completely and use the chartview. The answer below concerns a RadCartesianChart (one of the ChartView controls) and not RadChart.

    Even though the chart calculates the values in percentages, the individual series does not know about the rest of the series and there is no direct way you can get the percentage.

    You can create a new Percent property in your actual business item and calculate the percent in your models. Later you can use the LabelDefinition property of the series and specify a Binding (look for the Binding property of the ChartSeiesLabelDefinition), Binding="Percent". Let us know how it goes.

    Petar Marchev
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
  3. DevCraft R3 2016 release webinar banner
Back to Top