suiss/uim · Chart

Bar Chart Default

A single series of rounded vertical bars showing desktop visitors over six months.

Bar 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
Bar on iOS in light mode

The baseline bar chart inside a Card: one rounded bar per month, a month axis, a dashed horizontal grid and a tooltip without a label. Start here and add series, stacking or labels as needed.

Installation

$ pnpm dlx @esuiss/uim@latest add bar-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/bar-chart-default.tsx:

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

Usage

import { BarChartDefault } from "@/components/charts/bar-chart-default"
<BarChartDefault />

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