score:1

Accepted answer

each an every time depend upon the data svg is newly created. so you have to remove the svg before creation

d3.select("your id name or your class name").select("svg").remove();

in your code, i changed follow as

d3.select("#"+containerid).select("svg").remove();
var svg = d3.select("#"+containerid)

score:0

you could write a update function or update your drawchords to update the data and graph and call it from ajax function. here is a simple example , which is extension of the example you provided. build something like this function. there are numerous examples of d3.js to update graph.


Related Query

More Query from same tag