0

I'm building a d3 treemap based off of the zoomable treemap found at http://bl.ocks.org/davetaz/9954190. I have everything working fine in chrome/firefox/etc, but company standard is IE11 so it needs to be compatible. Each time I run it in IE, I get the following error: "Unhandled exception at line 70, column 5... 0x800a138f - JavaScript runtime error: Unable to get property 'children' of undefined or null reference". I've tried a couple of other solutions that have been posted for other issues but none of them seem to work. The error is in the original code itself, in the treemap.js file, and launching the original template results in the same error. It's thrown with the following:

function accumulate(d) {
    return (d._children = d.children)
    ? d.value = d.children.reduce(function (p, v) { return p + accumulate(v); }, 0)
    : d.value;
}

Any help would be appreciated. Thanks!

A. E. A.
  • 1
  • 2
  • D3 uses SVGs to graph and since IE8 does not support SVG it won't work. There are other libraries to help you with the compatibility. – andybeli Jul 05 '16 at 13:40
  • http://stackoverflow.com/questions/17202118/d3-ie8-compatibility – mplungjan Jul 05 '16 at 13:41
  • Welcome to SO. Please visit the [help] and try a search before asking: http://stackoverflow.com/search?q=%5Bd3%5D+ie8 – mplungjan Jul 05 '16 at 13:42
  • My bad - It's IE11. Edited post to reflect. – A. E. A. Jul 05 '16 at 13:43
  • @andybeli: technically speaking, D3 don't use SVGs. It's true that most of D3 charts use SVG, but it's not compulsory: D3 can manipulate ` ` or even simply HTML elements. There are several examples of charts made simply of divs. – Gerardo Furtado Jul 05 '16 at 14:46

0 Answers0