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
| Name | Type | Description |
|---|---|---|
close? | DataColumn | The close price of each period, in y-axis data units. |
decreasing? | CandlestickTraceDecreasing | Style of falling candles: candles whose close is below their open (an unchanged candle compares its close with the previous close). |
high? | DataColumn | The high price of each period, in y-axis data units. |
hoverlabel? | CandlestickTraceHoverlabel | Hover label style for this trace. Unset fields fall back to layout.hoverlabel (so there are no trace-level defaults). |
increasing? | CandlestickTraceIncreasing | Style of rising candles: candles whose close is above their open (an unchanged candle compares its close with the previous close). |
line? | CandlestickTraceLine | Outline and wick style of every candle. |
low? | DataColumn | The low price of each period, in y-axis data units. |
open? | DataColumn | The 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? | number | Width of caps at the ends of the wicks, as a fraction of the candle width (0: no caps). Range: 0 – 1 |
x? | DataColumn | x coordinate of each candle (usually dates). Default: 0, 1, 2, … |
xhoverformat? | string | d3 number or date format of x values in hover labels. Default: the axis format. |
xperiod? | unknown | Only 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? | unknown | A 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? | string | d3 number or date format of the prices in hover labels. Default: the y axis format. |
zorder? | number | Stacking 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. |