LineChart
Chart
Categorical-x series lines with nice y ticks, gridlines, and a legend for multiple series.
Playground
Every control sets a real prop of LineChartProps. The JSX below updates as you go.
Web
iOS
Android
JSX · LineChartProps
Variants
8 examples from src/charts/line-chart/line-chart.md, each rendered live from its own JSX.
Anatomy
1
Chart frame
2
Series
3
Axis labels
4
Legend
5
Gridlines
Dimmed parts appear only in some states or variants.
Props
3 props on LineChartProps, grouped as they are declared in source. Required props are marked *.
CartesianSeriesProps · the shared labels · series · title · max · min · success · destructive · curved · compact · plain · hideLegend · hideGrid · hideAxes · formatValue · selected · defaultSelected · onSelect · testID · style props.
Accessibility and keyboard
Keyboard
Tab
Focuses the plot
ArrowLeft
ArrowRight
Steps through points when inspectable
Escape
Clears the inspected point
Semantics
No role of its own in source; it reads as the content it renders.
Platform skins
The playground's props on each platform: same tree, native shapes, type and touch sizes.
Usage
curved draws a monotone cubic that never overshoots the data, dots marks each datum, and baseline + fade give the trading-app price idiom (dashed previous close, gain/loss auto tone, gradient fill). A series that means success or failure carries its own success / destructive tone instead of a ramp color. Press or scrub the plot to inspect a category.
Tokens
Read from the playground render. Values follow the scheme and the ion hue.
--c1
--c2
--fd
--fm
--ft
--ln
--sf
--sh-sm
--tx2
--tx3