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

Bubble Map Radius

Small tip for your bubble maps.

Default Projection Paramameters

What are the default projection params in d3.js

Promises error

Small tip when you hit a async error

d3 events tips

Small tip for selecting the active element for events

Updating your chart in d3.js

How v5 helps clean up your updating code