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.
ChartArea Connecting to the DMS preview…
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
| Option | Type | Default | Description |
|---|---|---|---|
titleContent | string | – | |
descriptionContent | string | – | |
colorAppearance | string | string[] | – | |
heightAppearance | string | – | |
widthAppearance | number | – | |
showTooltipAppearance | boolean | true | |
showLegendAppearance | boolean | true | |
legendPositionAppearance | "top" | "bottom" | – | |
showGridAppearance | boolean | true | |
yRange.min*Appearance | number | – | |
yRange.max*Appearance | number | – | |
comparisonStyleAppearance | "dashed" | "solid" | "dimmed" | – | |
smoothAppearance | boolean | true | |
curveAppearance | "smooth" | "straight" | "stepline" | – | |
xaxisTypeAppearance | "category" | "datetime" | "numeric" | – | |
fillOpacityAppearance | number | – | |
stackedAppearance | boolean | – |
Recipes
Inside a chart card
ChartArea is the usual chart of a chart card: ChartCard({ …, chart: ChartArea({ comparisonStyle: "dashed" }) }).

