React Native Bar Chart for Expo

Vertical or horizontal bars with rounded corners, grouped or stacked (including 100%), hatched / duotone / striped fills, glow, lollipop shape, negative colours and a hatched buffer bar for in-progress periods.

Also known as: column chart, bar graph.

<BarSeriesChart />10 variants

Live — the real React Native component rendered with react-native-web. Tap, drag and scrub it.

Installation

terminal
npx expo install expo-charts react-native-svg

Usage

Import the component and pass your data. Width defaults to the parent, so it adapts to phones, tablets and rotation.

Like this? There's a lot more in Pro Pro

12 full screens built from the same kit — install them the same way.

See what's in Pro

Props

PropTypeDefault
layout

Bar direction.

"vertical" | "horizontal""vertical"
stacked

Stack series.

booleanfalse
stackOffset

100% stacked bars.

"none" | "expand""none"
radius

Corner radius (outer ends only when stacked).

number6
barShape

Thin stem with a round head.

"bar" | "lollipop""bar"
fillVariant

gradient, gradient-reverse, solid, dotted, lines, hatched, striped, duotone, duotone-reverse.

FillVariantarea: "gradient", bar: "solid"
glow

Glowing bars.

booleanfalse
bufferLast

Hatch the last bar.

booleanfalse
barGap / categoryGap / maxBarSize

Spacing controls.

number4 / 0.25 / 56
negativeColor

Colour for negative values.

string—
getColor

Per-bar colour.

(value, index, key) => string—
labelInside

Horizontal: category label inside the bar.

booleanfalse

Shared cartesian props

Every Area, Bar, Line and Combo chart also accepts these — this is where axes, grid, legend, tooltip, brush and loading live.

PropTypeDefault
data

Rows, e.g. [{ month: "Jan", desktop: 186 }].

Datum[]—
config

Series keys → { label, color, variant, strokeVariant, glow }.

ChartConfig—
xKey

Key of the category / x value in each row.

string—
keys

Subset and order of series to draw.

string[]all config keys
width

Omit to fill the parent and re-flow on rotation.

numberparent width
height

Chart height in points.

number220
showGrid

Horizontal grid lines.

booleantrue
gridStyle

Grid line style.

"solid" | "dashed""solid"
gridVertical

Vertical grid lines at categories.

booleanfalse
showXAxis

Category labels under the chart.

booleantrue
showYAxis

Value ticks.

booleanfalse
yAxisPosition

Side for the value axis.

"left" | "right""left"
yTickCount

Approximate number of ticks.

number4
yDomain

Y range. ["auto", "auto"] fits the data (prices, heart rate, weight).

[number | "auto", number | "auto"]starts at 0
referenceLines

Goal / limit / average lines across the plot.

{ value, label?, color?, dashed? }[][]
connectNulls

Missing values (null, NaN) leave a gap; true draws across them.

booleanfalse
backgroundVariant

dots, grid, cross-hatch, diagonal-lines, plus, tiny-checkers, wiggle-lines, bubbles.

BackgroundVariant"none"
showLegend

Legend under (or above) the chart.

booleanfalse
legendVariant

square, circle, circle-outline, rounded-square, rounded-square-outline, vertical-bar, horizontal-bar.

LegendVariant"rounded-square"
legendPosition

Where the legend sits.

"top" | "bottom""bottom"
legendAlign

Legend alignment.

"left" | "center" | "right""center"
legendMode

Tap to hide a series, or highlight it and dim the rest.

"toggle" | "select" | "none""toggle"
showTooltip

Floating tooltip while scrubbing / after a tap.

booleantrue
tooltipIndicator

Colour marker in tooltip rows.

"dot" | "line" | "dashed""dot"
tooltipVariant

Tooltip surface.

"default" | "frosted-glass""default"
tooltipRoundness

Tooltip corner radius.

"sm" | "md" | "lg" | "xl""lg"
showTooltipTotal

Adds a Total row.

booleanfalse
showLabels

Value labels on points / bars.

booleanfalse
animationType

rise, left-to-right, right-to-left, center-out, edges-in, none.

AnimationType"left-to-right" (bars: "rise")
isLoading

Pulsing skeleton with a Loading badge.

booleanfalse
showBrush

Range selector under the chart for long series.

booleanfalse
formatValue

Formats values in axes, labels and tooltip.

(v, key) => stringcompact (1.2k)
formatLabel

Formats category labels.

(x, index) => stringString(x)
onSelect

Fires while scrubbing, on tap and on VoiceOver swipes.

(index, datum) => void—
activeIndex

Controlled selection shown while the finger is up: the latest value, or a synced chart's point.

number | null—
emptyText

Shown when data is empty.

string"No data"
accessibilityLabel

VoiceOver / TalkBack label. Swipe up / down reads each point.

stringgenerated summary
onScrubStart / onScrubEnd

Pause your ScrollView while the finger scrubs.

() => void—

FAQ

How do I make a bar chart in React Native?
Use ExpoKit's Bar Chart: install the expo-charts package (npx expo install expo-charts react-native-svg) and render <BarSeriesChart data={…} />. It's animated and touchable, and works on iOS, Android, web and in Expo Go.
Does Bar Chart work in Expo Go?
Yes. It draws with react-native-svg, which Expo Go includes, so it runs on iOS and Android with no development build.
Is Bar Chart free?
Yes. Bar Chart is in expo-charts, which is free and MIT-licensed.