Type Alias: Mesh3dTrace
ts
type Mesh3dTrace = CommonTraceAttributes & object;A 3D triangle mesh: vertices with explicit triangles, or triangles derived from the points (Delaunay, convex hull or alpha shape), colored by intensity through a colorscale, per vertex, per triangle or in one color, lit with Plotly’s lighting model.
Type Declaration
| Name | Type | Description |
|---|---|---|
alphahull? | number | How triangles are derived from the vertices when i / j / k are not given: -1 (default) a 2D Delaunay triangulation along delaunayaxis; 0 the convex hull; a positive value the alpha shape with this alpha (Delaunay tetrahedra with circumradius < 1 / alpha, in coordinates scaled to the unit cube per axis, as Plotly). |
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. |
cauto? | boolean | Compute the color domain from the numeric intensity 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). |
color? | string | Color of the whole mesh (without intensity, vertexcolor and facecolor). Default: the trace color from the colorway. |
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 intensity values: a name ('Viridis', 'RdBu', …), a list of colors, or [position, color] stops from 0 to 1. |
contour? | Mesh3dTraceContour | The contour drawn through the hovered point. |
delaunayaxis? | "x" | "y" | "z" | Without i / j / k and with alphahull: -1: the axis the points are projected along before their 2D Delaunay triangulation (z triangulates the x–y positions). Suits a single surface layer seen along this axis. |
facecolor? | DataColumn | A CSS color per triangle. Takes precedence over color (not over intensity); only used without vertexcolor. |
flatshading? | boolean | Flat shading: one normal per triangle (faceted look) instead of normals interpolated across triangles. |
i? | DataColumn | Index (into x / y / z) of the first vertex of each triangle: triangle m joins vertices i[m], j[m] and k[m]. Give all three or none (then alphahull makes the triangles). Indices are rounded; one out of range hides the trace, as in Plotly. |
intensity? | DataColumn | Values mapped through the colorscale: one per vertex (intensitymode: "vertex", interpolated across triangles) or one per triangle ("cell"). Takes precedence over vertexcolor, facecolor and color. |
intensitymode? | "vertex" | "cell" | Whether intensity holds one value per vertex or per triangle (cell). |
j? | DataColumn | Index (into x / y / z) of the second vertex of each triangle: triangle m joins vertices i[m], j[m] and k[m]. Give all three or none (then alphahull makes the triangles). Indices are rounded; one out of range hides the trace, as in Plotly. |
k? | DataColumn | Index (into x / y / z) of the third vertex of each triangle: triangle m joins vertices i[m], j[m] and k[m]. Give all three or none (then alphahull makes the triangles). Indices are rounded; one out of range hides the trace, as in Plotly. |
lighting? | Mesh3dTraceLighting | Plotly's lighting model: coefficients of the ambient, diffuse and specular light. With scene.lighting, they scale the scene's lights. |
lightposition? | Mesh3dTraceLightposition | 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. |
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). |
text? | PerPoint<string | number> | Text per vertex (per triangle with cell colors: intensitymode: "cell" or facecolor), shown in hover labels and as %{text} in templates. |
type | "mesh3d" | Trace type. |
vertexcolor? | DataColumn | A CSS color per vertex, interpolated across triangles. Takes precedence over facecolor and color (not over intensity). |
x? | DataColumn | X coordinates of the vertices (numbers, dates or categories). x, y and z must have the same length. |
xhoverformat? | string | d3 number or date format of x values in hover labels. Default: the scene's x axis format. |
y? | DataColumn | Y coordinates of the vertices (numbers, dates or categories). x, y and z must have the same length. |
yhoverformat? | string | d3 number or date format of y values in hover labels. Default: the scene's y axis format. |
z? | DataColumn | Z coordinates of the vertices (numbers, dates or categories). x, y and z must have the same length. |
zhoverformat? | string | d3 number or date format of z values in hover labels. Default: the scene's z axis format. |