chart = {
const svg = d3
.create("svg")
.attr("width", width)
.attr("height", height)
.style("border", "1px solid lightgrey");
const gx = drawAxis(svg, xScale, "bottom", height - margin.bottom)[0];
const gy = drawAxis(svg, yScale, "left", margin.left)[0];
const gc = svg.append("g");
const circles = gc
.selectAll("circle")
.data(data)
.join("circle")
.style("fill", "steelblue")
.style("opacity", 0.8)
.attr("cx", (d) => xScale(d.Longitude))
.attr("cy", (d) => yScale(d.Latitude))
.attr("r", 3);
circles.append("title").text((d) => d.FullName);
svg.node().update = function (xScaleNew, yScaleNew) {
circles
.attr("cx", (d) => xScaleNew(d.Longitude))
.attr("cy", (d) => yScaleNew(d.Latitude));
gx.update(xScaleNew);
gy.update(yScaleNew);
};
return svg.node();
resetbutton;
}