sy-candlestick-chart

Candlestick

Show four prices per period in a candlestick.

sy-candlestick-chart

Explore changes in opening, high, low, and closing prices.

The example uses fictional prices. Match time zones, trading sessions, and adjusted-price conventions to your actual data.

Base chart tier: Pro. Features such as additional renderers and custom branding have separate entitlement requirements.

InputData description
dataAn array of { time, open, high, low, close, volume? }.
timeScaleordinal reflects trading order; linear reflects elapsed time.
volumeSelect pane to display volume alongside prices.

Complete implementation example

html
<div id="chart-container" style="width: 100%; min-width: 0;"></div>

<script type="module">
  import { defineCustomElement as define0 } from '@syidax/advanced-pro/components/sy-candlestick-chart.js';
  define0();

  // Pro: complete registerLicense at app startup using your issued certificate.
  // The website preview certificate is not for use in customer apps.
  const specs = [
    {
      "id": "example-chart",
      "tag": "sy-candlestick-chart",
      "props": {
        "data": [
          {
            "time": 1767225600000,
            "open": 100,
            "close": 95,
            "high": 103,
            "low": 92,
            "volume": 1200
          },
          {
            "time": 1767312000000,
            "open": 104,
            "close": 106,
            "high": 109,
            "low": 101,
            "volume": 1337
          },
          {
            "time": 1767398400000,
            "open": 107,
            "close": 105,
            "high": 110,
            "low": 102,
            "volume": 1474
          },
          {
            "time": 1767484800000,
            "open": 109,
            "close": 114,
            "high": 117,
            "low": 106,
            "volume": 1611
          },
          {
            "time": 1767571200000,
            "open": 108,
            "close": 109,
            "high": 112,
            "low": 105,
            "volume": 1748
          },
          {
            "time": 1767657600000,
            "open": 106,
            "close": 103,
            "high": 109,
            "low": 100,
            "volume": 1885
          },
          {
            "time": 1767744000000,
            "open": 102,
            "close": 106,
            "high": 109,
            "low": 99,
            "volume": 2022
          },
          {
            "time": 1767830400000,
            "open": 100,
            "close": 100,
            "high": 103,
            "low": 97,
            "volume": 2159
          },
          {
            "time": 1767916800000,
            "open": 98,
            "close": 94,
            "high": 101,
            "low": 91,
            "volume": 2296
          },
          {
            "time": 1768003200000,
            "open": 99,
            "close": 102,
            "high": 105,
            "low": 96,
            "volume": 2433
          },
          {
            "time": 1768089600000,
            "open": 101,
            "close": 100,
            "high": 104,
            "low": 97,
            "volume": 2570
          },
          {
            "time": 1768176000000,
            "open": 105,
            "close": 100,
            "high": 108,
            "low": 97,
            "volume": 2707
          },
          {
            "time": 1768262400000,
            "open": 109,
            "close": 111,
            "high": 114,
            "low": 106,
            "volume": 2844
          },
          {
            "time": 1768348800000,
            "open": 113,
            "close": 111,
            "high": 116,
            "low": 108,
            "volume": 2981
          },
          {
            "time": 1768435200000,
            "open": 115,
            "close": 120,
            "high": 123,
            "low": 112,
            "volume": 1318
          },
          {
            "time": 1768521600000,
            "open": 115,
            "close": 116,
            "high": 119,
            "low": 112,
            "volume": 1455
          },
          {
            "time": 1768608000000,
            "open": 114,
            "close": 111,
            "high": 117,
            "low": 108,
            "volume": 1592
          },
          {
            "time": 1768694400000,
            "open": 111,
            "close": 115,
            "high": 118,
            "low": 108,
            "volume": 1729
          },
          {
            "time": 1768780800000,
            "open": 108,
            "close": 108,
            "high": 111,
            "low": 105,
            "volume": 1866
          },
          {
            "time": 1768867200000,
            "open": 105,
            "close": 101,
            "high": 108,
            "low": 98,
            "volume": 2003
          },
          {
            "time": 1768953600000,
            "open": 105,
            "close": 108,
            "high": 111,
            "low": 102,
            "volume": 2140
          },
          {
            "time": 1769040000000,
            "open": 107,
            "close": 106,
            "high": 110,
            "low": 103,
            "volume": 2277
          },
          {
            "time": 1769126400000,
            "open": 110,
            "close": 105,
            "high": 113,
            "low": 102,
            "volume": 2414
          },
          {
            "time": 1769212800000,
            "open": 114,
            "close": 116,
            "high": 119,
            "low": 111,
            "volume": 2551
          },
          {
            "time": 1769299200000,
            "open": 119,
            "close": 117,
            "high": 122,
            "low": 114,
            "volume": 2688
          },
          {
            "time": 1769385600000,
            "open": 121,
            "close": 126,
            "high": 129,
            "low": 118,
            "volume": 2825
          },
          {
            "time": 1769472000000,
            "open": 123,
            "close": 124,
            "high": 127,
            "low": 120,
            "volume": 2962
          },
          {
            "time": 1769558400000,
            "open": 121,
            "close": 118,
            "high": 124,
            "low": 115,
            "volume": 1299
          },
          {
            "time": 1769644800000,
            "open": 119,
            "close": 123,
            "high": 126,
            "low": 116,
            "volume": 1436
          },
          {
            "time": 1769731200000,
            "open": 116,
            "close": 116,
            "high": 119,
            "low": 113,
            "volume": 1573
          },
          {
            "time": 1769817600000,
            "open": 113,
            "close": 109,
            "high": 116,
            "low": 106,
            "volume": 1710
          },
          {
            "time": 1769904000000,
            "open": 112,
            "close": 115,
            "high": 118,
            "low": 109,
            "volume": 1847
          }
        ],
        "timeScale": "ordinal",
        "volume": "off",
        "width": 640,
        "height": 360,
        "brandPosition": "bottom-right",
        "brandLogo": ""
      }
    }
  ];
  const container = document.querySelector('#chart-container');
  const elements = specs.map(({ tag, id, props }) => {
    const element = document.createElement(tag);
    element.id = id;
    Object.assign(element, props);
    element.setAttribute('aria-label', 'candlestick example chart');
    return element;
  });
  container.replaceChildren(...elements);
  const chart = elements.at(-1);
  const onEvent = event => {
    console.log('pointClick', event.detail);
  };
  chart.addEventListener('pointClick', onEvent);
  const observer = new ResizeObserver(([entry]) => {
    const width = Math.max(160, Math.floor(entry.contentRect.width));
    elements.forEach(element => { element.width = width; });
  });
  observer.observe(container);

  // In an SPA, call this function when the view is disposed.
  function disposeChart() {
    observer.disconnect();
    chart.removeEventListener('pointClick', onEvent);
    container.replaceChildren();
  }
</script>

Properties

data

An array of { time, open, high, low, close, volume? }.

ItemValue
JavaScript propertydata
HTML attributePass objects, arrays, and callbacks as JavaScript properties
TypeCandlestickData
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

width

Chart width in pixels. If the container width changes, update width from a ResizeObserver.

ItemValue
JavaScript propertywidth
HTML attributewidth
Typenumber
Default900

height

Chart height in pixels. Allow space for axes, titles, and the legend.

ItemValue
JavaScript propertyheight
HTML attributeheight
Typenumber
Default360

brandPosition

The corner where the logo is anchored. Community and Pro both support all four corners, using the same position on screen and in image exports.

ItemValue
JavaScript propertybrandPosition
HTML attributebrand-position
Type'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
Default'bottom-right'
Allowed valuestop-left, top-right, bottom-left, bottom-right

xAxis

Configure the horizontal axis type, categories, range, and formatting. For a category axis, match the categories order to the value array indices. Charts supporting multiple axes can accept an axis array.

ItemValue
JavaScript propertyxAxis
HTML attributePass objects, arrays, and callbacks as JavaScript properties
TypeCartesianAxisInput
Defaultundefined
Literals in the typeauto, off

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

yAxis

Configure the vertical axis range, ticks, labels, and direction. Use consistent units for comparisons, and consider a zero baseline when comparing bar lengths.

ItemValue
JavaScript propertyyAxis
HTML attributePass objects, arrays, and callbacks as JavaScript properties
TypeYAxisInput
Defaultundefined
Literals in the typeauto, off

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

gridLines

Allowed values: auto, off. Default: undefined.

ItemValue
JavaScript propertygridLines
HTML attributePass objects, arrays, and callbacks as JavaScript properties
TypeCartesianGridLinesInput
Defaultundefined
Literals in the typeauto, off

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

crosshair

Crosshair that follows the cursor across the plot.

ItemValue
JavaScript propertycrosshair
HTML attributePass objects, arrays, and callbacks as JavaScript properties
TypeCartesianCrosshairInput
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

zoom

Zoom (Storybook parity, 2026-09-10): 'x' | 'y' | 'xy' | true (x) enable the drag rectangle, the pan, the Ctrl + wheel, the pinch and the keyboard (+ / - / Escape) on the primary axes — x narrows the bar window (slots under the ordinal scale, wall time under linear), y the price; an object refines mode / drag / keyboard / minRangePx / resetButton / pan / wheel / pinch / inside. Off by default; the methods (zoomTo / zoomBy / panBy / resetZoom) work regardless of the gesture switches.

ItemValue
JavaScript propertyzoom
HTML attributePass objects, arrays, and callbacks as JavaScript properties
TypeCartesianZoomInput
Defaultundefined
Literals in the typeauto, off, true, false, x, y, xy, inside

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

xMin

Explicit domain ends (an omitted end follows the bars; x-axis / y-axis min / max also set them).

ItemValue
JavaScript propertyxMin
HTML attributex-min
Typenumber
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

xMax

Set as an HTML attribute or JavaScript property. type: number.

ItemValue
JavaScript propertyxMax
HTML attributex-max
Typenumber
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

yMin

Set as an HTML attribute or JavaScript property. type: number.

ItemValue
JavaScript propertyyMin
HTML attributey-min
Typenumber
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

yMax

Set as an HTML attribute or JavaScript property. type: number.

ItemValue
JavaScript propertyyMax
HTML attributey-max
Typenumber
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

padding

The price padding above and below the bars (a fraction of the span; default 0.05).

ItemValue
JavaScript propertypadding
HTML attributepadding
Typenumber
Default0.05

upColor

Set as an HTML attribute or JavaScript property. type: string.

ItemValue
JavaScript propertyupColor
HTML attributeup-color
Typestring
DefaultDEFAULT_UP_COLOR

downColor

Set as an HTML attribute or JavaScript property. type: string.

ItemValue
JavaScript propertydownColor
HTML attributedown-color
Typestring
DefaultDEFAULT_DOWN_COLOR

flatColor

Set as an HTML attribute or JavaScript property. type: string.

ItemValue
JavaScript propertyflatColor
HTML attributeflat-color
Typestring
DefaultDEFAULT_FLAT_COLOR

candleWidth

The body's share of the bar pitch (0 … 1; default 0.7).

ItemValue
JavaScript propertycandleWidth
HTML attributecandle-width
Typenumber
DefaultCANDLE_DEFAULT_WIDTH_RATIO

candleMinPx

Set as an HTML attribute or JavaScript property. type: number.

ItemValue
JavaScript propertycandleMinPx
HTML attributecandle-min-px
Typenumber
DefaultCANDLE_DEFAULT_MIN_PX

candleMaxPx

Set as an HTML attribute or JavaScript property. type: number.

ItemValue
JavaScript propertycandleMaxPx
HTML attributecandle-max-px
Typenumber
DefaultCANDLE_DEFAULT_MAX_PX

wickWidth

The wick width in CSS px.

ItemValue
JavaScript propertywickWidth
HTML attributewick-width
Typenumber
Default1

bodyMinPx

The minimum body height in CSS px (a doji stays visible).

ItemValue
JavaScript propertybodyMinPx
HTML attributebody-min-px
Typenumber
Default1

barStyle

candle (default) or ohlc (a high–low spine, an open tick left, a close tick right); hlc (no open tick). <sy-ohlc-chart> takes ohlc / hlc.

ItemValue
JavaScript propertybarStyle
HTML attributebar-style
TypeCandlestickBarStyle
Default'candle'
Allowed valuescandle, ohlc, hlc, hilo

tickLength

(carry-over D5) — the OHLC / HLC tick length in CSS px (default: the body half-width).

ItemValue
JavaScript propertytickLength
HTML attributetick-length
Typenumber
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

fillAlpha

(carry-over D5) — the band fill alpha 0 … 1 (default 0.12).

ItemValue
JavaScript propertyfillAlpha
HTML attributefill-alpha
Typenumber
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

bodyStyle

solid (default), hollow, or hollow-up (rising bars hollow, falling filled).

ItemValue
JavaScript propertybodyStyle
HTML attributebody-style
TypeCandlestickBodyStyle
Default'solid'
Allowed valuessolid, hollow, hollow-up

bodyBorderPx

the hollow ring's border in CSS px.

ItemValue
JavaScript propertybodyBorderPx
HTML attributebody-border-px
Typenumber
Default1

wickColor

the wick colour; auto follows the body colour.

ItemValue
JavaScript propertywickColor
HTML attributewick-color
Typestring
Default'auto'

antialias

the edge coverage: auto (on while the pitch is at least two device px), on, off.

ItemValue
JavaScript propertyantialias
HTML attributeantialias
TypeCandlestickAntialias
Default'auto'
Allowed valuesauto, off, on

pixelSnap

snap the body and the wick to integer device-px widths (crisp, uniform candles).

ItemValue
JavaScript propertypixelSnap
HTML attributepixel-snap
Typeboolean
Defaulttrue

timeScale

ordinal reflects trading order; linear reflects elapsed time.

ItemValue
JavaScript propertytimeScale
HTML attributetime-scale
TypeCandlestickTimeScale
Default'ordinal'
Allowed valueslinear, ordinal

session

the exchange session the labels read: 24x7, us-equity, or an object / JSON string { timezone, sessions, holidays, closedWeekdays }.

ItemValue
JavaScript propertysession
HTML attributePass objects, arrays, and callbacks as JavaScript properties
TypeCandlestickSessionInput | string
Default'24x7'

labelLocale

the BCP-47 locale of the month labels.

ItemValue
JavaScript propertylabelLocale
HTML attributelabel-locale
Typestring
Default'en-US'

volume

Select pane to display volume alongside prices.

ItemValue
JavaScript propertyvolume
HTML attributevolume
TypeCandlestickVolumeMode
Default'off'
Allowed valuesoff, pane

volumeHeight

the volume pane's share of the plot height (0.05 … 0.8).

ItemValue
JavaScript propertyvolumeHeight
HTML attributevolume-height
Typenumber
Default0.25

volumeUpColor

the volume bar colours; auto follows up-color / down-color.

ItemValue
JavaScript propertyvolumeUpColor
HTML attributevolume-up-color
Typestring
Default'auto'

volumeDownColor

Set as an HTML attribute or JavaScript property. type: string.

ItemValue
JavaScript propertyvolumeDownColor
HTML attributevolume-down-color
Typestring
Default'auto'

volumeAlpha

the volume bars' alpha.

ItemValue
JavaScript propertyvolumeAlpha
HTML attributevolume-alpha
Typenumber
Default0.45

overlays

moving-average overlays over the closes: spec objects { kind, period?, color?, width?, label? }, a JSON string of them, or the compact "sma:20 ema:50"; the kinds are the stock chart's (sma, ema, wma, dema, tema, vwma, hma, linreg). A legend at the top of the price pane names each line and reads its value under the pointer.

ItemValue
JavaScript propertyoverlays
HTML attributePass objects, arrays, and callbacks as JavaScript properties
TypeCandlestickOverlayInput | string
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

chartTitle

The title inside the chart. Explain the data's unit and meaning alongside it.

ItemValue
JavaScript propertychartTitle
HTML attributechart-title
Typestring
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

chartSubtitle

The subtitle inside the chart.

ItemValue
JavaScript propertychartSubtitle
HTML attributechart-subtitle
Typestring
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

enableMouseTracking

Set as an HTML attribute or JavaScript property. type: boolean.

ItemValue
JavaScript propertyenableMouseTracking
HTML attributeenable-mouse-tracking
Typeboolean
Defaulttrue

tooltip

the bar tooltip (the shared cartesian tooltip input: show / trigger / format / html / connector / draggable …).

ItemValue
JavaScript propertytooltip
HTML attributePass objects, arrays, and callbacks as JavaScript properties
TypeCartesianTooltipInput
Defaultundefined
Literals in the typeauto, off

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

tooltipEnabled

Set as an HTML attribute or JavaScript property. type: boolean.

ItemValue
JavaScript propertytooltipEnabled
HTML attributetooltip-show
Typeboolean
Defaulttrue

tooltipFormat

a plain-text formatter of the default tooltip (tooltip.format wins).

ItemValue
JavaScript propertytooltipFormat
HTML attributePass objects, arrays, and callbacks as JavaScript properties
Type(detail: CandlestickPointEventDetail) => string
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

animated

Whether to animate initial display and data changes.

ItemValue
JavaScript propertyanimated
HTML attributeanimate
Typeboolean
Defaultfalse

animationDuration

Animation duration in milliseconds.

ItemValue
JavaScript propertyanimationDuration
HTML attributeanimation-duration
Typenumber
Default600

animationEasing

Allowed values: linear, ease-out, ease-in, ease-in-out. Default: 'ease-out'.

ItemValue
JavaScript propertyanimationEasing
HTML attributeanimation-easing
TypeCandlestickEasing
Default'ease-out'
Allowed valueslinear, ease-out, ease-in, ease-in-out

animationType

Allowed values: initial, update. Default: undefined.

ItemValue
JavaScript propertyanimationType
HTML attributeanimation-type
TypeCandlestickAnimationType
Defaultundefined
Allowed valuesinitial, update

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

streamSource

A stream source of bars (§3.6); without one appendPoint creates an internal source.

ItemValue
JavaScript propertystreamSource
HTML attributePass objects, arrays, and callbacks as JavaScript properties
TypeCandlestickStreamSource
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

streamMax

The bars the internal stream source tracks at most.

ItemValue
JavaScript propertystreamMax
HTML attributestream-max
Typenumber
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

streamWindow

The newest N streamed bars the chart renders (the whole buffer when unset).

ItemValue
JavaScript propertystreamWindow
HTML attributestream-window
Typenumber
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

engine

Renderer selection: auto, standard, or pro. Engine selection is separate from permission to use a Pro chart type.

ItemValue
JavaScript propertyengine
HTML attributeengine
TypeCandlestickEngineMode
Default'auto'
Allowed valuesauto, standard, pro

unavailable

Allowed values: fallback, error. Default: 'fallback'.

ItemValue
JavaScript propertyunavailable
HTML attributeunavailable
TypeCandlestickUnavailableBehaviour
Default'fallback'
Allowed valuesfallback, error

Events

rendered

Every drawn frame; engine is the engine status (requested / effective / code / the governing license feature).

Event name: rendered. Names are case-sensitive. Read the payload from detail on CustomEvent<CandlestickRenderResult & { tier: CandlestickEngineTier; engine?: ChartEngineStatus }>.

javascript
chart.addEventListener('rendered', event => {
  console.log(event.detail); // CandlestickRenderResult & { tier: CandlestickEngineTier; engine?: ChartEngineStatus }
});

pointClick

A point selection event. Read the selected data and index from CustomEvent.detail.

Event name: pointClick. Names are case-sensitive. Read the payload from detail on CustomEvent<CandlestickPointEventDetail>.

javascript
chart.addEventListener('pointClick', event => {
  console.log(event.detail); // CandlestickPointEventDetail
});

pointHover

CustomEvent.detail type: CandlestickPointEventDetail | null. Event names are case-sensitive.

Event name: pointHover. Names are case-sensitive. Read the payload from detail on CustomEvent<CandlestickPointEventDetail | null>.

javascript
chart.addEventListener('pointHover', event => {
  console.log(event.detail); // CandlestickPointEventDetail | null
});

crosshairMove

CustomEvent.detail type: CartesianCrosshairEventDetail | null. Event names are case-sensitive.

Event name: crosshairMove. Names are case-sensitive. Read the payload from detail on CustomEvent<CartesianCrosshairEventDetail | null>.

javascript
chart.addEventListener('crosshairMove', event => {
  console.log(event.detail); // CartesianCrosshairEventDetail | null
});

pointContextMenu

CustomEvent.detail type: ChartPointContextMenuEventDetail<CandlestickPointEventDetail>. Event names are case-sensitive.

Event name: pointContextMenu. Names are case-sensitive. Read the payload from detail on CustomEvent<ChartPointContextMenuEventDetail<CandlestickPointEventDetail>>.

javascript
chart.addEventListener('pointContextMenu', event => {
  console.log(event.detail); // ChartPointContextMenuEventDetail<CandlestickPointEventDetail>
});

appended

CustomEvent.detail type: { count: number; replaced: number }. Event names are case-sensitive.

Event name: appended. Names are case-sensitive. Read the payload from detail on CustomEvent<{ count: number; replaced: number }>.

javascript
chart.addEventListener('appended', event => {
  console.log(event.detail); // { count: number; replaced: number }
});

windowSlid

CustomEvent.detail type: { dropped: number }. Event names are case-sensitive.

Event name: windowSlid. Names are case-sensitive. Read the payload from detail on CustomEvent<{ dropped: number }>.

javascript
chart.addEventListener('windowSlid', event => {
  console.log(event.detail); // { dropped: number }
});

tooltipShow

the tooltip events of the shared contract.

Event name: tooltipShow. Names are case-sensitive. Read the payload from detail on CustomEvent<CartesianTooltipEventDetail>.

javascript
chart.addEventListener('tooltipShow', event => {
  console.log(event.detail); // CartesianTooltipEventDetail
});

tooltipHide

CustomEvent.detail type: void. Event names are case-sensitive.

Event name: tooltipHide. Names are case-sensitive. Read the payload from detail on CustomEvent<void>.

javascript
chart.addEventListener('tooltipHide', event => {
  console.log(event.detail); // void
});

tooltipAction

CustomEvent.detail type: CartesianTooltipActionEventDetail. Event names are case-sensitive.

Event name: tooltipAction. Names are case-sensitive. Read the payload from detail on CustomEvent<CartesianTooltipActionEventDetail>.

javascript
chart.addEventListener('tooltipAction', event => {
  console.log(event.detail); // CartesianTooltipActionEventDetail
});

chartAnimationStart

CustomEvent.detail type: void. Event names are case-sensitive.

Event name: chartAnimationStart. Names are case-sensitive. Read the payload from detail on CustomEvent<void>.

javascript
chart.addEventListener('chartAnimationStart', event => {
  console.log(event.detail); // void
});

chartAnimationEnd

CustomEvent.detail type: void. Event names are case-sensitive.

Event name: chartAnimationEnd. Names are case-sensitive. Read the payload from detail on CustomEvent<void>.

javascript
chart.addEventListener('chartAnimationEnd', event => {
  console.log(event.detail); // void
});

chartAnimationInterrupted

CustomEvent.detail type: void. Event names are case-sensitive.

Event name: chartAnimationInterrupted. Names are case-sensitive. Read the payload from detail on CustomEvent<void>.

javascript
chart.addEventListener('chartAnimationInterrupted', event => {
  console.log(event.detail); // void
});

zoomChange

Fired after every zoom change (drag / pan / wheel / pinch / keyboard / api / reset) with the new state.

Event name: zoomChange. Names are case-sensitive. Read the payload from detail on CustomEvent<CartesianZoomChangeEventDetail>.

javascript
chart.addEventListener('zoomChange', event => {
  console.log(event.detail); // CartesianZoomChangeEventDetail
});

Methods

getDataTable

Current normalized table, including the retained stream; independent of GPU availability.

typescript
getDataTable(): Promise<ChartDataTable>

Return type: Promise<ChartDataTable>. Call the method after element registration and await its Promise result.

redraw

Redraw the chart using its current data and options. Inspect the rendered result after the returned Promise resolves.

typescript
redraw(): Promise<CandlestickRenderResult>

Return type: Promise<CandlestickRenderResult>. Call the method after element registration and await its Promise result.

getActiveTier

An asynchronous method. Check the argument and return types below.

typescript
getActiveTier(): Promise<CandlestickEngineTier>

Return type: Promise<CandlestickEngineTier>. Call the method after element registration and await its Promise result.

getUnavailableReason

Why the WebGPU renderer could not run (the fallback notice's reason); undefined when nothing fell back.

typescript
getUnavailableReason(): Promise<string | undefined>

Return type: Promise<string | undefined>. Call the method after element registration and await its Promise result.

setData

Replace the bar set.

typescript
setData(data: CandlestickData): Promise<void>
ArgumentsTypeRequired
dataCandlestickDataRequired

Return type: Promise<void>. Call the method after element registration and await its Promise result.

appendPoint

Append one value to the stream. Check the argument type and the licensing requirements for streaming.

typescript
appendPoint(bar: CandlestickBarInput): Promise<void>
ArgumentsTypeRequired
barCandlestickBarInputRequired

Return type: Promise<void>. Call the method after element registration and await its Promise result.

appendBatch

Append multiple values to the stream. Check the argument type and the licensing requirements for streaming.

typescript
appendBatch(bars: ReadonlyArray<CandlestickBarInput>): Promise<void>
ArgumentsTypeRequired
barsReadonlyArray<CandlestickBarInput>Required

Return type: Promise<void>. Call the method after element registration and await its Promise result.

shift

Drop the oldest streamed bars (the data bars are not the stream).

typescript
shift(count: number): Promise<void>
ArgumentsTypeRequired
countnumberRequired

Return type: Promise<void>. Call the method after element registration and await its Promise result.

replace

Swap the streamed set (replace([]) clears it); the base values never leave. Without chart.streaming the dies upsert into the base like a batch (quietly: no appended, no binChanged, as a ring replace).

typescript
replace(bars: ReadonlyArray<CandlestickBarInput>): Promise<void>
ArgumentsTypeRequired
barsReadonlyArray<CandlestickBarInput>Required

Return type: Promise<void>. Call the method after element registration and await its Promise result.

getStreamSource

The stream session's source (Chart Pro): like the stream methods it waits for a license still being confirmed.

typescript
getStreamSource(): Promise<CandlestickStreamSource | undefined>

Return type: Promise<CandlestickStreamSource | undefined>. Call the method after element registration and await its Promise result.

setAnimation

An asynchronous method. Check the argument and return types below.

typescript
setAnimation(options: { duration?: number; easing?: CandlestickEasing; enabled?: boolean; type?: CandlestickAnimationType }): Promise<void>
ArgumentsTypeRequired
options{ duration?: number; easing?: CandlestickEasing; enabled?: boolean; type?: CandlestickAnimationType }Required

Return type: Promise<void>. Call the method after element registration and await its Promise result.

pauseAnimation

Pause the current animation.

typescript
pauseAnimation(): Promise<void>

Return type: Promise<void>. Call the method after element registration and await its Promise result.

resumeAnimation

Resume a paused animation.

typescript
resumeAnimation(): Promise<void>

Return type: Promise<void>. Call the method after element registration and await its Promise result.

replayAnimation

Replay the initial sweep from min → value(s). No-op when animation is off / reduced.

typescript
replayAnimation(): Promise<void>

Return type: Promise<void>. Call the method after element registration and await its Promise result.

hitTest

The bar under a host-local point (the nearest bar within half a pitch, anywhere inside the plot's height).

typescript
hitTest(cssX: number, cssY: number): Promise<CandlestickPointEventDetail | null>
ArgumentsTypeRequired
cssXnumberRequired
cssYnumberRequired

Return type: Promise<CandlestickPointEventDetail | null>. Call the method after element registration and await its Promise result.

getBar

The normalised bar at an index (null outside).

typescript
getBar(index: number): Promise<CandlestickBar | null>
ArgumentsTypeRequired
indexnumberRequired

Return type: Promise<CandlestickBar | null>. Call the method after element registration and await its Promise result.

getBarAt

The bar nearest to a time (null for an empty series).

typescript
getBarAt(time: number): Promise<(CandlestickBar & { index: number }) | null>
ArgumentsTypeRequired
timenumberRequired

Return type: Promise<(CandlestickBar & { index: number }) | null>. Call the method after element registration and await its Promise result.

getBarCount

An asynchronous method. Check the argument and return types below.

typescript
getBarCount(): Promise<number>

Return type: Promise<number>. Call the method after element registration and await its Promise result.

getExtent

An asynchronous method. Check the argument and return types below.

typescript
getExtent(): Promise<CandlestickExtent>

Return type: Promise<CandlestickExtent>. Call the method after element registration and await its Promise result.

getDomain

The data domain the grid spans.

typescript
getDomain(): Promise<CandlestickDomain>

Return type: Promise<CandlestickDomain>. Call the method after element registration and await its Promise result.

getVisibleRange

The bars the plot shows: the x-axis window, narrowed by the zoom when one is in place.

typescript
getVisibleRange(): Promise<CandlestickVisibleRange>

Return type: Promise<CandlestickVisibleRange>. Call the method after element registration and await its Promise result.

showTooltipAtIndex

open the tooltip on a bar by index (null when the tooltip is off or the bar is outside the visible window).

typescript
showTooltipAtIndex(index: number): Promise<CartesianTooltipEventDetail | null>
ArgumentsTypeRequired
indexnumberRequired

Return type: Promise<CartesianTooltipEventDetail | null>. Call the method after element registration and await its Promise result.

hideTooltip

Close the currently visible tooltip.

typescript
hideTooltip(): Promise<void>

Return type: Promise<void>. Call the method after element registration and await its Promise result.

focusBarAt

move the keyboard focus ring to a bar (null outside the visible window); emits pointHover like the walk.

typescript
focusBarAt(index: number): Promise<CandlestickPointEventDetail | null>
ArgumentsTypeRequired
indexnumberRequired

Return type: Promise<CandlestickPointEventDetail | null>. Call the method after element registration and await its Promise result.

getOverlays

the overlays: each settled spec with where its PRIMARY line exists and what is visible (the outputs and the band ride on the spec).

typescript
getOverlays(): Promise<CandlestickOverlayState[]>

Return type: Promise<CandlestickOverlayState[]>. Call the method after element registration and await its Promise result.

getOverlayValues

the overlay values at a bar index: the primary output under the overlay id, the others under id.key (null through a warm-up).

typescript
getOverlayValues(index: number): Promise<Record<string, number | null>>
ArgumentsTypeRequired
indexnumberRequired

Return type: Promise<Record<string, number | null>>. Call the method after element registration and await its Promise result.

getPanes

the panes: the price pane, the volume pane when it exists, the separator, and why there is none.

typescript
getPanes(): Promise<CandlestickPaneRects>

Return type: Promise<CandlestickPaneRects>. Call the method after element registration and await its Promise result.

getTimeScale

the time scale of the visible range: the kind, the slots, the spacing and the ordinal ticks.

typescript
getTimeScale(): Promise<CandlestickTimeScaleState>

Return type: Promise<CandlestickTimeScaleState>. Call the method after element registration and await its Promise result.

zoomTo

Zoom to explicit windows: x / y as { min, max } or [min, max] (null clears that orientation; x in slots under the ordinal scale — bar i sits at i — or epoch ms under linear, y in price); xAxis / yAxis name the axis by id or slot index (default: the primary axis).

typescript
zoomTo(request: CartesianZoomRequest): Promise<CartesianZoomChangeEventDetail | null>
ArgumentsTypeRequired
requestCartesianZoomRequestRequired

Return type: Promise<CartesianZoomChangeEventDetail | null>. Call the method after element registration and await its Promise result.

zoomBy

Scale the current windows by factor (< 1 zooms in) around anchorFraction (0..1, default centre).

typescript
zoomBy(factor: number, anchorFraction?: number): Promise<CartesianZoomChangeEventDetail | null>
ArgumentsTypeRequired
factornumberRequired
anchorFractionnumberOptional

Return type: Promise<CartesianZoomChangeEventDetail | null>. Call the method after element registration and await its Promise result.

panBy

Slide the zoomed windows by data units ({ x?, y? } — x in slots or ms, y in price); a no-op at the full extent.

typescript
panBy(delta: { x?: number; y?: number }): Promise<CartesianZoomChangeEventDetail | null>
ArgumentsTypeRequired
delta{ x?: number; y?: number }Required

Return type: Promise<CartesianZoomChangeEventDetail | null>. Call the method after element registration and await its Promise result.

resetZoom

Reset the zoomed or panned range to the original data range.

typescript
resetZoom(): Promise<CartesianZoomChangeEventDetail | null>

Return type: Promise<CartesianZoomChangeEventDetail | null>. Call the method after element registration and await its Promise result.

getZoom

Read the current zoom range. Check the return type's nullability and the range for each axis.

typescript
getZoom(): Promise<CartesianZoomState | null>

Return type: Promise<CartesianZoomState | null>. Call the method after element registration and await its Promise result.

getZoomExtent

The full extent (and key) of the primary — or the named — master axes (x: the visible slot range −0.5 … n − 0.5 under ordinal, the ms window under linear; y: the fitted price domain).

typescript
getZoomExtent(request?: CartesianZoomExtentRequest): Promise<CartesianZoomExtentDetail | null>
ArgumentsTypeRequired
requestCartesianZoomExtentRequestOptional

Return type: Promise<CartesianZoomExtentDetail | null>. Call the method after element registration and await its Promise result.

getEngineStatus

Requested engine vs what runs, and why (CHART-ADD-08): the decision for the current inputs, read without side effects (ProChartLicense.engineStatus); a renderer that failed at run time reports engine-unsupported.

typescript
getEngineStatus(): Promise<ChartEngineStatus>

Return type: Promise<ChartEngineStatus>. Call the method after element registration and await its Promise result.