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

Promises error

Small tip when you hit a async error

d3 events tips

Small tip for selecting the active element for events

Bubble Map Radius

Small tip for your bubble maps.