score:5

Accepted answer

replace

 .append('p')
    .attr('xmlns', 'http://www.w3.org/1999/xhtml')

with

.append('xhtml:p')

namespaces are special things when creating nodes in javascript and can't be treated as attributes. d3 uses the above syntax to cope with that.


Related Query

More Query from same tag