d3.ease( easingType, [ easeParam1 ], [ easeParam2 ] ) in D3.js

Retrieve a predefined easing function.

Arguments

nametypedescription
easingType String One of the predefined easing types.
easeParam1 String [optional] Additional parameter based on the easing function.
easeParam2 String [optional] Additional parameter based on the easing function.
Return Type
Function

Description

The easing function returned by this method (or that you may supply to transition.ease()) will be supplied the percent of time through the transition (in the range [0,1]) and is expected to yield the percent of the transition that should be shown (again in the range [0,1]).

As described in the official documentation:
The returned value is typically in the range [0,1] as well, but may extend slightly beyond this range for certain easing functions, such as “elastic”.

For more details see https://github.com/mbostock/d3/wiki/Transitions#wiki-d3_ease.

See Also