Mixed chart
Lines, areas, columns and range bands sharing one axis, one type per series.
ChartMixed draws each series with its own type on one shared x axis: columns for volume, a line for a rate, a band for a range. seriesDefs names each series' type and color.
ChartMixed Connecting to the DMS preview…
Usage
import { ChartMixed } from "@antelopejs/interface-dms/base/chart";
import { ChartType } from "@antelopejs/interface-dms/base/chart-type";
static funnel = ChartMixed({
title: "$shop.funnel.orders_and_visits",
fetchUrl: "/api/shop/funnel",
seriesDefs: [
{ name: "Orders", type: ChartType.COLUMN },
{ name: "Visits", type: ChartType.LINE, color: "info" },
],
});
The route answers { series } in the shape listed under Data shapes. Wrap the chart in a ChartCard to add a headline value and a comparison.
Options
| Option | Type | Default | Description |
|---|---|---|---|
title Content | string | – | |
description Content | string | – | |
color Appearance | string | string[] | – | |
height Appearance | string | – | |
width Appearance | number | – | |
showTooltip Appearance | boolean | true | |
showLegend Appearance | boolean | true | |
legendPosition Appearance | "top" | "bottom" | – | |
showGrid Appearance | boolean | true | |
yRange.min* Appearance | number | – | |
yRange.max* Appearance | number | – | |
comparisonStyle Appearance | "dashed" | "solid" | "dimmed" | – | |
smooth Appearance | boolean | true | |
curve Appearance | "smooth" | "straight" | "stepline" | – | |
xaxisType Appearance | "category" | "datetime" | "numeric" | – |
Recipes
A band with a median
Declare one series as ChartType.RANGE_AREA and another as ChartType.LINE to draw a percentile band with its median on top.
