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

Area chart

A filled trend whose volume matters, stacked or overlaid.

ChartArea fills the space under each line. Use it when the volume matters as much as the trend, and stacked: true to show how series add up to a total.

Area ChartChartArea
Connecting to the DMS preview…
ConnectingDMS 0.9.56 options set

Usage

src/pages/dashboard.ts
import { ChartArea } from "@antelopejs/interface-dms/base/chart";

static traffic = ChartArea({
  title: "$marketing.traffic.by_channel",
  fetchUrl: "/api/marketing/traffic",
  periodScope: "marketing",
  stacked: true,
  fillOpacity: 0.4,
});

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 Area 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"–
fillOpacityAppearancenumber–
stackedAppearanceboolean–

Recipes

Inside a chart card

ChartArea is the usual chart of a chart card: ChartCard({ …, chart: ChartArea({ comparisonStyle: "dashed" }) }).

Next steps

Charts

Colors, annotations, events and the other chart types.

Chart card

Frame the chart with its headline value.