This demo shows how we can fix toggling of nodes in a multi-level Sunburst chart via legend using events.
Code
legend.itemContainers.template.events.on("click", function(e) {
root.events.once("frameended", function() {
series.selectDataItem(series.get("selectedDataItem"));
})
});
legend.itemContainers.template.events.on("click", function(e) {
root.events.once("frameended", function() {
series.selectDataItem(series.get("selectedDataItem"));
})
});
Example
See the Pen Sunburst chart by amCharts team (@amcharts) on CodePen.