[data-reveal]{opacity:1!important;transform:none!important}
AntelopeJS DMS
DocumentationMixed chart

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.

Mixed Chart ChartMixed
Connecting to the DMS preview…
Connecting DMS 0.25.8 5 options set

Usage

src/pages/dashboard.ts 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
title Contentstring–
description Contentstring–
color Appearancestring | string[]–
height Appearancestring–
width Appearancenumber–
showTooltip Appearancebooleantrue
showLegend Appearancebooleantrue
legendPosition Appearance"top" | "bottom"–
showGrid Appearancebooleantrue
yRange.min* Appearancenumber–
yRange.max* Appearancenumber–
comparisonStyle Appearance"dashed" | "solid" | "dimmed"–
smooth Appearancebooleantrue
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.

Next steps

Charts

Colors, annotations, events and the other chart types.

Chart card

Frame the chart with its headline value.