chart = {
let path = d3.geoPath()
const width = 900;
const height = 600;
const margin = 30;
const svg = d3
.create("svg")
.attr("viewBox", [-margin, 0, width + margin, height + margin]);
svg
.append("g")
.attr("id", "map")
.selectAll("path")
.data(topojson.feature(india_map, india_map.objects.states).features)
.join("path")
.attr("class", "county")
.attr("stroke", color(20000))
.attr("title", d => d.id + ": " + data.get(d.id))
.attr("fill", d => color(new_data.get(d.id)))
.attr("d", path);
svg
.selectAll("path")
.on("touchmove mousemove", function(event, d) {
d3.select(this)
.attr("fill", "red")
.raise();
})
.on("touchend mouseleave", function() {
d3.select(this)
.attr("fill", d => color(data.get(d.id)))
.lower();
});
return svg.node();
}