# visx

> Airbnb's low-level D3 + React primitives (scales, shapes, axes) for custom charts.

Source: https://tastebase.ehsanulsiam.workers.dev/browse/visx

free

Airbnb's low-level D3 + React primitives (scales, shapes, axes) for custom charts.

by Airbnb[GitHub](https://github.com/airbnb/visx)[npm](https://npmjs.com/package/@visx/xychart)

[visit](https://visx.airbnb.tech/?utm_source=tastebase&utm_medium=referral&utm_content=detail-page)

[https://visx.airbnb.tech](https://visx.airbnb.tech/?utm_source=tastebase&utm_medium=referral&utm_content=detail-preview)

## Try these

no preview

### [Recharts](https://tastebase.ehsanulsiam.workers.dev/browse/recharts)

Composable SVG charts for React; the engine behind shadcn/ui charts.

no preview

### [nivo](https://tastebase.ehsanulsiam.workers.dev/browse/nivo)

Rich, themeable React charts in SVG, canvas or HTML, with motion and patterns built in.

no preview

### [Unovis](https://tastebase.ehsanulsiam.workers.dev/browse/unovis)

Modular, framework-agnostic charts and network graphs from F5, styled with CSS variables.

no preview

### [Motion](https://tastebase.ehsanulsiam.workers.dev/browse/motion)

The default animation library for React (formerly Framer Motion): springs, gestures, layout and exit animations.

## Looks that pick it

[Academic paperfirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/academic)[Scrollytellingfirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/scrollytelling)[Corporate / dashboard](https://tastebase.ehsanulsiam.workers.dev/looks/corporate)[Fluent](https://tastebase.ehsanulsiam.workers.dev/looks/fluent)[Material Design 2](https://tastebase.ehsanulsiam.workers.dev/looks/material-design)[Healthcare](https://tastebase.ehsanulsiam.workers.dev/looks/healthcare)[Civic / public service](https://tastebase.ehsanulsiam.workers.dev/looks/civic)

## For your agent

##### Install

`npm i @visx/xychart @react-spring/web`

##### Use it for

- bespoke charts that match a design exactly (editorial graphics, custom dashboards)
- chart types other libraries lack: heatmaps, network graphs, annotations
- keeping bundle small by importing only the scale and shape packages you use

##### Skip it when

- a standard bar or line chart needed today: use recharts
- large real-time data: use uplot

##### What's inside16 free

- Line
- Area
- Area Stack
- Bar
- Bar Group
- Bar Stack
- Glyph (scatter)
- Pie / Arc
- Heatmap
- Sankey
- Chord
- Hierarchy (tree, treemap, pack, partition)
- Network
- Geo (maps)
- Wordcloud
- Box plot / Violin (stats)

##### Facts

**Frameworks**
react

**Styling**
unstyled

**Weight**
small

**Accessibility**
ok

**Maturity**
established

**License**
MIT

**Price**
Free

##### Pairs with

[Motion](https://tastebase.ehsanulsiam.workers.dev/browse/motion)

##### Alternatives

[Recharts](https://tastebase.ehsanulsiam.workers.dev/browse/recharts)[nivo](https://tastebase.ehsanulsiam.workers.dev/browse/nivo)[Unovis](https://tastebase.ehsanulsiam.workers.dev/browse/unovis)

[Compare visx with its alternatives](https://tastebase.ehsanulsiam.workers.dev/alternatives/visx-alternatives)

```
import { XYChart, Axis, LineSeries, Tooltip } from '@visx/xychart'

const x = (d: { date: string; value: number }) => d.date
const y = (d: { date: string; value: number }) => d.value

<XYChart height={240} xScale={{ type: 'band' }} yScale={{ type: 'linear' }}>
  <Axis orientation="bottom" />
  <LineSeries dataKey="visits" data={data} xAccessor={x} yAccessor={y} />
  <Tooltip snapTooltipToDatumX showVerticalCrosshair renderTooltip={({ tooltipData }) => <div>{tooltipData?.nearestDatum?.key}</div>} />
</XYChart>
```

https://visx.airbnb.tech/gallery

Loading website

[Visit](https://visx.airbnb.tech/?utm_source=tastebase&utm_medium=referral&utm_content=floating-pill)
