Skip to content
Uxelith
Sign in
Prov1.0.0Data

Area Chart

Trends over time: lines draw themselves in, the crosshair glides between points, the area you've scrubbed stays bright, and the tooltip shows the change from the point before.

Installs with Uxelith ProHow
Licence
Pro
Packages
2
Updated
10 Oct 2026
Live

Installation

Usage

example.tsx
import { AreaChart } from "@/components/area-chart"

export function Traffic() {
  return (
    <AreaChart
      title="Weekly visitors"
      series={[{ key: "visitors", label: "Visitors" }]}
      data={[
        { label: "W1", visitors: 4200 },
        { label: "W2", visitors: 5100 },
        { label: "W3", visitors: 6900 },
        { label: "W4", visitors: 7400 },
      ]}
    />
  )
}

Props

PropTypeDefaultDescription
data({ label: string } & Record<string, number | string>)[]—One entry per point along the x axis.
series{ key: string; label: string; color?: string }[]—One or more lines.
titlestring—Names the chart and captions its data table.
showTitlebooleantrueShow the title above the chart.
curve"smooth" | "linear""smooth"Monotone curve (never overshoots) or straight segments.
fillbooleantrueGradient fill under each line.
format(value: number) => string—Formats axis, tooltip and table values.
formatOptions / localeIntl.NumberFormatOptions / stringcompactNumber format without a function.
heightnumber240Plot height in pixels.
legendbooleanautoShown when there's more than one series.
--chart-1 … --chart-3CSS variable--primary…Series colours.

Accessibility

  • A labelled figure, with every value in a real (visually hidden) table.
  • Tab into the chart, then ←/→ move between points and Home/End jump; each point is announced with every series, e.g. "W3: Visitors 6.9K, Signups 1.2K".
  • The tooltip follows keyboard focus as well as the pointer.
  • Lines appear at once under prefers-reduced-motion.

Changelog

  1. v1.0.0Latest

    First release.

More in Data

All 9 in Data
  • DataFree

    Avatar Stack

    Overlapping avatars that spread on hover, with a name tooltip that swings with the pointer, status dots and a +N list of everyone else. Photos or initials.

  • DataPro

    Bar Chart

    A responsive bar chart, grouped or stacked: bars rise in one after another, the hovered column lights up and the tooltip glides, with keyboard navigation and a hidden data table.

  • DataPro

    Data Table

    A real, accessible table with natural sorting where rows glide into place, highlighted search, pagination, drawn checkboxes and a bulk-action bar. Typed columns, custom cells, two densities.