Stream

Streamgraph — stacked areas on a centered (silhouette) flowing baseline.

Category: chart · WCAG 2.1-AA · chart, stream, streamgraph, area, data-viz

Props

PropTypeDefaultDescription
seriesStreamSeries[]Series, each with values[] aligned to categories.
categories(string | number)[]X-axis labels aligned with each series values.
titlestringTitle text for the component.
descriptionstringSupporting description text.
offset'silhouette' | 'zero'silhouettesilhouette centers the stack (streamgraph); zero is a baseline stack.
curveCurvebasisInterpolation curve.
widthnumberFixed SVG width in px. ⚠ **Omit for a responsive chart** — the chart fills and tracks its container via a ResizeObserver; there is no correct pixel number in a responsive grid. A fixed width is clamped to the container (max-inline-size: 100%) so it can never overflow its card, but it also stops the chart growing. `useChartSize` is NOT needed for this — charts call it internally.
heightnumber300SVG height in px. Unlike `width`, height does NOT track the container — this is the knob you set to change the chart's aspect.
legendbooleanWhether to show the legend.
tooltipbooleanWhether to show tooltips on hover.
classNamestringAdditional CSS class names merged onto the root element.
plainbooleanfalseWhen true, renders a minimal variant without chart chrome.

Design tokens

When to use

When not to use

Examples

Streamgraph

import { Stream } from '@cascivo/charts'

<Stream
  title="Topics over time"
  categories={['Jan','Feb','Mar','Apr']}
  series={[
    { id: 'a', label: 'A', values: [4, 6, 5, 8] },
    { id: 'b', label: 'B', values: [2, 3, 7, 4] },
  ]}
/>

Related components

← Back to docs