Variable: ohlcAttributes
ts
const ohlcAttributes: ObjectNode<{
close: AttrSpec<DataArray, DataArray | undefined>;
decreasing: ObjectNode<{
line: ObjectNode<{
color: Attr<string, {
description: | `Line color of rising ${string}.`
| `Line color of falling ${string}.`;
dflt: "#3D9970" | "#FF4136";
editType: "style";
}>;
dash: Attr<string, {
description: | "Dash style of rising bars (see `line.dash`). Default: `line.dash`."
| "Dash style of falling bars (see `line.dash`). Default: `line.dash`.";
editType: "style";
}>;
width: Attr<number, {
description: | `Line width in CSS px of rising ${string}. Default: `line.width`.`
| `Line width in CSS px of falling ${string}. Default: `line.width`.`;
editType: "style";
min: 0;
}>;
}>;
}>;
high: AttrSpec<DataArray, DataArray | undefined>;
hoverlabel: ObjectNode<{
align: Attr<
| "left"
| "right"
| "auto"
| readonly ("left" | "right" | "auto")[], {
arrayOk: true;
description: "Text alignment inside labels.";
editType: "none";
values: readonly ["left", "right", "auto"];
}>;
bgcolor: Attr<string | readonly string[], {
arrayOk: true;
description: "Label background. Default: the point color.";
editType: "none";
}>;
bordercolor: Attr<string | readonly string[], {
arrayOk: true;
description: "Label border. Default: contrasting with the background.";
editType: "none";
}>;
font: ObjectNode<{
color: Attr<string | readonly string[], {
arrayOk: true;
description: "Font color.";
editType: "none";
}>;
family: Attr<string | readonly string[], {
arrayOk: true;
description: "Font family.";
editType: "none";
}>;
size: Attr<
| number
| TypedArray
| readonly number[], {
arrayOk: true;
description: "Font size in px.";
editType: "none";
min: 1;
}>;
}>;
namelength: Attr<
| number
| TypedArray
| readonly number[], {
arrayOk: true;
description: "Characters of the trace name shown (`-1`: all, `0`: none).";
editType: "none";
min: -1;
}>;
split: Attr<boolean, {
description: "Show the open, high, low and close in separate labels, each at its price, instead of one label. `hovertemplate` is then ignored.";
dflt: false;
editType: "style";
}>;
}>;
increasing: ObjectNode<{
line: ObjectNode<{
color: Attr<string, {
description: | `Line color of rising ${string}.`
| `Line color of falling ${string}.`;
dflt: "#3D9970" | "#FF4136";
editType: "style";
}>;
dash: Attr<string, {
description: | "Dash style of rising bars (see `line.dash`). Default: `line.dash`."
| "Dash style of falling bars (see `line.dash`). Default: `line.dash`.";
editType: "style";
}>;
width: Attr<number, {
description: | `Line width in CSS px of rising ${string}. Default: `line.width`.`
| `Line width in CSS px of falling ${string}. Default: `line.width`.`;
editType: "style";
min: 0;
}>;
}>;
}>;
line: ObjectNode<{
dash: Attr<string, {
description: "Dash style of every bar: `'solid'`, `'dot'`, `'dash'`, `'longdash'`, `'dashdot'`, `'longdashdot'`, or a dash list such as `'5px,10px,2px'`. `increasing.line.dash` and `decreasing.line.dash` override it per direction.";
dflt: "solid";
editType: "style";
}>;
width: Attr<number, {
description: "Line width in CSS px of every bar. `increasing.line.width` and `decreasing.line.width` override it per direction.";
dflt: 2;
editType: "style";
min: 0;
}>;
}>;
low: AttrSpec<DataArray, DataArray | undefined>;
open: AttrSpec<DataArray, DataArray | undefined>;
text: Attr<string | readonly string[], {
arrayOk: true;
description: | "Hover text: one string for every bar, or one per bar. `hovertext` wins."
| "Hover text: one string for every bar, or one per candle. `hovertext` wins."
| "Hover text: one string for every candle, or one per bar. `hovertext` wins."
| "Hover text: one string for every candle, or one per candle. `hovertext` wins.";
dflt: "";
editType: "calc";
}>;
tickwidth: Attr<number, {
description: "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.";
dflt: 0.3;
editType: "calc";
max: 0.5;
min: 0;
}>;
x: AttrSpec<DataArray, DataArray | undefined>;
xhoverformat: Attr<string, {
description: "d3 number or date format of x values in hover labels. Default: the axis format.";
dflt: "";
editType: "none";
}>;
xperiod: AttrSpec<unknown, unknown>;
xperiod0: AttrSpec<unknown, unknown>;
xperiodalignment: Attr<"start" | "middle" | "end", {
description: "Where points sit within their `xperiod`.";
dflt: "middle";
editType: "calc";
values: readonly ["start", "middle", "end"];
}>;
yhoverformat: Attr<string, {
description: "d3 number or date format of the prices in hover labels. Default: the y axis format.";
dflt: "";
editType: "none";
}>;
zorder: Attr<number, {
description: "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.";
dflt: 0;
editType: "plot";
}>;
}>;Experimental
The ohlc schema. Common trace attributes (name, opacity, xaxis, …) come from core.