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

Column chart

Vertical columns comparing periods or categories, stacked or grouped.

ChartColumn draws vertical columns. Use it to compare periods (orders per month) or a handful of categories, with stacked: true to show their composition.

Column ChartChartColumn
Connecting to the DMS preview…
ConnectingDMS 0.9.55 options set

Usage

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

static orders = ChartColumn({
  title: "$shop.orders.per_month",
  fetchUrl: "/api/shop/orders-per-month",
  columnWidth: 60,
});

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 Column 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"–
stackedAppearanceboolean–
columnWidthAppearancenumber–
roundedCornersAppearancebooleantrue

Recipes

Columns with a target

Add annotations: [{ y: 1200, label: "Target" }] to draw the goal across the columns.

Next steps

Charts

Colors, annotations, events and the other chart types.

Chart card

Frame the chart with its headline value.