Skip to content
SENVENLI UI

Composed chart

Bars and lines on one plot, with an optional second value axis, for a figure and its rate.
Orders and conversion
import { ComposedChart } from "@senvenli/react/charts";

Examples

One shared axis

Bars and a line in the same unit read against the same scale.

Guidelines

When to use it

  • A count and a rate over the same periods, e.g. orders and conversion.

Use something else when

Accessibility

Built in

  • A "Show as table" button shows the same data as a table, which screen readers get by default.

You provide

  • A title that says what the figure is.

API reference

ComposedChart

title
string

What the chart shows ("Revenue"), over it; leave it out when a card or a heading already says so.

aria-label
string

Names the chart when it has no visible title (a card's heading already says what it shows).

period
string

The period it covers ("June–September 2026").

total
React.ReactNode

The headline figure, in metric-medium ("€ 184,2k").

dataRequired
readonly T[]
indexRequired
keyof T & string

The x key: the period or category of each row.

labels
Readonly<Partial<Record<string, string>>>

Series names by key ("web" → "Website"); the key by default.

indexFormatter
(value: unknown) => string

The index label in the tooltip and the table ("August 2026").

indexLabel
string

The index column's header in the data table; "Period" for time charts, "Category" for BarChart.

height
number

The plot's height in px; 240 by default.

isLoading
boolean
emptyState
React.ReactNode

Shown instead of the plot when there is no data: an EmptyState size="small" or text; "No data" by default.

barsRequired
readonly ComposedSeries<T>[]

Volume: ds-chart-2 bars.

linesRequired
readonly ComposedSeries<T>[]

Rate: ds-chart-1 lines with ringed points.

valueFormattersRequired
{ left: ChartValueFormatter; right: ChartValueFormatter; }

One formatter per axis ("124 orders", "€ 54"); put the units in period or the title.