2.0 alpha
These docs describe 2.0. Install it with @once-ui-system/core@alpha.
On 1.8.x? Read the 1.x docs
TrademarkTrademarkDocs
Ctrl k
Search docs...
Data

LineBarChart

Updated: May 14, 2025
View on GitHub
The LineBarChart component provides a way to display line charts with interactive features, including hover effects, click events, and custom styling options. It supports various customization options including different chart types, color schemes, and interactive features. Order decides the shape: the first series is drawn as the line, the second as the bars. There is no prop for it, and only the first two series are drawn — a third is ignored. There is a single y axis, so the two measures are plotted against the same scale. That makes the chart a comparison of two quantities of comparable magnitude — sessions against conversions, budget against spend — not a way to overlay a rate on a volume. Pair a percentage with a count and the percentage collapses onto the baseline: it is not missing, it is drawn at 4 on an axis that runs to 8000. If that is the chart you want, normalise the small series into the same units first, or put the two measures in separate charts. The line's shape comes from curve and the bars' thickness from barWidth — the same props as LineChart and BarChart, which is what makes swapping between the three cheap.
Prop
Type
Default
barWidth
Bar thickness.
numberxllmsxsfill
l
curve
Recharts interpolation for the line: natural, linear, step, stepBefore, stepAfter, monotone, basis, bump and their variants.
curveTypenatural
reverseY
Move the y axis to the right.
booleanfalse
reverseX
Move the x axis to the top.
booleanfalse
legend
Legend position and visibility.
LegendConfig{}
error
Render the error state instead of the chart.
booleanfalse
tooltip
Show a tooltip on hover.
booleantrue
grid
Which grid lines to draw.
xybothnone
y
axis
Which axes to label.
xybothnone
both
loading
Render the loading state instead of the chart.
booleanfalse
border
Panel border colour. false removes it.
Colorssurfacetransparentboolean
neutral-alpha-weak
…and every ChartProps propinherited
…and every FlexProps propinherited
series
First entry is drawn as the line, second as the bars. Further entries are ignored. Both share one y axis.
SeriesConfig[]
Edit this page on GitHub
TrademarkTrademark
Built with curiosity by Lorant One and the Design Engineers Club