Accepted answer

Not used JSBin a lot so I used JSFiddle :

You can't append a div to svg so you have to create a container like so :

 var svgContainer ='#pieChart');

And then append the svg to this :

var svg = svgContainer.append('svg')

And now use the container for the tooltips :

var tooltip = svgContainer

Related Query

More Query from same tag