d3 v4 api interpolate

方法 说明
d3.interpolate interpolate arbitrary values.
d3.interpolateArray interpolate arrays of arbitrary values.
d3.interpolateDate interpolate dates.
d3.interpolateNumber interpolate numbers.
d3.interpolateObject interpolate arbitrary objects.
d3.interpolateRound interpolate integers.
d3.interpolateString interpolate strings with embedded numbers.
d3.interpolateTransformCss interpolate 2D CSS transforms.
d3.interpolateTransformSvg interpolate 2D SVG transforms.
d3.interpolateZoom zoom and pan between two views.
d3.interpolateRgb interpolate RGB colors.
d3.interpolateRgbBasis generate a B spline through a set of colors.
d3.interpolateRgbBasisClosed generate a closed B spline through a set of colors.
d3.interpolateHsl interpolate HSL colors.
d3.interpolateHslLong interpolate HSL colors, the long way.
d3.interpolateLab interpolate Lab colors.
d3.interpolateHcl interpolate HCL colors.
d3.interpolateHclLong interpolate HCL colors, the long way.
d3.interpolateCubehelix interpolate Cubehelix colors.
d3.interpolateCubehelixLong interpolate Cubehelix colors, the long way.
interpolate.gamma apply gamma correction during interpolation.
d3.interpolateBasis generate a B spline through a set of values.
d3.interpolateBasisClosed generate a closed B spline through a set of values.
d3.piecewise generate a piecewise linear interpolator from a set of values.
d3.quantize generate uniformly spaced samples from an interpolator.

var i = d3.interpolateRound(100, 200);
//插值可以理解为将(0,1)映射到(100,200)
i(0.1)
110
i(0.11)
111
i(0.111)
111

你可能感兴趣的:(d3,插值,D3)