Skip to content

Documentation / @ripl/charts / StockChartOptions

Interface: StockChartOptions<TData> ​

Defined in: charts/src/charts/stock.ts:73

Options for configuring a StockChart.

Extends ​

Type Parameters ​

Type ParameterDefault type
TDataunknown

Properties ​

PropertyTypeDescriptionInherited fromDefined in
animation?boolean | Partial<ChartAnimationOptions>Animation configuration, or a boolean toggling all transitions. See ChartAnimationOptions.CartesianChartOptions.animationcharts/src/core/chart.ts:128
annotations?ChartAnnotation[]Reference lines, shaded bands, and point markers drawn over the plot. See ChartAnnotation.CartesianChartOptions.annotationscharts/src/core/cartesian.ts:231
autoRender?booleanWhether the chart renders automatically on construction and after every Chart.update. Defaults to true.CartesianChartOptions.autoRendercharts/src/core/chart.ts:122
axis?ChartAxisInput<TData>X/y axis configuration, or a boolean toggling both axes. See ChartAxisInput.CartesianChartOptions.axischarts/src/core/cartesian.ts:221
closeNumericAccessor<TData>Accessor for each item's closing price.-charts/src/charts/stock.ts:85
crosshair?ChartCrosshairInputCrosshair configuration, or a boolean toggle. See ChartCrosshairInput.CartesianChartOptions.crosshaircharts/src/core/cartesian.ts:229
dataTData[]The dataset to render, one candlestick per item.-charts/src/charts/stock.ts:75
description?stringAccessible description announced by screen readers (sets the rendering element's ARIA label). Defaults to the title text.CartesianChartOptions.descriptioncharts/src/core/chart.ts:132
downColor?stringColor for candles that close below their open (bearish).-charts/src/charts/stock.ts:95
format?ValueFormatInputFormat applied to the open/high/low/close values shown in the candle tooltip.-charts/src/charts/stock.ts:91
grid?ChartGridInputBackground grid configuration, or a boolean toggle. See ChartGridInput.CartesianChartOptions.gridcharts/src/core/cartesian.ts:223
highNumericAccessor<TData>Accessor for each item's high price.-charts/src/charts/stock.ts:81
keykeyof TData | ((item) => string)Accessor for each item's unique key, used along the x-axis and to match candles across updates.-charts/src/charts/stock.ts:77
legend?ChartLegendInputLegend configuration, a position string, or a boolean toggle. See ChartLegendInput.CartesianChartOptions.legendcharts/src/core/cartesian.ts:227
lowNumericAccessor<TData>Accessor for each item's low price.-charts/src/charts/stock.ts:83
navigator?boolean | NavigatorInteractionsEnables pan/zoom (and optionally brush) navigation on the plot. true turns on wheel-zoom and click-drag pan; an object configures each interaction individually. The chart auto-creates a DOMNavigator on its context and rescales the axis domains as the view changes, with no data rebuild. Access the underlying controller via chart.navigator for imperative framing (centerOn/fitBounds) or brush-and-link.CartesianChartOptions.navigatorcharts/src/core/cartesian.ts:239
openNumericAccessor<TData>Accessor for each item's opening price.-charts/src/charts/stock.ts:79
overview?boolean | ChartOverviewOptionsEnables an overview "scrub bar" strip beside the plot with a draggable window that selects the visible range of the category axis (a bottom bar for category-on-x charts, a side bar for a horizontal bar chart). true uses the default size; an object sets it. Enabling the strip also turns on in-plot wheel/drag pan-zoom (category-axis only) unless navigator is explicitly false. Only category-axis charts (line, area, bar, trend) render the strip.CartesianChartOptions.overviewcharts/src/core/cartesian.ts:247
padding?PaddingInputSpace reserved around the chart, in pixels. A single number applies to all four edges; a [top, right, bottom, left] tuple or a partial { top, right, bottom, left } object sets individual edges, leaving unspecified edges at the default. Defaults to 16.CartesianChartOptions.paddingcharts/src/core/chart.ts:124
showVolume?booleanShow the volume sub-chart below the candlesticks. Defaults to true (requires volume).-charts/src/charts/stock.ts:89
theme?string | ThemeTheme for this chart: a registered name ('light'/'dark'/'auto'), or a Theme. Falls back to the module default (see setDefaultTheme).CartesianChartOptions.themecharts/src/core/chart.ts:130
title?string | Partial<ChartTitleOptions>Chart title as plain text, or a ChartTitleOptions object for full control.CartesianChartOptions.titlecharts/src/core/chart.ts:126
tooltip?ChartTooltipInputHover-tooltip configuration, or a boolean toggle. See ChartTooltipInput.CartesianChartOptions.tooltipcharts/src/core/cartesian.ts:225
upColor?stringColor for candles that close at or above their open (bullish).-charts/src/charts/stock.ts:93
volume?NumericAccessor<TData>Optional accessor for each item's traded volume, enabling the volume sub-chart.-charts/src/charts/stock.ts:87