Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //apply choropleth
- d3.select("#counties").selectAll(".county")
- .attr("fill", function (d) {
- return getColor(d.properties[attributeArray[currentAttribute]], dataRange);
- })
- .on("mouseover", function (d) {
- d3.select(this)
- div.transition()
- .duration(300)
- div.text(d.properties.County)
- .style("opacity", 1)
- .style("class", "cntyLabel")
- .style("left", (d3.event.pageX) + "px")
- .style("top", (d3.event.pageY) + "px");
- })
- .on("mouseout", function (d) {
- div.transition()
- .duration(300)
- .style("opacity", 0);
- })
Add Comment
Please, Sign In to add comment