suiss/uim · Chart

Bar Chart Range

An eight-day forecast where each bar spans the low and high temperature on a shared scale.

Bar Chart Range 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 (range) on iOS in light mode

A horizontal BarChart whose range values are [low, high] pairs, so each bar floats between the two temperatures. Bars use a teal-to-orange gradient over a full-width track, day names sit on the left and highs on the right. The tooltip shows the range in degrees.

Installation

$ pnpm dlx @esuiss/uim@latest add bar-chart-range

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/bar-chart-range.tsx:

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

Usage

import { BarChartRange } from "@/components/charts/bar-chart-range"
<BarChartRange />

Replace chartData with your days and low and high values; the range pair is derived from them. Adjust the hidden XAxis domain to fit your temperature range. The component takes no props.