Accepted answer

The second example clears the content of the svg (updateProp) but not all the transitions. They still live inside d3.

If you wait till the initial animation is finished

setTimeout(() => {
    data = [];
    data.push({"label": "4", "value": 8});
    data.push({"label": "51", "value": 3});

    pie.updateProp("data.content", data);
}, 5000);

It all works.

I don't know if there is an easy way to get a callback when d3pie is finished with all the animations.

Related Query

More Query from same tag