Components / Data

Chart native

A bar, stacked-bar, line, area, pie, donut or sparkline chart with axes, legend and tooltip, as wide as its box.

Children
none
Loading the renderer…
Chart rendered by the React renderer on Web
Web React
Chart rendered by the SwiftUI renderer on iOS
iOS SwiftUI
Chart rendered by the Compose renderer on Android
Android Compose
Chart rendered by the gpui renderer on Desktop
Desktop gpui

View exponential-ui-chart, painted by each native renderer.

kind · bar
kind · stackedBar
kind · line
kind · area
kind · pie
kind · donut
kind · sparkline
showValues
PropTypeDefaultDescription
kindrequiredbar | stackedBar | line | area | pie | donut | sparkline–The chart form.
categoriesbind[string]–The x-axis labels, or the pie slices; omit for a sparkline.
seriesrequiredbind[series]–One per line, bar group or pie ring; coloured $color.chart1..8 unless toned.
titlestring–A title above the chart.
heightnumber200The whole chart's height in px (title, legend, axes inside); the width is the box's.
xLabelstring–A caption under the x axis.
yLabelstring–A caption beside the y axis.
minnumber–The y-axis floor; defaults to 0.
maxnumber–The y-axis ceiling; defaults to the largest value.
showAxesbooleantrueDraws the axes with tick labels.
showGridbooleantrueDraws horizontal grid lines at the ticks.
showLegendbooleantrueDraws the legend (2+ series or slices).
showValuesbooleanfalseWrites each value on its bar, point or slice.

No events, no slots. Children: none.

Role
img
Semantics
img with a generated summary (kind, series, ranges); a data table fallback for screen readers. The painter names it with chartSummary (series, min, max) and offers a data table fallback.
KeysAction
ArrowLeftArrowRight while focusedmove the tooltip between categories
Recipe parts
Chart/rootChart/titleChart/axisChart/gridChart/legendChart/tooltipChart/valueLabel
Keyed by
kind:hover:pressed:focus:disabled:checked:open:selected:invalid:dragover

Themes · Write a theme