# Pixel Bars — React Native chart for Expo

> Grid of squares.

Columns of squares that fill bottom-up, with ghost cells for the empty part.

- Docs: https://expokit.in/docs/charts/pixel-bar
- Tier: Pro (ExpoKit Pro plan)
- Component: `<PixelBarChart />`
- Category: 3D & Pixel
- Also called: pixel bar chart, retro bar chart, 8-bit chart
- Platforms: iOS, Android, web
- Expo Go: yes (draws with react-native-svg)
- Variants: Pixel bars

## Installation

This chart is part of ExpoKit Pro. With a Pro plan, log the CLI in once and add it like any other item:

```bash
npx @expokit/cli@latest login
```

Plans: https://expokit.in/pricing

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `data` | `{ label, value, color? }[]` | — | One block per category. |
| `height` | `number` | `240` | Chart height. |
| `animate` | `boolean` | `true` | Entrance animation. |
| `isLoading` | `boolean` | `false` | Skeleton state. |
| `formatValue` | `(v) => string` | `compact` | Value formatting. |
| `onSelect` | `(item, index) => void` | — | Tap callback. |
| `levels` | `number` | `10` | Squares per column. |
| `gap` | `number` | `2` | Gap between squares. |
| `gradient` | `boolean` | `true` | Fade colour upwards. |

## FAQ

### How do I make a pixel bar chart in React Native?

Use ExpoKit's Pixel Bars: with ExpoKit Pro, the ExpoKit CLI copies the Pixel Bars source into your Expo or React Native app. It's animated and touchable, and works on iOS, Android, web and in Expo Go.

### Does Pixel Bars 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 Pixel Bars free?

Pixel Bars is part of ExpoKit Pro. With a Pro plan, log the CLI in once and it installs the full source into your app.

## More

- Live preview, variants and code: https://expokit.in/docs/charts/pixel-bar
- Every ExpoKit component, screen, template and chart: https://expokit.in/llms.txt
- Install commands and props for every free component: https://expokit.in/llms-full.txt
- Pricing: https://expokit.in/pricing
