This is the choropleth section of the gallery. If you want to know more about this kind of chart, visit data-to-viz.com. If you're looking for a simple way to implement it in d3.js, pick an example below.
Most basic
The most basic choropleth map you can do in d3.js. Keeping only the core code.Input data format: geoJson
Add hover effect
Highlight the hovered region by playing with stroke and transparency.
Unemployment rate by county in the USA
A beautiful example by Mike Bostock: static choropleth map with legend, and nice color scale
Related chart types