LineChart
Last updated
Last updated
A component to draw line charts.
springConfig
This prop will define the motion of the chart.
spring Presets
There are presets to use for springConfig with different combinations of mass, tension and friction. More information can be found here. See the following example to see how to use them.
Presets: springs.lazy
, springs.smooth
, springs.swift
, springs.instant
total
The expected total (x axis of the chart). When not provided, the length of values
is used instead.
width
The width of the chart. When not set, the SVG takes the width of its parent.
height
Type: Number
Default: 200
The height of the chart.
dotRadius
The radius of every dot in the chart.
animDelay
The delay before displaying the chart the first time it gets rendered.
borderColor
The border color.
labelColor
The label color.
reset
Can be used to restart the transition. Set to true
, then to false
again.
lines
Pass the values that will be used to draw the lines. The color atribute in Subtypes overrides the color
prop.
label
Example:
This function gets called to render a label on the x axis.
color
This function gets called to render the color of a line.
TYPE | DEFAULT VALUE |
---|---|
TYPE | DEFAULT VALUE |
---|---|
TYPE | DEFAULT VALUE |
---|---|
TYPE | DEFAULT VALUE |
---|---|
TYPE | DEFAULT VALUE |
---|---|
TYPE | DEFAULT VALUE |
---|---|
TYPE | DEFAULT VALUE |
---|---|
TYPE | DEFAULT VALUE |
---|---|
TYPE | DEFAULT VALUE |
---|---|
TYPE | SUBTYPES | DEFAULT VALUE |
---|---|---|
TYPE |
---|
TYPE |
---|