An example of how to implement a custom easing function, here a parameterized bounce. Custom easing functions must return 1 when t ≥ 1, or else transitions will not end on the desired value.
(Warning: many people believe “bounce” easing is gimmicky, and recommend you use the default “cubic-in-out” instead!)
https://d3js.org/d3.v3.min.js