Skip to content

Chart

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

Group: Data · Kind: native

example
012345MonTue
Runs
Mon3
Tue5
kind · stackedBar
012345MonTue
Runs
Mon3
Tue5
kind · line
012345MonTue
Runs
Mon3
Tue5
kind · area
012345MonTue
Runs
Mon3
Tue5
kind · pie
MonTue
Runs
Mon3
Tue5
kind · donut
MonTue
Runs
Mon3
Tue5
kind · sparkline

Open in the playground

The same specimen painted by React, SwiftUI, Compose and gpui.

exponential-ui-chart on Web
exponential-ui-chart on iOS
exponential-ui-chart on Android
exponential-ui-chart on Desktop
showValues
35012345MonTue
Runs
Mon3
Tue5
Prop Type Required Bindable Description
kind bar | stackedBar | line | area | pie | donut | sparkline yes – The chart form.
categories [string] – yes The x-axis labels, or the pie slices; omit for a sparkline.
series [series] yes yes One per line, bar group or pie ring.
title string – – A title above the chart.
height number – – The whole chart’s height in px (title, legend, axes inside); the width is the box’s. Default 200.
xLabel string – – A caption under the x axis.
yLabel string – – A caption beside the y axis.
min number – – The y-axis floor; defaults to 0.
max number – – The y-axis ceiling; defaults to the largest value.
showAxes boolean – – Draws the axes with tick labels. Default true.
showGrid boolean – – Draws horizontal grid lines at the ticks. Default true.
showLegend boolean – – Draws the legend (2+ series or slices). Default true.
showValues boolean – – Writes each value on its bar, point or slice. Default false.

None.

None.

none

No basic catalog component maps here.

A native component: every renderer paints it directly.

Role: img

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.

Keys Action
ArrowLeft ArrowRight while focused move the tooltip between categories

Recipe parts: Chart/root Chart/title Chart/axis Chart/grid Chart/legend Chart/tooltip Chart/valueLabel

Keyed by: kind :hover :pressed :focus :disabled :checked :open :selected :invalid :dragover

Themes · Write a theme

Sparkline · Table · StatTile