Type Alias: OhlcTrace
ts
type OhlcTrace = Omit<CommonTraceAttributes, 'hoverlabel'> & CartesianTraceAttributes & object;OHLC: the open, high, low and close of each period as a vertical line from low to high with an open tick on the left and a close tick on the right, colored by direction.
Type Declaration
| Name | Type | Description |
|---|---|---|
close? | DataColumn | The close price of each period, in y-axis data units. |
decreasing? | OhlcTraceDecreasing | Style of falling bars: bars whose close is below their open (an unchanged bar compares its close with the previous close). |
high? | DataColumn | The high price of each period, in y-axis data units. |
hoverlabel? | OhlcTraceHoverlabel | Hover label style for this trace. Unset fields fall back to layout.hoverlabel (so there are no trace-level defaults). |
increasing? | OhlcTraceIncreasing | Style of rising bars: bars whose close is above their open (an unchanged bar compares its close with the previous close). |
line? | OhlcTraceLine | Line style of every bar. |
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 bar, or one per bar. hovertext wins. |
tickwidth? | number | Length of the open (left) and close (right) ticks, as a fraction of the smallest x spacing between bars of the ohlc traces of the subplot. Range: 0 – 0.5 |
type | "ohlc" | Trace type. |
x? | DataColumn | x coordinate of each bar (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. |