basic_workflow = {
const svg = d3.create("svg")
.attr("width", width)
.attr("height", 120);
const data = [1, 2, 3];
const circles = svg.selectAll("circle")
.data(data)
.join(
(enter) => {
const circles_enter = enter.append("circle");
circles_enter.attr("r", 10);
circles_enter.attr("fill", "hsl(216deg 100% 13%)");
return circles_enter;
},
(update) => update,
(exit) => {
return exit.remove();
}
);
circles.attr("cx", (d, i) => d * 10);
circles.attr("cy", (d, i) => i * 50);
return svg.node();
}