d3.interpolate(a, b)
Returns an interpolator between the two arbitrary values a and b. The interpolator implementation is based on the type of the end value b, using the following algorithm:
- If b is null, undefined or a boolean, use the constant b.
- If b is a number, use interpolateNumber.
- If b is a color or a string coercible to a color, use interpolateRgb.
- If b is a date, use interpolateDate.
- If b is a string, use interpolateString.
- If b is an array, use interpolateArray.
- If b is coercible to a number, use interpolateNumber.
- Use interpolateObject.
Based on the chosen interpolator, a is coerced to the suitable corresponding type.
Please login to continue.