Chart Mixed
<x-wirekit:: renders a chart where each dataset carries its OWN type (line / bar / area) plus an optional yAxisID pointing at a multi-axis configuration. Both adapters consume the per-dataset type field natively. Chart.js renders bar as vertical bars by default; ApexCharts renders horizontal bars by default and accepts an explicit column synonym for vertical bars at the chart level — to keep examples portable we use bar and let each adapter render its native default.
Basic Example — Revenue (bar) + Growth (line)
Multi-axis Example
Decimals per Series
A series names its own decimals with decimals on its dataset. They take the place of
valueDecimals for that series: in the tooltip, in the list of a chart's linked points, and on
the y-axis that shows it. Counts beside a rate then read 12 and 4.53 rather than 12.00. A
series without decimals keeps the chart's valueDecimals. As valueDecimals itself, it is read
by the ApexCharts adapter only.
An axis takes the decimals of the series it shows: with one axis for every series, the series in its
place, with seriesName, the series it names, and with a single axis, every series, where they all
name the same. A tick those decimals would round, a half step on a scale of counts, keeps the form the
axis writes without them, so no two ticks read alike.
Three-type combo
License note
When the active library is ApexCharts (charts.library => 'apexcharts'), the ApexCharts non-MIT license terms apply — see the License section on the Chart overview page for the full details. WireKit's Chart Mixed glue (this component) is MIT-licensed regardless of which adapter is active.
Further values in the tooltip
The tooltip of a mixed chart can name a value for each point that no series draws: the receipts of
a day beside its revenue and its average receipt. tooltipExtras takes a label and one value per
point, as on the chart:
Props
| Prop | Type | Default | Description |
|---|---|---|---|
labels |
array | [] |
X-axis labels |
datasets |
array | [] |
Each entry must include type + data; optional yAxisID for multi-axis binding, and urls to make its points links, see Linking data points |
options |
array | [] |
Adapter-specific options (e.g. yaxis array for multi-axis) |
height |
string | '380px' |
CSS height |
scope |
string|null | null |
Personalization scope |
library |
string|null | null |
Per-instance chart-library override. Forwards to the underlying <x-wirekit-chart> — see chart Props. |
palette |
string|null | null |
The colors the series take, semantic or categorical. Forwards to the underlying <x-wirekit-chart> — see chart Colors. |
table |
bool|string|null | null |
The data as a table under the chart, disclosure (or true) or screen-reader. Forwards to the underlying <x-wirekit-chart> — see Offer the data as a table. |
wireStream |
string|null | null |
Livewire event name to append points from. Mirrors the chart prop of the same name |
wireStreamMode |
string | 'strict' |
'strict' caps each dataset at wireStreamCap points and drops the oldest first; 'stream' lets the series grow without a bound. Forwards to the underlying <x-wirekit-chart> — see chart Props |
wireStreamCap |
int | 100 |
Maximum points retained while streaming; the oldest are dropped |
annotations |
array | [] |
Annotation definitions forwarded to the underlying chart |
inline |
bool | false |
Render without the surrounding card chrome |
replayable |
bool | false |
Expose a replay control for the entrance animation |
valueDecimals |
int|null | null |
ApexCharts only. Rounds the values in the tooltip to this many decimal places. Forwards to the chart, see Tooltip value formatting |
valuePrefix |
string|null | null |
ApexCharts only. Text written in front of each value in the tooltip, such as € |
valueSuffix |
string|null | null |
ApexCharts only. Text written after each value in the tooltip, such as % |
valueGrouping |
bool|null | null |
ApexCharts only. false writes the values ungrouped; left unset, they group their thousands the locale's way, as on the chart |
tooltipExtras |
array | [] |
Further values the tooltip names for each point without a series of their own, see Further values in the tooltip |
Accessibility
The two patterns on Chart apply unchanged — label the chart
as an image, and give it its data as a table for the full story, which table renders under
the chart. A mixed chart adds one thing to the label.
It carries more than one series and often more than one axis, so the label has to say which is which. "Revenue and growth" leaves a reader guessing whether the line is the growth rate or a second currency figure, and the axis it belongs to is exactly what the picture communicates and the words do not.
{{-- 1. Name each series, its shape, and the axis it reads against. --}}
<x-wirekit::chart-mixed
aria-label="Revenue as bars against the left axis in euros, growth rate as a line against the right axis in percent, January to December 2025."
:labels="$months"
:datasets="$datasets"
/>
The label goes on the chart itself, which is the image: a second role="img" around it would make
the two one image, and the chart's own name, and the table table renders beside it, would
leave the accessibility tree.
With three or more series a label stops being readable. At that point the data table is not the
thorough option, it is the only one: table writes one column per series, each value as the
tooltip writes it — see Offer the data as a table.
Keyboard Interaction
This component is purely presentational and does not respond to keyboard input.
Pitfalls
- Don't mix radically different scales without a multi-axis configuration. A column with values in the millions and a line with values in single digits will compress the line to invisibility on a single y-axis.
- Validate every dataset has a
dataarray. The component throwsInvalidfor malformed input — better to fail loudly than render silently broken charts.Argument Exception
Design Tokens
Mixed charts compose multiple series types in a single canvas — bar + line, area + line, scatter + line, etc. Per-series styling reads the same WireKit color palette as the base Chart component: --color-wk-accent, --color-wk-success, --color-wk-warning, --color-wk-danger, --color-wk-info for the dataset colors; --color-wk-text / --color-wk-text-muted for legend + axis labels; --color-wk-border for the grid; --font-wk-sans for typography.
Dark mode swaps the entire palette atomically when the .dark class toggles on <html> (same Mutation re-paint as the single-type charts).
See Also
- ApexCharts mixed demos for the polished SVG version
- Chart.js advanced patterns for the canvas-based equivalent