Shorthand functions

Did you know that you can use a shorthand version for your d3 functions?
When the function you are using expects the same input parameters you can just use the function name instead of creating your own unnamed function.

//instead of
.attr('d', function(d) { return geoGenerator(d); })

//use
.attr('d', geoGenerator)


Written by Mila

See Also

d3 events tips

Small tip for selecting the active element for events

Bubble Map Radius

Small tip for your bubble maps.

Default Projection Paramameters

What are the default projection params in d3.js