New to Kendo UI for AngularStart a free 30-day trial

Exploding Pie/Donut Chart Series On Click

Environment

ProductProgress® Kendo UI® for Angular Charts

Description

How can I make the Pie or Donut Chart series explode when clicking them?

Solution

  1. Handle the seriesClick event.
html
<kendo-chart (seriesClick)="onClick($event)">
</kendo-chart>
  1. Within the event handler function, toggle the explodeField property and update the Chart data by reference to re-render the Chart.
typescript
public onClick(event: SeriesClickEvent) {
    event.dataItem.explodeField = !event.dataItem.explodeField;
    this.pieData = this.pieData.slice();
}

The following example demonstrates the full implementation of the suggested approach.

Change Theme
Theme
Loading ...

If the requirement is to have only one exploded segment at a time, you will need to change the explodeField property value of any previously exploded items to false when exploding a new one.

Change Theme
Theme
Loading ...

See Also

In this article
EnvironmentDescriptionSolutionSee Also
Not finding the help you need?
Contact Support