Skip to content

Type Alias: ConeTrace ​

ts
type ConeTrace = Omit<CommonTraceAttributes, 'hoverinfo'> & object;

A 3D vector field drawn as cones: one lit cone per position, pointing along its vector, sized by the vector norms and colored by them through a colorscale (one instanced draw call).

Type Declaration ​

NameTypeDescription
anchor?"tip" | "tail" | "cm" | "center"Which part of the cone sits at its position: the tip, the tail (base), the center of mass (cm, a quarter of the way from tail to tip) or the middle (center).
autocolorscale?booleanPick the colorscale from the sign of the color domain (Reds for ≥ 0, Blues for ≤ 0, RdBu across 0). Defaults to true unless colorscale is given.
cauto?booleanCompute the color domain from the numeric u/v/w norm values. Defaults to false when both cmin and cmax are given.
cmax?numberValue mapped to the last colorscale color (with cmin; turns cauto off).
cmid?numberWith cauto, widen the automatic domain so it is symmetric around this value (diverging data).
cmin?numberValue mapped to the first colorscale color (with cmax; turns cauto off).
coloraxis?"coloraxis" | `coloraxis${number}`Share a colorscale and domain with other traces through layout.coloraxis ('coloraxis', 'coloraxis2', …). Overrides this container's colorscale attributes.
colorbar?ColorbarThe colorbar of this colorscale (plan E5.3).
colorscale?| ColorScale | readonly string[] | readonly readonly (number | string)[][]Colorscale for numeric u/v/w norm values: a name ('Viridis', 'RdBu', …), a list of colors, or [position, color] stops from 0 to 1.
hoverinfo?PerPoint< | "x" | "y" | "z" | "u" | "v" | "w" | "norm" | "text" | "name" | `${"x" | "y" | "z" | "u" | "v" | "w" | "norm" | "text" | "name"}+${string}` | "all" | "none" | "skip">Which fields hover labels show: the position (x, y, z), the vector (u, v, w), its norm, text and the trace name; 'skip' also turns hover events off.
lighting?ConeTraceLightingPlotly's lighting model: coefficients of the ambient, diffuse and specular light. With scene.lighting, they scale the scene's lights.
lightposition?ConeTraceLightpositionPosition of the light (Plotly's model, without scene.lighting), in clip space: it moves with the view.
reversescale?booleanReverse the colorscale (the lowest value gets the last color).
scene?"scene" | `scene${number}`The 3D scene this trace is drawn in: 'scene' (layout.scene), 'scene2' (layout.scene2), ….
showscale?booleanShow a colorbar for this colorscale (drawn by the colorbar component, plan E5.3).
sizemode?"scaled" | "absolute" | "raw"How cone lengths follow the vector norms. scaled: scaled so that the cones fit between neighbouring positions, times sizeref. absolute: the same, with sizeref in vector-norm units (the largest vector gets sizeref's length). raw: the vectors' own lengths in data units, times sizeref.
sizeref?numberScale of the cones (see sizemode). Default: 1 with sizemode: "raw", else 0.5. Minimum: 0
text?PerPoint<string | number>Text per cone, shown in hover labels and as %{text} in templates.
type"cone"Trace type.
u?DataColumnx component of the vector field at each position (numbers).
uhoverformat?stringd3 number format of u values in hover labels. Default: the scene's x axis format.
v?DataColumny component of the vector field at each position (numbers).
vhoverformat?stringd3 number format of v values in hover labels. Default: the scene's y axis format.
w?DataColumnz component of the vector field at each position (numbers).
whoverformat?stringd3 number format of w values in hover labels. Default: the scene's z axis format.
x?DataColumnX coordinates of the cones (numbers, dates or categories).
xhoverformat?stringd3 number format of x values in hover labels. Default: the scene's x axis format.
y?DataColumnY coordinates of the cones (numbers, dates or categories).
yhoverformat?stringd3 number format of y values in hover labels. Default: the scene's y axis format.
z?DataColumnZ coordinates of the cones (numbers, dates or categories).
zhoverformat?stringd3 number format of z values in hover labels. Default: the scene's z axis format.

Released under the MIT License.