seriesDefaults.labels.template String|Function
The template which renders the chart series label.
The fields which can be used in the template are:
- category - the category name. Available for area, bar, column, bubble, donut, funnel, pyramid, line and pie series.
- dataItem - the original data item used to construct the point. Will be null if binding to array.
- percentage - the point value represented as a percentage value. Available for donut, funnel, pyramid and pie series.
- series - the data series
- value - the point value. Can be a number or object containing each bound field.
- runningTotal - the sum of point values since the last "runningTotal" summary point. Available for waterfall series.
- total - the sum of all previous series values. Available for waterfall series.
The text can be split into multiple lines by using line feed characters ("\n").
Example - set the chart series label template
<div id="chart"></div>
<script>
$("#chart").kendoChart({
seriesDefaults: {
labels: {
visible: true,
template: "Value: #: value #%"
}
},
series: [
{ data: [1, 2, 3] }
]
});
</script>