suiss/uim · Chart

Line Chart Default

A single smooth line showing desktop visitors across six months.

Line Chart Default 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
Line on iOS in light mode

The baseline line chart inside a Card: one series drawn as a natural curve with a month axis, a dashed horizontal grid and a tooltip. There is no value axis.

Installation

$ pnpm dlx @esuiss/uim@latest add line-chart-default

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/line-chart-default.tsx:

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

Usage

import { LineChartDefault } from "@/components/charts/line-chart-default"
<LineChartDefault />

Replace chartData with your records and change each dataKey to match your fields. Set the label and color in chartConfig, and change the curve with the type prop on Line. The component takes no props.