Completed
Last Updated: 22 Feb 2019 15:14 by ADMIN
ADMIN
Danail Vasilev
Created on: 24 Apr 2013 11:37
Category: HtmlChart
Type: Feature Request
22
ADD Grand total labels for stacked column and bar series
As of R1 2017 you can use the stackTotal property of the labels:
https://docs.telerik.com/kendo-ui/controls/charts/how-to/various/show-stack-total

---
old information

For the time being this can be achieved by creating an additional bar/column series with the following settings:

-series items are set with insignificantly small values (e.g. 0.001)

-the name property of the series is not specified, so that it is not visible in the legend

-the color of the series matches the color of the plot area, so that the series items and the legend of the series are not visible

-clienttemplates for the labels of this series is used in order to sum up the grand total and display it

An example on the described scenario can be found in the http://www.telerik.com/support/kb/aspnet-ajax/chart-%28html5%29/details/displaying-grand-total-in-stacked-series-labels-and-pie-series-legend KB article
6 comments
ADMIN
Vessy
Posted on: 22 Feb 2019 15:14
Hi Naveen,

Applied to RadHtmlChart the client template of the labels should look as follows (set to the last series, while the labels of the others are hidden):
<telerik:RadHtmlChart runat="server" ID="ColumnChart1" Transitions="true">
    <PlotArea>
        <Series>
            <telerik:ColumnSeries Name="Product 1" Stacked="true">
                <LabelsAppearance Visible="false"></LabelsAppearance>
                <SeriesItems>
                    <telerik:CategorySeriesItem Y="22" />
                    <telerik:CategorySeriesItem Y="2" />
                </SeriesItems>
            </telerik:ColumnSeries>
            <telerik:ColumnSeries Name="Product 2">
                <LabelsAppearance Visible="false"></LabelsAppearance>
                <SeriesItems>
                    <telerik:CategorySeriesItem Y="11" />
                    <telerik:CategorySeriesItem Y="1" />
                </SeriesItems>
            </telerik:ColumnSeries>
            <telerik:ColumnSeries Name="Product 3">
                <LabelsAppearance>
                    <ClientTemplate>#= stackValue #</ClientTemplate>
                </LabelsAppearance>
                <SeriesItems>
                    <telerik:CategorySeriesItem Y="33" />
                    <telerik:CategorySeriesItem Y="3" />
                </SeriesItems>
            </telerik:ColumnSeries>
        </Series>
    </PlotArea>
</telerik:RadHtmlChart>

I hope this helps.

Regards,
Vessy
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Naveen
Posted on: 16 Feb 2019 08:19
Plese give example for asp.net ajax
Tom
Posted on: 12 Jun 2017 20:22
4 years in - no progress?
Pablo
Posted on: 22 Dec 2014 20:37
This feature is very needed, please look at how highcharts do it; they call it StackLabels

http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/yaxis/stacklabels-enabled/
Brad
Posted on: 14 Aug 2014 01:02
The control looks nice and all but it won't be much use in a production environment without this
Ariel
Posted on: 03 Jul 2013 16:48
I understand a work-around exists, but it seems a bit 'hokey' to make this work that way, to me. I would love to see this feature go live!