Skip to content

Type Alias: CandlestickTrace ​

ts
type CandlestickTrace = Omit<CommonTraceAttributes, 'hoverlabel'> &
  CartesianTraceAttributes &
  object;

Candlestick: the open, high, low and close of each period as a body from open to close with wicks to the high and low, colored by direction.

Type Declaration ​

NameTypeDescription
close?DataColumnThe close price of each period, in y-axis data units.
decreasing?CandlestickTraceDecreasingStyle of falling candles: candles whose close is below their open (an unchanged candle compares its close with the previous close).
high?DataColumnThe high price of each period, in y-axis data units.
hoverlabel?CandlestickTraceHoverlabelHover label style for this trace. Unset fields fall back to layout.hoverlabel (so there are no trace-level defaults).
increasing?CandlestickTraceIncreasingStyle of rising candles: candles whose close is above their open (an unchanged candle compares its close with the previous close).
line?CandlestickTraceLineOutline and wick style of every candle.
low?DataColumnThe low price of each period, in y-axis data units.
open?DataColumnThe open price of each period, in y-axis data units.
text?PerPoint<string | number>Hover text: one string for every candle, or one per candle. hovertext wins.
type"candlestick"Trace type.
whiskerwidth?numberWidth of caps at the ends of the wicks, as a fraction of the candle width (0: no caps). Range: 0 – 1
x?DataColumnx coordinate of each candle (usually dates). Default: 0, 1, 2, …
xhoverformat?stringd3 number or date format of x values in hover labels. Default: the axis format.
xperiod?unknownOnly on date or linear x axes: snap each x value to its period of this length (ms, or 'M<n>' months on date axes), positioned per xperiodalignment.
xperiod0?unknownA period boundary for xperiod. Default: 2000-01-01 on date axes (a Sunday for weekly periods), 0 otherwise.
xperiodalignment?"start" | "middle" | "end"Where points sit within their xperiod.
yhoverformat?stringd3 number or date format of the prices in hover labels. Default: the y axis format.
zorder?numberStacking order among the traces of a subplot: higher is drawn on top. At equal zorder, financial traces draw above bars and boxes and below scatter traces (Plotly’s layer order), then in trace order.

Released under the MIT License.