block by mapsam 6195407

D3: .datum() test

Full Screen

This example shows how adding geographic data with the .datum() function creates one large svg element instead of multiple elements. The hover effect highlights the element, which happens to be the entire extent. Using .data() and .enter() will allow you to interact with each element separately because each is created in a separate iteration. See how to interact with topojson files.

index.html