Line chart with stacking ability.
Given an array of data series having an id and a nested array of points
(with x, y properties), it will compute the line for each data series.
All datum having null x or y will be treated as holes, thus portions
of the corresponding line will be skipped.
The responsive alternative of this component is ResponsiveLine
.
This component is available in the @nivo/api
, see
sample or
try it using the API client .
See the dedicated guide on how to setup
legends for this component.
chart code dataroll the dice Start interacting with the chart to log actions
Base
Chart width, not required when using responsive variant.
Chart height, not required when using responsive variant.
Customization
Defines the order of layers and add custom layers. Points
Enable/disable points.
Overrides default point circle. The function will receive `size`, `color`, `borderWidth` and `borderColor` props and must return a valid SVG element. inherit theme custom
theme property
Method to compute points color. Width of the points border. inherit theme custom
inherited property
modifiers
No modifier.
Method to compute points border color. Property to use to determine point label. If a function is provided, it will receive current point data and should return the desired label. Label Y offset from point shape. Interactivity
onMouseEnter handler, doesn't work with slice tooltip. onMouseMove handler, doesn't work with slice tooltip. onMouseLeave handler, doesn't work with slice tooltip. onClick handler, doesn't work with slice tooltip. Enable/disable slices tooltip for x or y axis, automatically disable mesh. Crosshair type, forced to slices axis if enabled. Legends
bottom-right
Defines legend anchor relative to chart's viewport. Legend block x translation. Legend block y translation. Spacing between each item. Motion
Motion config for react-spring, either a preset or a custom configuration.