Skip to content

Type Alias: Bar3dTrace ​

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

True 3D bars on an x/y grid (a Holochart extension): lit boxes of height z at (x, y), categorical or numeric, stacked across traces with stackgroup, colored per bar or by height through a colorscale, one instanced draw call per trace.

Type Declaration ​

NameTypeDescription
base?PerPointNumberWhere the bars start on the z axis (z data units), or one per bar. Default 0. In a stackgroup, only the bottom bar of each stack uses it.
depth?PerPointNumberBar depth along the y axis, in y axis units (one category is 1, dates in ms), or one per bar. Default: 0.8 of the smallest distance between the trace's distinct y positions (1 with a single position). Minimum: 0
hoverinfo?PerPoint< | "x" | "y" | "z" | "base" | "text" | "name" | `${"x" | "y" | "z" | "base" | "text" | "name"}+${string}` | "all" | "none" | "skip">Which fields hover labels show: the position (x, y), the height (z), the bar's base (when it has one or is stacked), text and the trace name; 'skip' also turns hover events off.
lighting?Bar3dTraceLightingPlotly's lighting model: coefficients of the ambient, diffuse and specular light. With scene.lighting, they scale the scene's lights.
lightposition?Bar3dTraceLightpositionPosition of the light (Plotly's model, without scene.lighting), in clip space: it moves with the view.
marker?Bar3dTraceMarkerBar style.
material?Bar3dTraceMaterialThe material of the surface (Holochart extension). Plotly figures keep the default, plotly.
scene?"scene" | `scene${number}`The 3D scene this trace is drawn in: 'scene' (layout.scene), 'scene2' (layout.scene2), ….
stackgroup?stringStack this trace's bars on those of earlier bar3d traces of the same scene with the same stackgroup (Plotly's barmode: 'stack', per trace like scatter's stackgroup): bars at the same (x, y) stack in trace order. Empty: no stacking (bars at the same position overlap).
text?PerPoint<string | number>Text per bar, shown in hover labels and as %{text} in templates.
type"bar3d"Trace type.
width?PerPointNumberBar width along the x axis, in x axis units (one category is 1, dates in ms), or one per bar. Default: 0.8 of the smallest distance between the trace's distinct x positions (1 with a single position). Minimum: 0
x?DataColumnX position of each bar's center (numbers, dates or categories, per the scene's x axis).
xhoverformat?stringd3 number format of x values in hover labels. Default: the scene's x axis format.
y?DataColumnY position of each bar's center (numbers, dates or categories, per the scene's y axis).
yhoverformat?stringd3 number format of y values in hover labels. Default: the scene's y axis format.
z?DataColumnBar heights along the z axis, from base (or the top of the bar below it with stackgroup). Negative heights go down.
zhoverformat?stringd3 number format of z values in hover labels. Default: the scene's z axis format.

Released under the MIT License.