Skip to content
Uxelith
Prov1.0.0Data

Composed Chart

Bars, lines and areas on one plot, with a second scale when units differ: a guide follows the pointer, legend entries hide a series, and the axes rescale to what is left.

Installs with Uxelith ProHow
Licence
Pro
Packages
2
Updated
5 Nov 2026
Live

Installation

Usage

example.tsx
"use client"

import { ComposedChart } from "@/components/composed-chart"

export function Growth() {
  return (
    <ComposedChart
      title="Revenue and conversion"
      data={[
        { label: "Jan", revenue: 18000, rate: 2.1 },
        { label: "Feb", revenue: 21000, rate: 2.4 },
        { label: "Mar", revenue: 26000, rate: 2.9 },
      ]}
      series={[
        { key: "revenue", label: "Revenue", type: "bar" },
        { key: "rate", label: "Conversion", type: "line", axis: "right" },
      ]}
      formatRight={(n) => `${n}%`}
    />
  )
}

Props

PropTypeDefaultDescription
data{ label: string; [key]: number }[]—One entry per category.
series{ key; label; type; axis?; color? }[]—Each is a bar, line or area, on the left or right axis.
titlestring—Names the chart and its data table.
showTitlebooleantrueShow the title above the chart.
format / formatRight(value: number) => string—Formats each axis, the tooltip and the table.
formatOptions / localeIntl.NumberFormatOptions / stringcompact, visitor's localeNumber format without a function.
heightnumber260Plot height in pixels.
toggleablebooleantrueLet people hide a series from the legend.

Accessibility

  • A labelled <figure>; the full data is also available as a visually hidden table.
  • Tab enters the chart; arrow keys and Home/End move between categories, each announced with all its values.
  • Legend entries are buttons that report whether their series is shown.
  • Bars and lines appear without moving under prefers-reduced-motion.

Changelog

  1. v1.0.0Latest

    First release.

More in Data

All 15 in Data
  • DataPro

    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.

  • 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.