cannot read property 'offsetHeight' of null
当我刚刚初始化它的高度时,我得到了这个。
这是我的代码:
d3.select("#container")
.style("height", "100%")
.style("width", "100%")
.style("position", "relative")
.style("bottom", 0);
var width = document.getElementById("#container").offsetWidth,
height = document.getElementById("#container").offsetHeight,
radius = (Math.min(width, height) / 1.5);