suiss/uim · Chart

Line Chart Goal

A weekly step count line with a dashed reference line marking a 10,000-step goal.

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

Seven days of steps drawn as a monotone line with dots, a value axis in thousands on the right and a labeled dashed ReferenceLine at GOAL. The tooltip formats the count with thousands separators.

Installation

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

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

Manual

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

  2. Copy the source into components/charts/line-chart-goal.tsx:

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

Usage

import { LineChartGoal } from "@/components/charts/line-chart-goal"
<LineChartGoal />

Replace chartData with your daily values and set GOAL. The component takes no props.