config = {
let svg = d3.select("svg#first");
let bounds = svg.node().getBoundingClientRect();
return {
outerWidth: Math.floor(bounds.width),
outerHeight: Math.floor(bounds.height),
innerWidth: Math.floor(bounds.width - margin.right - margin.left),
innerHeight: Math.floor(bounds.height - margin.top - margin.bottom)
};
}