@vx/curve
npm install --save @vx/curve
Overview
A curve is a function that can be passed into other vx objects, mainly a LinePath to change the way the line is structured.
For example, checkout the difference between a Curve.natural
:
and a Curve.step
:
The @vx/curve
package is a wrapper over d3-shape curve functions.
Any function with the prefix curve
in d3 can be used through vx
like so:
import { curveCatmullRomOpen } from '@vx/curve';
let line = (<Shape.LinePath curve={curveCatmullRomOpen} />)
import * as Curve from `@vx/curve`;
let line = (<Shape.LinePath curve={Curve.curveCatmullRomOpen} />)
Functions