chart = {
const svg = d3.create("svg")
.attr("viewBox", [0, 0, 975, 700])
.attr("fill", "#ffe5b6");
svg.append("g")
.attr("transform", "translate(270,50)")
.append(() => legend({color, title: data.title, width: 472, height: 55, tickFormat:"~s"}));
svg.append("g")
.attr("transform", "translate(0,75)")
.attr("stroke", "pink")
.selectAll("path")
.data(topojson.feature(us, us.objects.counties).features)
.join("path")
.attr("fill", d => color(data.get(d.id)))
.attr("d", path)
.append("title")
.text(d => `${d.properties.name}, ${states.get(d.id.slice(0, 2)).name} ${format(data.get(d.id))}`);
svg.selectAll("text")
.style('font-size', '25px');
svg.append("path")
.attr("transform", "translate(0,75)")
.datum(topojson.mesh(us, us.objects.states, (a, b) => a !== b))
.attr("fill", "none")
.attr("stroke", "#FE8267")
.attr("stroke-linejoin", "round")
.attr("d", path);
return svg.node();
}