Type Alias: VolumeTrace
ts
type VolumeTrace = CommonTraceAttributes & object;A scalar field on a 3D grid drawn as a volume: stacked translucent isosurfaces (as Plotly) or GPU ray marching, with an opacity scale, colored by value.
Type Declaration
| Name | Type | Description |
|---|---|---|
autocolorscale? | boolean | Pick 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. |
caps? | VolumeTraceCaps | Caps on the grid's boundary. |
cauto? | boolean | Compute the color domain from the numeric value values. Defaults to false when both cmin and cmax are given. |
cmax? | number | Value mapped to the last colorscale color (with cmin; turns cauto off). |
cmid? | number | With cauto, widen the automatic domain so it is symmetric around this value (diverging data). |
cmin? | number | Value 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? | Colorbar | The colorbar of this colorscale (plan E5.3). |
colorscale? | | ColorScale | readonly string[] | readonly readonly (number | string)[][] | Colorscale for numeric value values: a name ('Viridis', 'RdBu', …), a list of colors, or [position, color] stops from 0 to 1. |
flatshading? | boolean | Flat shading: one normal per triangle (the default, as in Plotly: the extracted triangles share no vertices, so smooth shading looks the same). |
isomax? | number | Upper end of the value range drawn. Default: the largest value. |
isomin? | number | Lower end of the value range drawn. Default: the smallest value. |
lighting? | VolumeTraceLighting | Plotly's lighting model: coefficients of the ambient, diffuse and specular light. With scene.lighting, they scale the scene's lights. |
lightposition? | VolumeTraceLightposition | Position of the light (Plotly's model, without scene.lighting), in clip space: it moves with the view. |
material? | Bar3dTraceMaterial | The material of the surface (Holochart extension). Plotly figures keep the default, plotly. |
opacityscale? | unknown | Opacity by value, like a colorscale: [[0, 0.1], [0.5, 1], [1, 0.4]] (positions 0–1 of the color domain, opacities 0–1), or 'max' (the highest values opaque, the lowest faded to 0.1), 'min' (the reverse), 'extremes' (both ends opaque, the middle faded) or 'uniform' (the default: opacity everywhere). Multiplies opacity. |
raymarch? | VolumeTraceRaymarch | Ray-marching options (render: 'raymarch'). |
render? | "isosurfaces" | "raymarch" | How the volume is drawn (Holochart extension). 'isosurfaces': Plotly's stacked translucent isosurfaces (surface.count of them), with caps, slices and the space frame. 'raymarch': GPU ray marching through the grid (a 3D texture), every value in [isomin, isomax] drawn with the colorscale and opacity · opacityscale (the opacity of one grid cell's thickness); surface, caps, slices and spaceframe don't apply. |
reversescale? | boolean | Reverse 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? | boolean | Show a colorbar for this colorscale (drawn by the colorbar component, plan E5.3). |
slices? | VolumeTraceSlices | Slices through the grid. |
spaceframe? | VolumeTraceSpaceframe | The space frame. |
surface? | VolumeTraceSurface | The isosurfaces. |
text? | PerPoint<string | number> | Text per grid point, shown in hover labels (after the value) and as %{text} in templates. |
type | "volume" | Trace type. |
value? | DataColumn | The value at every grid point (numbers): the field whose level surfaces are drawn and which the colorscale maps. |
valuehoverformat? | string | d3 number format of value values in hover labels. Default: the value with hover precision. |
x? | DataColumn | X coordinate of every grid point (numbers, dates or categories): x, y, z and value are flattened columns of a rectilinear grid, one entry per point, the axes nested in any order. |
xhoverformat? | string | d3 number format of x values in hover labels. Default: the scene's x axis format. |
y? | DataColumn | Y coordinate of every grid point (numbers, dates or categories): x, y, z and value are flattened columns of a rectilinear grid, one entry per point, the axes nested in any order. |
yhoverformat? | string | d3 number format of y values in hover labels. Default: the scene's y axis format. |
z? | DataColumn | Z coordinate of every grid point (numbers, dates or categories): x, y, z and value are flattened columns of a rectilinear grid, one entry per point, the axes nested in any order. |
zhoverformat? | string | d3 number format of z values in hover labels. Default: the scene's z axis format. |