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

Bar chart

Horizontal bars comparing categories, stacked or grouped.

ChartBar compares categories with bars. Its default orientation is horizontal, which leaves room for long category labels; set orientation: "vertical" or use a column chart for periods.

Bar ChartChartBar
Connecting to the DMS preview…
ConnectingDMS 0.9.54 options set

Usage

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

static tickets = ChartBar({
  title: "$support.tickets.by_team",
  fetchUrl: "/api/support/tickets-by-team",
  stacked: true,
});

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 Bar 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–
barWidthAppearancenumber–
roundedCornersAppearancebooleantrue
orientationLayout"horizontal" | "vertical"–

Recipes

Stack statuses

stacked: true piles the series of each category into one bar: open, pending and closed tickets per team.

Next steps

Charts

Colors, annotations, events and the other chart types.

Chart card

Frame the chart with its headline value.