chart = {
const nodes = [...Array(10).keys()].map(i => {
id: i;
});
const height = 100;
const svg = d3.create("svg").attr("viewBox", [-width / 2, -200, width, 400]);
const nodeSelection = svg
.append("g")
.selectAll("circle")
.data(nodes)
.join("circle")
.attr("r", 10)
.attr("fill", "sienna");
const sim = d3.forceSimulation(nodes);
console.log('we never reach this point!');
sim
.force("charge", d3.forceManyBody())
.force("center", d3.forceCenter(width / 2, height / 2))
.on("tick", () => {
nodeSelection.attr("cx", d => d.x).attr("cy", d => d.y);
});
return svg.node();
}