Expanded Pie Slice

Posted by: marcus.nixon on 15 April 2019, 12:08 am EST

  • Posted 15 April 2019, 12:08 am EST

    When I click a slide of the pie, it automatically expands outwards, which is cool. However, clicking the same slice again does not return it back to the previous location. To do that, I have to click outside the area of the pie. Is there a way to make it collapse back when clicking the slice again?

  • Posted 15 April 2019, 5:15 pm EST

    Hi,

    You could add a click event listener to the pie chart and check whether the previously selected index is the same as the newly selected index. If they are same, then set the selectedIndex to -1.

    Please refer to the following sample demonstrating the same:

    https://jsfiddle.net/bgqhx1je/

    Regards

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels