Fill-Rule Evenodd
✓ Published0🌍 Public
Mmbostock
Last edited Feb 8, 2016
Created on Mar 15, 2011
This example demonstrates how the SVG `fill-rule: evenodd` property affects the rendering of US state boundaries. When a user hovers over a state, its corresponding path is displayed in steel blue with a semi-transparent fill, while all other states are hidden. The code uses D3’s `d3.geo.path` with an Albers projection and TopoJSON to load geographic data from `us.json`. A separate invisible hover layer manages mouse events, toggling visibility through `mouseovered` and `mouseouted` functions.
AI-generated descriptiongpl-3.0 Licensed