Skip to content
GaudiGaudi Design System home

Search documentation

Search every page, heading and paragraph.

ComposedChart

Bars, lines and areas on one category axis, with a right-hand axis for a series in other units.

Charts@gaudi/design-system/charts/ComposedChartView in StorybookSource

Installation

pnpm add github:ahmadassaf/design-system recharts

Import from @gaudi/design-system. Load @gaudi/design-system/global.css once and add transpilePackages: ['@gaudi/design-system'] in Next.js.

import { ComposedChart } from '@gaudi/design-system/charts/ComposedChart';

Usage

import { ComposedChart } from '@gaudi/design-system/charts';
<ComposedChart ariaLabel='Weekly views and minutes read' data={weeks} series={[{ key: 'views', type: 'bar' }, { key: 'readTime', type: 'line', axis: 'right' }]} />

Examples

Playground

Storybook

Daily values with a rolling average

Storybook

Stacked bars with a rate line

Storybook

Area behind a line

Storybook

API

18 props

Accessibility

The plot is one tab stop named by ariaLabel. The arrow keys walk the points, Home and End jump to the ends, Enter or Space activates and Escape clears; the active point is drawn and read out politely. Every value is mirrored in a data table, and the SVG is hidden from assistive technology.