suiss/uim · Chart

Line Chart Step

A single line drawn as steps, holding each value until the next reading.

Line Chart Step 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 (step) on iOS in light mode

One series with type="step", which draws flat runs and vertical jumps instead of slopes. Use it for values that change at discrete moments. It has a month axis, a dashed grid and a tooltip.

Installation

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

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-step.tsx:

uniwind/components/charts/line-chart-step.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 { LineChartStep } from "@/components/charts/line-chart-step"
<LineChartStep />

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