npm install @vx/curve```
npm install --save @vx/curve
The @vx/curve package is a wrapper of the d3-shape curvecurve
functions. A is a function that can be passed into other vx objects that draw lines orLinePath
paths, such as a , to change the way the line between points is drawn. Click on the
example below for an interactive way to explore curve aesthetics.
Any function with the prefix curve in d3 can be used through vx like so:
`javascript
import { curveCatmullRomOpen } from '@vx/curve';
let line = (
// or if you want namespace all Curves under the Curve@vx/curve
import * as Curve from ;``
let line = (
| vx | d3 |
| --------------------- | ----------------------------------------------------------------------------- |
| curveBasis | curveBasis |
| curveBasisClose | curveBasisClosed |
| curveBasisOpen | curveBasisOpen |
| curveStep | curveStep |
| curveStepAfter | curveStepAfter |
| curveStepBefore | curveStepbefore |
| curveBundle | curveBundle |
| curveLinear | curveLinear |
| curveLinearClosed | curveLinearClosed |
| curveMonotoneX | curveMonotoneX |
| curveMonotoneY | curveMonotoneY |
| curveCardinal | curveCardinal |
| curveCardinalClosed | curveCardinalClosed |
| curveCardinalOpen | curveCardinalOpen |
| curveCatmullRom | curveCatmullRom |
| curveCatmullRomClosed | curveCatmullRomClosed |
| curveCatmullRomOpen | curveCatmullRomOpen |
| curveNatural | curveNatural |