suiss/uim · Chart

Line Chart Labeled

A single smooth line with a dot and a printed value at every point.

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

One natural curve with dots on each month and a LabelList above every point, so values are readable without touching the chart. There is no grid; a month axis and a tooltip remain.

Installation

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

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

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

Usage

import { LineChartLabeled } from "@/components/charts/line-chart-labeled"
<LineChartLabeled />

Replace chartData with your records and change each dataKey to match your fields. Change position and offset on the LabelList to move the labels. The component takes no props.