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

Candlestick chart

Open, high, low and close per period, for prices and other ranged values.

ChartCandlestick draws one candle per period from its open, high, low and close: each point is { x, y: [open, high, low, close] }. Use it for prices, or any value whose range within a period matters.

Candlestick ChartChartCandlestick
Connecting to the DMS preview…
ConnectingDMS 0.9.55 options set

Usage

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

static price = ChartCandlestick({
  title: "$billing.credits.price",
  fetchUrl: "/api/billing/credits/ohlc",
  xaxisType: "datetime",
});

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 Candlestick 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"–

Recipes

Click a candle

POINT_CLICK carries the candle's tuple in values (value is null), so a watched action can open the period it stands for.

Next steps

Charts

Colors, annotations, events and the other chart types.

Chart card

Frame the chart with its headline value.