suiss/uim · Chart

Area Chart Linear

A single filled area whose points are joined by straight lines instead of a curve.

Area Chart Linear is an open-source mobile chart from suiss/uim, drawn with react-native-svg for React Native and Expo, with SwiftUI and Jetpack Compose versions built from the same design tokens. The @esuiss/uim CLI copies its source into your project, so you own the code.

iOS
Area (linear) on iOS in light mode

The same one-series area as the default chart, with type="linear" so each month connects to the next with a straight segment. It has a month axis, a dashed grid and a tooltip with a line indicator.

Installation

$ pnpm dlx @esuiss/uim@latest add area-chart-linear

The CLI also adds what it builds on: Card, Chart.

Manual

  1. Add the pieces it builds on: Card, Chart.

  2. Copy the source into components/charts/area-chart-linear.tsx:

uniwind/components/charts/area-chart-linear.tsx
import {
  Card,
  CardContent,
  CardDescription,
  CardHeader,
  CardTitle,
} from "@/components/ui/card"
import {
  Area,
  AreaChart,
  CartesianGrid,
  type ChartConfig,
  ChartContainer,
  ChartTooltip,
  ChartTooltipContent,
  XAxis,
  1. Update the import paths to match your project.

Usage

import { AreaChartLinear } from "@/components/charts/area-chart-linear"
<AreaChartLinear />

Replace chartData with your records and change each dataKey to match your fields. Set the label and color of the series in chartConfig. The component takes no props.