Show Total for Stacked Series
Starting with the 2016 R3 release, a stackValue
field is available in the label template, the series visual, and the event arguments.
It is possible to use this configuration to display the cumulative point value for stacked series, as demonstrated in the example below.
Example
<div id="chart"></div>
<script>
$(function(){
$("#chart").kendoChart({
dataSource:{
data:[{
a: 22,
b: 11,
c: 33
},{
a: 2,
b: 1,
c: 3
}]
},
seriesDefaults: {
type: "column",
stack: true
},
series: [{
field: "a",
name: "a"
},{
field: "b",
name: "b"
},{
field: "c",
name: "c",
labels: {
template: "#= stackValue #",
visible: true
}
}]
});
});
</script>
See Also
- Chart JavaScript API Reference
- Drawing API
- How to Aggregate Data in Pie Charts
- How to Draw on Scatter Plots Surface
- How to Expand Clickable Area of Points
- How to Fit PDF Exported Chart to Page
- How to Handle Right Click in Charts
- How to Place Text in the Center of Donut Charts
- How to Render Custom Plot Bands
- How to Set Different Marker Types for Grouped Line Charts
- How to Use Linear Gradient As Background in Bars
For more runnable examples on Kendo UI Charts, browse the How To documentation folder.