{
var width = 300,
height = 300;
var nodes = [{}, {}, {}, {}, {}];
var simulation = d3
.forceSimulation(nodes)
.force("charge", d3.forceManyBody())
.force("center", d3.forceCenter(width / 2, height / 2))
.on("tick", ticked);
function ticked() {
d3.select("#content1")
.select("svg")
.selectAll("circle")
.data(nodes)
.join("circle")
.attr("r", 5)
.attr("cx", function (d) {
return d.x;
})
.attr("cy", function (d) {
return d.y;
});
}
return "Code for example 1";
}