Candlestick Chart for Angular
Introduction
Section titled “Introduction”Accessible SVG candlestick chart: daily open-high-low-close prices as candles (rising hollow, falling filled, so direction never depends on color alone) or OHLC bars, an optional volume pane, and simple moving-average overlays. The time axis is a day axis; with a business calendar it counts trading days only, skipping weekends and holidays. Crosshair, zoom and pan, keyboard navigation along the sessions, tooltips, a generated summary, and the data table are built in.
- Trading daysWith a business calendar, weekends and holidays take no space on the axis.
- Direction by shapeRising candles are hollow and falling ones filled, so color is never the only cue.
- Volume and averagesAn optional volume pane and up to four moving averages with legend toggles.
- Zoom and crosshairToolbar, keyboard, wheel, and drag zoom with a crosshair on the focused session.
Behavior, design tokens, and limitations are described on the Candlestick Chart page; this page covers the Angular API.
Live example
Section titled “Live example”import { Component } from '@angular/core';import { plainDate } from '@absoluteui/core';import { AuiCandlestickChart } from '@absoluteui/angular/candlestick-chart';import type { CandlestickPoint } from '@absoluteui/components/candlestick-chart';
@Component({ selector: 'app-equity', imports: [AuiCandlestickChart], template: `<aui-candlestick-chart label="Equity" [data]="data" [zoom]="true"></aui-candlestick-chart>`,})export class EquityComponent { readonly data: CandlestickPoint[] = [ { date: plainDate(2026, 1, 5), open: 10, high: 11, low: 9.5, close: 10.8 }, { date: plainDate(2026, 1, 6), open: 10.8, high: 11.2, low: 10.1, close: 10.2 }, ];}Install and start
Section titled “Install and start”npm install @absoluteui/angular @absoluteui/components @absoluteui/core @absoluteui/themeSetup with provideAbsoluteUI() is covered in Getting started. Styles are included with the component.
import { AuiCandlestickChart } from '@absoluteui/angular/candlestick-chart';Defaults for every instance: provideAbsoluteUIConfig({ components: { candlestickChart: { ... } } }) (see Configuration).
API reference
Section titled “API reference”<aui-candlestick-chart>
Section titled “<aui-candlestick-chart>”Class AuiCandlestickChart; template reference #ref="auiCandlestickChart".
Server rendering: Renders on the server; the browser re-creates it after hydration.
Inputs
Section titled “Inputs”| Input | Type | Default | Description |
|---|---|---|---|
label |
string |
Required. Chart title: visible text and the accessible name of the plot (aria-labelledby); also the data table caption. | |
hideLabel |
boolean |
false |
Visually hide the title; it stays the accessible name. |
description |
string |
Visible description below the title, also referenced by aria-describedby (text only). | |
summary |
string |
Replaces the generated accessible summary (session count, date range, first and last close with the change, highest high and lowest low, sessions not plotted). | |
valueFormat |
NumberFormatOptions |
Number format for prices (tooltips, accessible names, table, summary, ticks). | |
formatValue |
(value: number) => string |
Custom value text; overrides valueFormat everywhere. | |
theme |
ChartTheme |
Look and feel: { palette?: string[] (1-8 CSS colors for slots 1-8); fontFamily?; fontSize? (8-32 px); textColor?; gridLines?: boolean; gridColor?; gridDash?; axisColor?; lineWidth?; markerSize?; cornerRadius?; barRadius?; cellRadius?; sliceRadius?; boxRadius?; swatchRadius?; tooltipRadius?; controlRadius?; lineJoin?; areaOpacity?; gradient?; valueLabelColor?; tooltip?: { background?, color?, borderColor? }; legendPosition?: ‘top’ | ‘bottom’ | ‘start’ | ‘end’; animation?: boolean | { duration?: number } }. Applied as –aui-chart-* custom properties and classes on the host through the CSSOM (CSP-safe); colors are validated with CSS.supports(‘color’). Animation is opt-in and never runs with prefers-reduced-motion: reduce or [data-aui-animation=‘none’]. | |
renderTooltip |
ChartTooltipRenderer |
Custom tooltip content as DOM nodes (never HTML strings). context: { title, rows: { label, value, seriesId }[], column, row, source: “pointer” | “focus” | “sync” }. Return null for the default tooltip. The tooltip stays aria-hidden; the focused mark keeps its accessible label. | |
syncGroup |
string |
Synchronized crosshair: charts with the same group show the crosshair and tooltip at the same column (session index) when one is hovered or focused. Use charts with the same sessions. | |
data |
readonly CandlestickPoint[] |
Required. Sessions: { date: PlainDate (strictly increasing); open, high, low, close: finite numbers (high >= open, close, low; low <= open, close); volume?: number >= 0 }. At most 20,000. | |
type |
CandlestickChartType |
'candle' |
Candles (hollow when rising, filled when falling) or OHLC bars (falling bars dashed). |
volume |
boolean |
true |
Volume pane below the prices when the data has volume. |
movingAverages |
readonly CandlestickMovingAverage[] |
Up to 4 simple moving averages of the close: { period: 2-250 sessions; id?: string (default “ma<period>”); label?: string; color?: 1-8; style?: ChartSeriesStyle }. | |
businessCalendar |
BusinessCalendarEngine | null |
Business calendar (createBusinessCalendar from @absoluteui/components/business-calendar): the axis counts trading days only, so weekends and holidays take no space; sessions on non-working days are not plotted and are listed in the summary. Without it the axis is a calendar-day axis with gaps. | |
priceAxis |
Omit<ValueAxisInput, "includeZero"> |
Price axis: { label?, min?, max?, tickCount? (2-20) }. | |
volumeFormat |
NumberFormatOptions |
Volume format (tooltips, table, pane label). Default compact notation. | |
zoom |
boolean |
false |
Zoom and pan over time: toolbar buttons, + / - / 0 keys, Ctrl/Cmd + wheel, drag to pan, Shift + drag to select. |
legend |
ChartLegendMode |
'auto' |
Legend of the moving averages (toggle buttons): auto shows it when there is at least one average, show always, hide never. |
dataTable |
ChartTableMode |
'toggle' |
Data table fallback (date, open, high, low, close, volume, and every moving average): behind a Show data table button (built on first open), always visible, visually hidden (screen readers only), or none. |
tooltip |
boolean |
true |
Tooltip on pointer hover and keyboard focus. |
patterns |
boolean |
false |
Dash patterns on the moving averages (WCAG 1.4.1). Candles are always hollow (rising) or filled (falling). Forced-colors mode always shows them. |
height |
number |
'300' |
Plot height in CSS px (integer 120-2000); the width follows the container. |
crosshair |
boolean |
true |
Crosshair lines (time and price) on the hovered or focused session. |
locale |
string |
'en-US' |
Number, date, and message locale. |
direction |
Direction |
'ltr' |
rtl mirrors the time axis and swaps ArrowLeft/ArrowRight. |
Two-way bindings
Section titled “Two-way bindings”| Model | Type | Change output | Description |
|---|---|---|---|
[(hiddenSeries)] |
readonly string[] |
(hiddenSeriesChange) |
Ids of hidden moving averages (legend toggles). |
[(zoomRange)] |
ChartZoomRange | null |
(zoomRangeChange) |
Visible axis range { from, to } in axis positions (trading-day or day index from the first session); null shows everything. |
Outputs
Section titled “Outputs”| Output | Payload | Description |
|---|---|---|
(pointClicked) |
ChartPointClickDetail |
A candle was activated: pointer click or tap, or Enter / Space on the focused candle. label is the date, column the session index, value the formatted close. Re-emits aui-point-click. |
(seriesToggled) |
ChartSeriesToggleDetail |
A moving average was shown or hidden from the legend. Re-emits aui-series-toggle. |
(zoomed) |
ChartZoomDetail |
The visible range changed (also announced politely). Re-emits aui-zoom. |
Methods
Section titled “Methods”Call them through a viewChild query or a template reference.
| Method | Description |
|---|---|
setSeriesVisible(id: string, visible: boolean): void |
Show or hide an item programmatically (no event). |
Accessibility and performance
Section titled “Accessibility and performance”Pattern: SVG time-series chart as a named, described group (role=“group” with aria-roledescription “candlestick chart”) of role=“img” candles with roving focus along the sessions; a legend of toggle buttons for moving averages; zoom toolbar; data table fallback.
The Angular component renders the framework-neutral component, so its keyboard support, roles, WCAG 2.2 criteria, budgets, and import cost apply unchanged: see Candlestick Chart: Accessibility and performance.
(c) 2026 Kasadara Technology Solutions Pvt Ltd. AbsoluteUI is free to use under the AbsoluteUI Free Use License; it is not open source.