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

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 Chart ChartArea
Connecting to the DMS preview…
Connecting DMS 0.25.8 6 options set

Usage

src/pages/dashboard.ts 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
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"–
fillOpacity Appearancenumber–
stacked Appearanceboolean–

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.