benkeen / d3pie

A configurable pie chart lib and generator built on d3.js
MIT License
371 stars 203 forks source link

updateProp header.title.text Bug in Safari, IE #82

Open royhobbstn opened 9 years ago

royhobbstn commented 9 years ago

SVG text elements aren't updated via the .innerHTML property in Safari and IE

which is probably what your d3 call is using: d3.select("#" + this.cssPrefix + "title").html(value);

Instead, try the .textContent property.

Example:

This doesn't work in Safari and IE: pie.updateProp("header.title.text", config.header.title.text);

This does: var titletext = document.getElementById('p0_title'); titletext.textContent=config.header.title.text;