AG Studio Launch Week 🚀🚀🚀 28 Sep - 2 Oct 2026 🚀🚀🚀 Join now

JavaScript ChartsCandlestick Series

Version 14.2.0
Enterprise

A Candlestick Series shows open and close data with bars, and high and low data with wicks.

Simple Candlestick Copy Link

To create a Candlestick Series, use the candlestick series type.

{
    series: [
        {
            type: 'candlestick',
            xKey: 'date',
            lowKey: 'low',
            openKey: 'open',
            closeKey: 'close',
            highKey: 'high',
        },
    ],
}

In this configuration:

  • xKey sets the candlestick's x value.
  • lowKey maps to the low/min value.
  • openKey maps to the open value.
  • closeKey maps to the close value.
  • highKey maps to the high/max value.

Customisation Copy Link

Series items are customised via the item configuration object.

Data items with a closing value higher than the opening value are considered as up, and those with a closing value lower than the opening value are down.

The properties item.up and item.down control the display of rising and falling series items.

Candlestick wicks inherit series item styles but can be individually customised. Here, the wick property on item.up and item.down is used to customise the wick line styles of the rising and falling candlestick items.

{
    series: [
        {
            type: 'candlestick',
            // ...
            item: {
                up: {
                    fill: 'transparent',
                    stroke: '#2b5c95',
                    wick: {
                        strokeWidth: 2,
                    },
                },
                down: {
                    fill: '#5090dc',
                    stroke: '#2b5c95',
                    wick: {
                        strokeWidth: 2,
                    },
                },
            },
        },
    ],
}

Candlestick Chart Examples Copy Link

See more Candlestick Chart examples in the AG Charts Gallery.

API Reference Copy Link

Properties available on the AgCandlestickSeriesOptions interface.

type required 'candlestick'
Configuration for the Candlestick Series.
xKey required DatumKey
xKey as specified on series options.
openKey required DatumKey
The key to use to retrieve open values from the data.
closeKey required DatumKey
The key to use to retrieve close values from the data.
highKey required DatumKey
The key to use to retrieve high values from the data.
lowKey required DatumKey
The key to use to retrieve low values from the data.
tooltip AgSeriesTooltip
Series-specific tooltip configuration.
itemStyler Styler
Function used to return formatting for individual columns, based on the given parameters.
highlight AgMultiSeriesHighlightOptions
Configuration for highlighting when a series or legend item is hovered over.
showInMiniChart boolean
Whether to include the series in the Mini Chart.
cursor string
The cursor to use for hovered markers. This config is identical to the CSS `cursor` property.
context ContextDefault
Context object to use in callbacks.
selection AgSelectionOptions
Configuration for data selection.
nodeClickRange InteractionRange
Range from a node that a click triggers the listener.
listeners AgSeriesListeners
A map of event names to event listeners.
item AgCandlestickSeriesItem
Configuration used for the series items.
id string default: auto-generated value
Primary identifier for the series. This is provided as `seriesId` in user callbacks to differentiate multiple series. Auto-generated ids are subject to future change without warning, if your callbacks need to vary behaviour by series please supply your own unique `id` value.
data DatumDefault[]
The data to use when rendering the series. If this is not supplied, data must be set on the chart instead.
visible boolean
Whether to display the series.
showInLegend boolean
Whether to include the series in the legend.
xKeyAxis string default: 'x'
The key of the x-axis to which this series is bound.
yKeyAxis string default: 'y'
The key of the y-axis to which this series is bound.
xName string
xName as specified on series options.
yName string
yName as specified on series options.
openName string
A human-readable description of open values. If supplied, this will be shown in the default tooltip and passed to the tooltip renderer as one of the parameters.
closeName string
A human-readable description of close values. If supplied, this will be shown in the default tooltip and passed to the tooltip renderer as one of the parameters.
highName string
A human-readable description of high values. If supplied, this will be shown in the default tooltip and passed to the tooltip renderer as one of the parameters.
lowName string
A human-readable description of low values. If supplied, this will be shown in the default tooltip and passed to the tooltip renderer as one of the parameters.