Skip to content

Type Alias: StreamtubeTrace ​

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

Stream tubes through a 3D vector field on a grid: streamlines integrated from starting points, drawn as lit tubes colored by the vector norm, with the radius following the divergence.

Type Declaration ​

NameTypeDescription
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?| "x" | "y" | "z" | "u" | "v" | "w" | "norm" | "divergence" | "text" | "name" | `${"x" | "y" | "z" | "u" | "v" | "w" | "norm" | "divergence" | "text" | "name"}+${string}` | "all" | "none" | "skip"Which fields hover labels show: the sample's position (x, y, z), the field's vector there (u, v, w), its norm, the divergence, text and the trace name; 'skip' also turns hover events off.
lighting?StreamtubeTraceLightingPlotly's lighting model: coefficients of the ambient, diffuse and specular light. With scene.lighting, they scale the scene's lights.
lightposition?StreamtubeTraceLightpositionPosition of the light (Plotly's model, without scene.lighting), in clip space: it moves with the view.
material?Bar3dTraceMaterialThe material of the surface (Holochart extension). Plotly figures keep the default, plotly.
maxdisplayed?numberThe most samples (segments + 1) per tube. Tubes are sampled every 10 / maxdisplayed of the field’s diagonal, so this also sets the sampling step. Minimum: 0
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).
sizeref?numberScale of the tube radii. At the default 1, the tubes of adjacent starts touch where the divergence is largest. Minimum: 0
starts?StreamtubeTraceStartsWhere the tubes start. Default: the x–z plane at the lowest y of the grid, at every x and z node but the first and last.
text?stringText shown in every hover label of the trace (a single string).
type"streamtube"Trace type.
u?DataColumnx component of the vector field at each grid node (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 grid node (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 grid node (numbers).
whoverformat?stringd3 number format of w values in hover labels. Default: the scene's z axis format.
x?DataColumnX coordinates of the grid nodes (numbers, dates or categories). x, y and z list every node of a rectilinear grid (uniform or not), one axis varying fastest (any order), each axis ascending or descending; other point sets draw nothing, as in Plotly.
xhoverformat?stringd3 number format of x values in hover labels. Default: the scene's x axis format.
y?DataColumnY coordinates of the vector field's grid nodes (numbers, dates or categories), flattened: see x.
yhoverformat?stringd3 number format of y values in hover labels. Default: the scene's y axis format.
z?DataColumnZ coordinates of the vector field's grid nodes (numbers, dates or categories), flattened: see x.
zhoverformat?stringd3 number format of z values in hover labels. Default: the scene's z axis format.

Released under the MIT License.