Grand Total on top of the stacked bar chart

Thread is closed for posting
2 posts, 0 answers
  1. Arima
    Arima avatar
    25 posts
    Member since:
    Mar 2011

    Posted 25 Oct 2011 Link to this post


    I want to display the grand total on top of the last series. When i do the DefaultLabelValue for the last chart series, it is overriding the last series label value. Please guide me to achieve the grand total in the stacked bar. Please see the attached image.
    if (cs.Index == chart.Series.Count-1)
                        cs.DefaultLabelValue = "#STSUM";
                        cs.Appearance.LabelAppearance.Position.AlignedPosition = Telerik.Charting.Styles.AlignedPositions.Top;
                        cs.Appearance.LabelAppearance.LabelLocation = Telerik.Charting.Styles.StyleSeriesItemLabel.ItemLabelLocation.Auto;

    Anyone guide me how the calculation is happening for the cs.DefaultLabelValue = "#STSUM"; So that i could add one more series with all the values as 1 and substracting 1 from the total.

  2. Peshito
    Peshito avatar
    493 posts

    Posted 27 Oct 2011 Link to this post

    Hi Arima,

    Using "#STSUM" represents the sum of all stacked items for a given index and you cannot subtracts a value from it. You should manually calculate the sum total value and assign it to the last series which values you want to show as the total sum of all the others.

    Kind regards,
    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. DevCraft R3 2016 release webinar banner
Back to Top