legend.inactiveItems.labels.templateString

The template which renders the labels.

The fields which can be used in the template are:

  • text - the text the legend item.
  • series - the data series.
  • value - the point value. (only for donut and pie charts)
  • percentage - the point value represented as a percentage value. Available only for 100% stacked charts.
  • dataItem - the original data item used to construct the point.

Example

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    legend: {
        inactiveItems: {
            labels: {
                template: (data) => `[Inactive] ${data.text}`
            }
        }
    },
    series: [{
        name: "Sales",
        type: "line",
        data: [
            { date: new Date(2023, 0, 1), value: 10 },
            { date: new Date(2023, 0, 2), value: 20 },
            { date: new Date(2023, 0, 3), value: 15 }
        ],
    }]
});
</script>