img = {
var svg = d3.select("body").append("svg")
.attr("width", "500px")
.attr("height", "500px");
var circle = svg.append("circle")
.attr("cx", 250)
.attr("cy", 250)
.attr("r", 100);
var text = svg.append("text")
.text("Hello, world!")
.style("font-size", "24px")
.style("fill", "#ffcc00")
.style("x", function() { return circle.node().getBoundingClientRect().left + (circle.node().getBoundingClientRect().width / 2); })
.style("y", function() { return circle.node().getBoundingClientRect().top + (circle.node().getBoundingClientRect().height / 2); });
return svg.node();
}