I get this cannot read property 'offsetHeight' of null
while i just initialized its height.
Here is my code:
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);
When using
document.getElementById()
you don't have to explicitly type a#
before the id.