# Treemap — React Native chart for Expo

> Squarified tiles.

Part-to-whole as tiles with automatic readable text colour.

- Docs: https://expokit.in/docs/charts/treemap
- Tier: Pro (ExpoKit Pro plan)
- Component: `<TreemapChart />`
- Category: Specialty
- Also called: treemap, tree map chart, hierarchy chart
- Platforms: iOS, Android, web
- Expo Go: yes (draws with react-native-svg)
- Variants: Treemap

## 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? }[]` | — | Tiles. |
| `gap / radius` | `number` | `3 / 8` | Tile spacing & corners. |
| `colors` | `string[]` | `theme palette` | Tile colours. |

## FAQ

### How do I make a treemap in React Native?

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

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

Treemap 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/treemap
- 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
