Variable: boxAttributes
ts
const boxAttributes: ObjectNode<{
alignmentgroup: Attr<
string,
{
description: 'Traces on the same position axis with the same alignment group split each position between their offset groups; different alignment groups lay out independently.';
dflt: '';
editType: 'calc';
}
>;
boxmean: Attr<
boolean | 'sd',
{
description: "Draw the mean as a dashed line (`true`), plus a dashed diamond spanning ± `sdmultiple` standard deviations (`'sd'`). Default: on with precomputed `mean` (and `'sd'` with `sd`).";
editType: 'calc';
values: readonly [true, 'sd', false];
}
>;
boxpoints: Attr<
false | 'all' | 'outliers' | 'suspectedoutliers',
{
description:
| "Which samples are drawn as points: `'all'`, only those beyond the whiskers (`'outliers'`, the default), those plus a highlight of the ones between the whiskers and 3 IQR from the quartiles (`'suspectedoutliers'`, styled by `marker.outliercolor` and `marker.line.outlier*`), or none (`false`). Default: `'suspectedoutliers'` when an outlier color is set, else `'outliers'`."
| "Which samples are drawn as points: `'all'`, only those beyond the whiskers (`'outliers'`, the default), those plus a highlight of the ones between the whiskers and 3 IQR from the quartiles (`'suspectedoutliers'`, styled by `marker.outliercolor` and `marker.line.outlier*`), or none (`false`). Default: `'suspectedoutliers'` when an outlier color is set, `'all'` with precomputed statistics, else `'outliers'`."
| "Which samples are drawn as points: `'all'`, only those beyond the whiskers (`'outliers'`, the default), those plus a highlight of the ones between the whiskers and 3 IQR from the quartiles (`'suspectedoutliers'`, styled by `marker.outliercolor` and `marker.line.outlier*`), or none (`false`, the whiskers then reach the extreme samples). Default: `'suspectedoutliers'` when an outlier color is set, else `'outliers'`."
| "Which samples are drawn as points: `'all'`, only those beyond the whiskers (`'outliers'`, the default), those plus a highlight of the ones between the whiskers and 3 IQR from the quartiles (`'suspectedoutliers'`, styled by `marker.outliercolor` and `marker.line.outlier*`), or none (`false`, the whiskers then reach the extreme samples). Default: `'suspectedoutliers'` when an outlier color is set, `'all'` with precomputed statistics, else `'outliers'`.";
editType: 'calc';
values: readonly ['all', 'outliers', 'suspectedoutliers', false];
}
>;
dx: Attr<
number,
{
description: 'Step between the positions of precomputed boxes when `x` is not given: box `i` is at `x0 + i·dx`. Default 1.';
editType: 'calc';
}
>;
dy: Attr<
number,
{
description: 'Step between the positions of precomputed horizontal boxes when `y` is not given. Default 1.';
editType: 'calc';
}
>;
fillcolor: Attr<
string,
{
description:
| 'Fill color of the box. Default: `line.color` at half opacity.'
| 'Fill color of the violin. Default: `line.color` at half opacity.';
editType: 'style';
}
>;
hoveron: Attr<
'boxes' | 'points' | `boxes+${string}` | `points+${string}`,
{
description: 'What shows hover labels: the boxes (one label per statistic, as Plotly), the points, or both (a point under the pointer wins).';
dflt: 'boxes+points';
editType: 'style';
flags: readonly ['boxes', 'points'];
}
>;
jitter: Attr<
number,
{
description:
| "Random spread of the points across the position axis, as a fraction of the box width (0: all on one line). Denser stretches spread more. Default: 0.3 with `points: 'all'`, else 0. The spread is repeatable (Plotly's seeded generator)."
| "Random spread of the points across the position axis, as a fraction of the box width (0: all on one line). Denser stretches spread more. Default: 0.3 with `boxpoints: 'all'`, else 0. The spread is repeatable (Plotly's seeded generator)."
| "Random spread of the points across the position axis, as a fraction of the violin width (0: all on one line). Denser stretches spread more. Default: 0.3 with `points: 'all'`, else 0. The spread is repeatable (Plotly's seeded generator)."
| "Random spread of the points across the position axis, as a fraction of the violin width (0: all on one line). Denser stretches spread more. Default: 0.3 with `boxpoints: 'all'`, else 0. The spread is repeatable (Plotly's seeded generator).";
editType: 'calc';
max: 1;
min: 0;
}
>;
line: ObjectNode<{
color: Attr<
string,
{
description:
| 'Outline color of the box. Default: `marker.color`, else the colorway.'
| 'Outline color of the box, its median and whiskers. Default: `marker.color`, else the colorway.'
| 'Outline color of the violin. Default: `marker.color`, else the colorway.'
| 'Outline color of the violin, its median and whiskers. Default: `marker.color`, else the colorway.';
editType: 'style';
}
>;
width: Attr<
number,
{
description: 'Outline width in CSS px.';
dflt: 2;
editType: 'style';
min: 0;
}
>;
}>;
lowerfence: AttrSpec<DataArray, DataArray | undefined>;
marker: ObjectNode<{
angle: Attr<
number,
{
description: 'Point rotation in degrees, clockwise.';
dflt: 0;
editType: 'style';
}
>;
color: Attr<
string,
{
description: 'Point fill color. Default: `line.color`.';
editType: 'style';
}
>;
line: ObjectNode<{
color: Attr<
string,
{
description: 'Point outline color.';
dflt: '#444';
editType: 'style';
}
>;
outliercolor: Attr<
string,
{
description: "Outline color of suspected outliers with `'suspectedoutliers'`. Default: `marker.color`. Setting it makes that mode the default.";
editType: 'style';
}
>;
outlierwidth: Attr<
number,
{
description: "Outline width (px) of suspected outliers with `'suspectedoutliers'`.";
dflt: 1;
editType: 'style';
min: 0;
}
>;
width: Attr<
number,
{
description: 'Point outline width in CSS px.';
dflt: 0;
editType: 'style';
min: 0;
}
>;
}>;
opacity: Attr<
number,
{
description: 'Point opacity (multiplied by the trace `opacity`).';
dflt: 1;
editType: 'style';
max: 1;
min: 0;
}
>;
outliercolor: Attr<
string,
{
description: "Fill of suspected outliers (between the whiskers and 3 IQR from the quartiles) with `'suspectedoutliers'`. Setting it makes that mode the default.";
dflt: 'rgba(0, 0, 0, 0)';
editType: 'style';
}
>;
size: Attr<
number,
{
description: 'Point diameter in CSS px.';
dflt: 6;
editType: 'calc';
min: 0;
}
>;
symbol: Attr<
PrimitiveValue,
{
accepts: (value) => boolean;
description: "Point symbol: a name (`'diamond-open'`), a Plotly numeric code, a registered custom symbol or a `'text:…'` glyph.";
dflt: 'circle';
editType: 'style';
values: readonly PrimitiveValue[];
}
>;
}>;
mean: AttrSpec<DataArray, DataArray | undefined>;
median: AttrSpec<DataArray, DataArray | undefined>;
notched: Attr<
boolean,
{
description: "Draw notches at the median's 95% confidence interval (median ± 1.57 · IQR / √n): boxes whose notches don't overlap have different medians with roughly 95% confidence. Default: true when `notchwidth` (or `notchspan`) is set.";
editType: 'calc';
}
>;
notchspan: AttrSpec<DataArray, DataArray | undefined>;
notchwidth: Attr<
number,
{
description: 'How far notches cut into the box, as a fraction of its width (0–0.5).';
dflt: 0.25;
editType: 'calc';
max: 0.5;
min: 0;
}
>;
offsetgroup: Attr<
string,
{
description:
| "With `layout.boxmode: 'group'`, traces with the same offset group share one slot at each position; different offset groups sit side by side."
| "With `layout.violinmode: 'group'`, traces with the same offset group share one slot at each position; different offset groups sit side by side.";
dflt: '';
editType: 'calc';
}
>;
orientation: Attr<
'v' | 'h',
{
description:
| "`'v'`: vertical boxes at `x` positions over `y` values; `'h'`: horizontal ones at `y` positions. Default: `'v'` when `y` is given, else `'h'`."
| "`'v'`: vertical violines at `x` positions over `y` values; `'h'`: horizontal ones at `y` positions. Default: `'v'` when `y` is given, else `'h'`.";
editType: 'calc';
values: readonly ['v', 'h'];
}
>;
pointpos: Attr<
number,
{
description:
| "Where the points sit relative to the box, in box half-widths: 0 on its center line, 1 on its right (or top) edge, −2 one box width to the left (or below). Default: −1.5 with `points: 'all'`, else 0."
| "Where the points sit relative to the box, in box half-widths: 0 on its center line, 1 on its right (or top) edge, −2 one box width to the left (or below). Default: −1.5 with `boxpoints: 'all'`, else 0."
| "Where the points sit relative to the box, in box half-widths: 0 on its center line, 1 on its right (or top) edge, −2 one violin width to the left (or below). Default: −1.5 with `points: 'all'`, else 0."
| "Where the points sit relative to the box, in box half-widths: 0 on its center line, 1 on its right (or top) edge, −2 one violin width to the left (or below). Default: −1.5 with `boxpoints: 'all'`, else 0."
| "Where the points sit relative to the box, in violin half-widths: 0 on its center line, 1 on its right (or top) edge, −2 one box width to the left (or below). Default: −1.5 with `points: 'all'`, else 0."
| "Where the points sit relative to the box, in violin half-widths: 0 on its center line, 1 on its right (or top) edge, −2 one box width to the left (or below). Default: −1.5 with `boxpoints: 'all'`, else 0."
| "Where the points sit relative to the box, in violin half-widths: 0 on its center line, 1 on its right (or top) edge, −2 one violin width to the left (or below). Default: −1.5 with `points: 'all'`, else 0."
| "Where the points sit relative to the box, in violin half-widths: 0 on its center line, 1 on its right (or top) edge, −2 one violin width to the left (or below). Default: −1.5 with `boxpoints: 'all'`, else 0."
| "Where the points sit relative to the violin, in box half-widths: 0 on its center line, 1 on its right (or top) edge, −2 one box width to the left (or below). Default: −1.5 with `points: 'all'`, else 0."
| "Where the points sit relative to the violin, in box half-widths: 0 on its center line, 1 on its right (or top) edge, −2 one box width to the left (or below). Default: −1.5 with `boxpoints: 'all'`, else 0."
| "Where the points sit relative to the violin, in box half-widths: 0 on its center line, 1 on its right (or top) edge, −2 one violin width to the left (or below). Default: −1.5 with `points: 'all'`, else 0."
| "Where the points sit relative to the violin, in box half-widths: 0 on its center line, 1 on its right (or top) edge, −2 one violin width to the left (or below). Default: −1.5 with `boxpoints: 'all'`, else 0."
| "Where the points sit relative to the violin, in violin half-widths: 0 on its center line, 1 on its right (or top) edge, −2 one box width to the left (or below). Default: −1.5 with `points: 'all'`, else 0."
| "Where the points sit relative to the violin, in violin half-widths: 0 on its center line, 1 on its right (or top) edge, −2 one box width to the left (or below). Default: −1.5 with `boxpoints: 'all'`, else 0."
| "Where the points sit relative to the violin, in violin half-widths: 0 on its center line, 1 on its right (or top) edge, −2 one violin width to the left (or below). Default: −1.5 with `points: 'all'`, else 0."
| "Where the points sit relative to the violin, in violin half-widths: 0 on its center line, 1 on its right (or top) edge, −2 one violin width to the left (or below). Default: −1.5 with `boxpoints: 'all'`, else 0.";
editType: 'calc';
max: 2;
min: -2;
}
>;
q1: AttrSpec<DataArray, DataArray | undefined>;
q3: AttrSpec<DataArray, DataArray | undefined>;
quartilemethod: Attr<
'linear' | 'exclusive' | 'inclusive',
{
description: "How quartiles are computed from samples: `linear` interpolates over the whole sample (Plotly's method, the one most tools call type 5); for odd counts, `exclusive` takes the medians of the lower and upper halves without the median, `inclusive` with it. Even counts use `linear` in every method.";
dflt: 'linear';
editType: 'calc';
values: readonly ['linear', 'exclusive', 'inclusive'];
}
>;
sd: AttrSpec<DataArray, DataArray | undefined>;
sdmultiple: Attr<
number,
{
description: "How many standard deviations the `sizemode: 'sd'` box and the `boxmean: 'sd'` diamond span on each side of the mean.";
dflt: 1;
editType: 'calc';
min: 0;
}
>;
selected: ObjectNode<{
marker: ObjectNode<{
color: Attr<
string,
{
description: 'Color of selected points.' | 'Color of unselected points.';
editType: 'style';
}
>;
opacity: Attr<
number,
{
description:
| 'Opacity of unselected points. Default: 0.2 × the marker opacity.'
| 'Opacity of selected points.';
editType: 'style';
max: 1;
min: 0;
}
>;
}>;
}>;
showwhiskers: Attr<
boolean,
{
description: "Draw the whiskers. Default: true, except with `sizemode: 'sd'`.";
editType: 'calc';
}
>;
sizemode: Attr<
'quartiles' | 'sd',
{
description: "`'quartiles'`: the box spans q1–q3 with a line at the median; `'sd'`: it spans mean ± `sdmultiple` standard deviations with a line at the mean (no whiskers by default).";
dflt: 'quartiles';
editType: 'calc';
values: readonly ['quartiles', 'sd'];
}
>;
text: Attr<
string | readonly string[],
{
arrayOk: true;
description: 'Text per sample, shown in the hover label of its point.';
dflt: '';
editType: 'calc';
}
>;
unselected: ObjectNode<{
marker: ObjectNode<{
color: Attr<
string,
{
description: 'Color of selected points.' | 'Color of unselected points.';
editType: 'style';
}
>;
opacity: Attr<
number,
{
description:
| 'Opacity of unselected points. Default: 0.2 × the marker opacity.'
| 'Opacity of selected points.';
editType: 'style';
max: 1;
min: 0;
}
>;
}>;
}>;
upperfence: AttrSpec<DataArray, DataArray | undefined>;
whiskerwidth: Attr<
number,
{
description: 'Width of the whisker caps as a fraction of the box width (0: no caps).';
dflt: 0.5;
editType: 'calc';
max: 1;
min: 0;
}
>;
width: Attr<
number,
{
description:
| 'Box width in position-axis units (category slots, or ms on date axes). 0 (default): computed from the spacing of the positions and `layout.boxgap`, `boxgroupgap` and `boxmode`.'
| 'Box width in position-axis units (category slots, or ms on date axes). 0 (default): computed from the spacing of the positions and `layout.boxgap`, `boxgroupgap` and `violinmode`.'
| 'Box width in position-axis units (category slots, or ms on date axes). 0 (default): computed from the spacing of the positions and `layout.boxgap`, `violingroupgap` and `boxmode`.'
| 'Box width in position-axis units (category slots, or ms on date axes). 0 (default): computed from the spacing of the positions and `layout.boxgap`, `violingroupgap` and `violinmode`.'
| 'Box width in position-axis units (category slots, or ms on date axes). 0 (default): computed from the spacing of the positions and `layout.violingap`, `boxgroupgap` and `boxmode`.'
| 'Box width in position-axis units (category slots, or ms on date axes). 0 (default): computed from the spacing of the positions and `layout.violingap`, `boxgroupgap` and `violinmode`.'
| 'Box width in position-axis units (category slots, or ms on date axes). 0 (default): computed from the spacing of the positions and `layout.violingap`, `violingroupgap` and `boxmode`.'
| 'Box width in position-axis units (category slots, or ms on date axes). 0 (default): computed from the spacing of the positions and `layout.violingap`, `violingroupgap` and `violinmode`.'
| 'Violin width in position-axis units (category slots, or ms on date axes). 0 (default): computed from the spacing of the positions and `layout.boxgap`, `boxgroupgap` and `boxmode`.'
| 'Violin width in position-axis units (category slots, or ms on date axes). 0 (default): computed from the spacing of the positions and `layout.boxgap`, `boxgroupgap` and `violinmode`.'
| 'Violin width in position-axis units (category slots, or ms on date axes). 0 (default): computed from the spacing of the positions and `layout.boxgap`, `violingroupgap` and `boxmode`.'
| 'Violin width in position-axis units (category slots, or ms on date axes). 0 (default): computed from the spacing of the positions and `layout.boxgap`, `violingroupgap` and `violinmode`.'
| 'Violin width in position-axis units (category slots, or ms on date axes). 0 (default): computed from the spacing of the positions and `layout.violingap`, `boxgroupgap` and `boxmode`.'
| 'Violin width in position-axis units (category slots, or ms on date axes). 0 (default): computed from the spacing of the positions and `layout.violingap`, `boxgroupgap` and `violinmode`.'
| 'Violin width in position-axis units (category slots, or ms on date axes). 0 (default): computed from the spacing of the positions and `layout.violingap`, `violingroupgap` and `boxmode`.'
| 'Violin width in position-axis units (category slots, or ms on date axes). 0 (default): computed from the spacing of the positions and `layout.violingap`, `violingroupgap` and `violinmode`.';
dflt: 0;
editType: 'calc';
min: 0;
}
>;
x: AttrSpec<DataArray, DataArray | undefined>;
x0: AttrSpec<unknown, unknown>;
y: AttrSpec<DataArray, DataArray | undefined>;
y0: AttrSpec<unknown, unknown>;
zorder: Attr<
number,
{
description: 'Stacking order among the traces of a subplot: higher is drawn on top. At equal `zorder`, violins draw below boxes and both below scatter traces (Plotly’s layer order), then in trace order.';
dflt: 0;
editType: 'plot';
}
>;
}>;Experimental
The box schema. Common trace attributes (name, opacity, hovertemplate, …) come from core.