I have a d3 sunburst chart - based on this example:
https://bl.ocks.org/kerryrodden/7090426
I've added a condition to control d.depth
however as this changes, I need the chart to be refreshed with the new d.depth value.
var nodes = partition.nodes(json)
.filter(function(d) {
return (d.dx > 0.005 && d.depth < $scope.detailLevelForChart);
});
Is there a simple refresh()
method built in or do i have do something like remove the div and redraw the same way as when the page loads?
Any help would be appreciated.
Thanks.