3.3.0 • Published 10 months ago

@visx/curve v3.3.0

Weekly downloads
16,078
License
MIT
Repository
github
Last release
10 months ago

@visx/curve

Installation

npm install --save @visx/curve

Overview

The @visx/curve package is a wrapper of the d3-shape curve functions. A curve is a function that can be passed into other visx objects that draw lines or paths, such as a LinePath, 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 visx like so:

import { curveCatmullRomOpen } from '@visx/curve';
let line = (<Shape.LinePath curve={curveCatmullRomOpen} />)

// or if you want namespace all Curves under the `Curve`
import * as Curve from `@visx/curve`;
let line = (<Shape.LinePath curve={Curve.curveCatmullRomOpen} />)

Functions

visxd3
curveBasiscurveBasis
curveBasisClosecurveBasisClosed
curveBasisOpencurveBasisOpen
curveStepcurveStep
curveStepAftercurveStepAfter
curveStepBeforecurveStepbefore
curveBundlecurveBundle
curveLinearcurveLinear
curveLinearClosedcurveLinearClosed
curveMonotoneXcurveMonotoneX
curveMonotoneYcurveMonotoneY
curveCardinalcurveCardinal
curveCardinalClosedcurveCardinalClosed
curveCardinalOpencurveCardinalOpen
curveCatmullRomcurveCatmullRom
curveCatmullRomClosedcurveCatmullRomClosed
curveCatmullRomOpencurveCatmullRomOpen
curveNaturalcurveNatural