Variable: imageAttributes
ts
const imageAttributes: ObjectNode<{
colormodel: Attr<
'rgb' | 'rgba' | 'rgba256' | 'hsl' | 'hsla',
{
description: "How `z` components are read: `'rgb'` (default), `'rgba'` (alpha 0–1), `'rgba256'` (alpha 0–255; always used for `source`), `'hsl'` or `'hsla'`.";
editType: 'calc';
values: readonly ['rgb', 'rgba', 'rgba256', 'hsl', 'hsla'];
}
>;
dx: Attr<
number,
{
description: 'Pixel width in x units.';
dflt: 1;
editType: 'calc';
}
>;
dy: Attr<
number,
{
description: 'Pixel height in y units.';
dflt: 1;
editType: 'calc';
}
>;
hoverinfo: Attr<
| 'text'
| 'name'
| `text+${string}`
| `name+${string}`
| 'all'
| 'none'
| 'skip'
| 'x'
| 'y'
| 'z'
| 'color'
| `x+${string}`
| `y+${string}`
| `z+${string}`
| `color+${string}`
| readonly (
| 'text'
| 'name'
| `text+${string}`
| `name+${string}`
| 'all'
| 'none'
| 'skip'
| 'x'
| 'y'
| 'z'
| 'color'
| `x+${string}`
| `y+${string}`
| `z+${string}`
| `color+${string}`
)[],
{
arrayOk: true;
description: "Which fields hover labels show: `z` is the pixel's components as given, `color` the color they make in the color model (`RGB: [r, g, b]`).";
dflt: 'x+y+z+text+name';
editType: 'none';
extras: readonly ['all', 'none', 'skip'];
flags: readonly ['x', 'y', 'z', 'color', 'name', 'text'];
}
>;
hovertemplate: Attr<
string | readonly string[],
{
arrayOk: true;
description: 'Template for hover labels: `%{x}`, `%{y}`, `%{z}` (the pixel, `%{z[0]}` … its components), `%{color}` (scaled color, `%{color[0]}` …), `%{colormodel}`.';
editType: 'none';
}
>;
hovertext: AttrSpec<DataArray, DataArray | undefined>;
source: Attr<
string,
{
description: "The picture as a base64 data URI (`'data:image/png;base64,…'`; PNG, JPEG, GIF, WebP or BMP), used when `z` is not given. Other URLs are ignored, as in Plotly.";
editType: 'calc';
}
>;
text: AttrSpec<DataArray, DataArray | undefined>;
x0: AttrSpec<unknown, unknown>;
y0: AttrSpec<unknown, unknown>;
z: AttrSpec<DataArray, DataArray | undefined>;
zmax: AttrSpec<[number, number, number, number], [number, number, number, number] | undefined>;
zmin: AttrSpec<[number, number, number, number], [number, number, number, number] | undefined>;
zorder: Attr<
number,
{
description: 'Stacking order among the traces of a subplot: higher is drawn on top. At equal `zorder`, images draw below every other trace type (Plotly’s layer order).';
dflt: 0;
editType: 'plot';
}
>;
zsmooth: Attr<
false | 'fast',
{
description: "Pixel smoothing: none (`false`, square pixels) or `'fast'` (bilinear, the GPU's linear filtering).";
dflt: false;
editType: 'style';
values: readonly ['fast', false];
}
>;
}>;Experimental
The image schema. Common trace attributes (name, opacity, xaxis, …) come from core.