0

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);
4

1 に答える 1