.append(() =>
color: nullcolorforlegend,
title: "Not Ranked",
width: 50,
tickFormat: ".1f"
})
);
svg.append("g")
.attr("transform", "translate(360,20)")
.append(() =>
legend({
color: color_4,
title: data_4.title,
width: 500,
tickFormat: ".1f"
})
);
svg.append("g")
.selectAll("path")
.data(states.features)
.join("path")
.attr("stroke", "black")
.attr("stroke-linejoin", "round")
.attr("stroke-width", 1)
.attr("fill", function(d){
console.log(color_4(data_4.get(d.properties.STATE_NAME)))
return color_4(data_4.get(d.properties.STATE_NAME));
})
.attr("fill", d => color_4(data_4.get(d.properties.STATE_NAME)))
.attr("d", path_1)
.append("title")
.text(d => " Coal Production (short tons) " + data_4.get(d.properties.STATE_NAME));
return svg.node();
}