# Oxygen weaning area chart

> Oxygen flow rate over time, as a step area chart.

A shadcn/ui block from the [@organui](https://organui.com/?utm_source=shadcn.exchange) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/organui/chart-area-oxygen).

- Page, with a live preview: https://shadcn.exchange/r/organui/chart-area-oxygen
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/organui/chart-area-oxygen-light-49edf4dd6401722c.png
- Registry item: https://organui.com/r/chart-area-oxygen.json
- Categories: charts, charts-area
- Listed: 2026-10-22, source last changed 2026-10-22

## Install

```bash
npx shadcn@latest add https://shadcn.exchange/r/organui/chart-area-oxygen.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- npm packages: `recharts`
- Registry items: `card`, `chart`

## Notes from the registry

Oxygen weaning area chart: https://organui.com/charts/area#chart-area-oxygen

## Files

### `registry/base-nova/charts/chart-area-oxygen.tsx`

```tsx
"use client"

import { Area, AreaChart, CartesianGrid, XAxis } from "recharts"

import {
  Card,
  CardContent,
  CardDescription,
  CardFooter,
  CardHeader,
  CardTitle,
} from "@/components/ui/card"
import {
  ChartContainer,
  ChartTooltip,
  ChartTooltipContent,
  type ChartConfig,
} from "@/components/ui/chart"

export const description = "Oxygen flow rate over time, as a step area chart"

// Flow is changed in steps, so the chart holds each value until the next.
const chartData = [
  { time: "00:00", flow: 4 },
  { time: "02:00", flow: 4 },
  { time: "04:00", flow: 3 },
  { time: "06:00", flow: 3 },
  { time: "08:00", flow: 2 },
  { time: "10:00", flow: 2 },
  { time: "12:00", flow: 1 },
  { time: "14:00", flow: 1 },
  { time: "16:00", flow: 0 },
]

const chartConfig = {
  flow: {
    label: "Oxygen (L/min)",
    color: "var(--chart-2)",
  },
} satisfies ChartConfig

export function ChartAreaOxygen() {
  return (
    <Card>
      <CardHeader>
        <CardTitle>Oxygen weaning</CardTitle>
        <CardDescription>Nasal cannula flow, litres per minute</CardDescription>
      </CardHeader>
      <CardContent>
        <ChartContainer config={chartConfig}>
          <AreaChart
            accessibilityLayer
            data={chartData}
            margin={{ left: 12, right: 12 }}
          >
            <CartesianGrid vertical={false} />
            <XAxis
              dataKey="time"
              tickLine={false}
              axisLine={false}
              tickMargin={8}
            />
            <ChartTooltip
              cursor={false}
              content={<ChartTooltipContent hideLabel />}
            />
            <Area
              dataKey="flow"
              type="step"
              fill="var(--color-flow)"
              fillOpacity={0.4}
              stroke="var(--color-flow)"
            />
          </AreaChart>
        </ChartContainer>
      </CardContent>
      <CardFooter className="text-sm text-muted-foreground">
        Off oxygen by 16:00; a fictional patient.
      </CardFooter>
    </Card>
  )
}
```
