Skip to content

LinePlot

The LinePlot draws a single line through the provided points. To control how the line is generated change the curveInterpolator prop.

Prop ControlsSHOW

Props

nametypedefaultrequireddescription
curveInterpolator"catmull-rom" | "stair-step" | "straight" | undefined"catmull-rom"Which algorithm to use to connect the points in screenPoints
dataSeriesNumbernumber0Chooses which css variable to activate per line
isActivebooleantruewhen false, the line is hidden from the screen
isPanningbooleanfalsetrue while the user is panning the plot
isZoomingbooleanfalsetrue while the user is zooming the plot
screenPointsNumericPoint[][]the points (in screen space) which a curve should be drawn through
stairStepTopRationumber0.5stairStepTopRatio, position of the data point on a plot where 0 is the left of the stair "top" and 1 is the right side of it (only used when curveInterpolator is stair-step)

Released under the MIT License.