[data-reveal]{opacity:1!important;transform:none!important}
Mixed chart
Components

Mixed chart

Lines, areas, columns and range bands sharing one axis, one type per series.

ChartMixed draws each series with its own type — columns for volume, a line for a rate, a band for a range — on one shared x axis. seriesDefs names each series' type and color.

Mixed ChartChartMixed
Connecting to the DMS preview…
ConnectingDMS 0.9.55 options set

Usage

src/pages/dashboard.ts
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

Options of the Mixed Chart block
OptionTypeDefaultDescription
titleContentstring–
descriptionContentstring–
colorAppearancestring | string[]–
heightAppearancestring–
widthAppearancenumber–
showTooltipAppearancebooleantrue
showLegendAppearancebooleantrue
legendPositionAppearance"top" | "bottom"–
showGridAppearancebooleantrue
yRange.min*Appearancenumber–
yRange.max*Appearancenumber–
comparisonStyleAppearance"dashed" | "solid" | "dimmed"–
smoothAppearancebooleantrue
curveAppearance"smooth" | "straight" | "stepline"–
xaxisTypeAppearance"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.

Next steps

Charts

Colors, annotations, events and the other chart types.

Chart card

Frame the chart with its headline value.