Skip to content

Variable: volumeAttributes ​

ts
const volumeAttributes: ObjectNode<{
  autocolorscale: AttrSpec<boolean, boolean | undefined>;
  caps: ObjectNode<{
     x: ObjectNode<{
        fill: Attr<number, {
           description: "Share of each cap triangle drawn: below 1 leaves a hole in each triangle, 0 hides the caps.";
           dflt: 1;
           editType: "calc";
           max: 1;
           min: 0;
        }>;
        show: Attr<boolean, {
           description:   | "Draw the caps: the grid's two boundary faces of constant x where the values are in `[isomin, isomax]`, which close the surfaces cut by the grid's edge."
              | "Draw the caps: the grid's two boundary faces of constant y where the values are in `[isomin, isomax]`, which close the surfaces cut by the grid's edge."
              | "Draw the caps: the grid's two boundary faces of constant z where the values are in `[isomin, isomax]`, which close the surfaces cut by the grid's edge.";
           dflt: true;
           editType: "calc";
        }>;
     }>;
     y: ObjectNode<{
        fill: Attr<number, {
           description: "Share of each cap triangle drawn: below 1 leaves a hole in each triangle, 0 hides the caps.";
           dflt: 1;
           editType: "calc";
           max: 1;
           min: 0;
        }>;
        show: Attr<boolean, {
           description:   | "Draw the caps: the grid's two boundary faces of constant x where the values are in `[isomin, isomax]`, which close the surfaces cut by the grid's edge."
              | "Draw the caps: the grid's two boundary faces of constant y where the values are in `[isomin, isomax]`, which close the surfaces cut by the grid's edge."
              | "Draw the caps: the grid's two boundary faces of constant z where the values are in `[isomin, isomax]`, which close the surfaces cut by the grid's edge.";
           dflt: true;
           editType: "calc";
        }>;
     }>;
     z: ObjectNode<{
        fill: Attr<number, {
           description: "Share of each cap triangle drawn: below 1 leaves a hole in each triangle, 0 hides the caps.";
           dflt: 1;
           editType: "calc";
           max: 1;
           min: 0;
        }>;
        show: Attr<boolean, {
           description:   | "Draw the caps: the grid's two boundary faces of constant x where the values are in `[isomin, isomax]`, which close the surfaces cut by the grid's edge."
              | "Draw the caps: the grid's two boundary faces of constant y where the values are in `[isomin, isomax]`, which close the surfaces cut by the grid's edge."
              | "Draw the caps: the grid's two boundary faces of constant z where the values are in `[isomin, isomax]`, which close the surfaces cut by the grid's edge.";
           dflt: true;
           editType: "calc";
        }>;
     }>;
  }>;
  cauto: AttrSpec<boolean, boolean | undefined>;
  cmax: AttrSpec<number, number | undefined>;
  cmid: AttrSpec<number, number | undefined>;
  cmin: AttrSpec<number, number | undefined>;
  coloraxis: AttrSpec<string, string | undefined>;
  colorbar: ObjectNode<{
     bgcolor: Attr<string, {
        description: "Background of the box.";
        dflt: "rgba(0,0,0,0)";
     }>;
     bordercolor: Attr<string, {
        description: "Border color of the colorbar box.";
        dflt: "#444";
     }>;
     borderwidth: Attr<number, {
        description: "Border width of the box, px.";
        dflt: 0;
        min: 0;
     }>;
     dtick: AttrSpec<unknown, unknown>;
     exponentformat: Attr<"none" | "e" | "E" | "power" | "SI" | "B", {
        description: "How large and small numbers are written: `none` (1000000), `e` (1e+6), `E` (1E+6), `power` (1×10⁶), `SI` (1M), `B` (like SI but 1B for 10⁹).";
        dflt: "B";
        editType: readonly (
           | "calc"
           | "calcIfAutorange"
           | "crossTraceCalc"
           | "layout"
           | "ticks"
           | "plot"
           | "style"
           | "colorbars"
           | "legend"
           | "modebar"
           | "camera"
          | "none")[];
        values: readonly ["none", "e", "E", "power", "SI", "B"];
     }>;
     len: Attr<number, {
        description: "Length of the colorbar along its axis, padding included (`ypad` / `xpad`).";
        dflt: 1;
        min: 0;
     }>;
     lenmode: Attr<"fraction" | "pixels", {
        description: "Unit of `len`: px, or a fraction of the plot height (`v`) / width (`h`).";
        dflt: "fraction";
        values: readonly ["fraction", "pixels"];
     }>;
     minexponent: Attr<number, {
        description: "Smallest decimal exponent written in exponent form (`SI`/`B` and exponent formats); smaller magnitudes are written out in full.";
        dflt: 3;
        editType: readonly (
           | "calc"
           | "calcIfAutorange"
           | "crossTraceCalc"
           | "layout"
           | "ticks"
           | "plot"
           | "style"
           | "colorbars"
           | "legend"
           | "modebar"
           | "camera"
          | "none")[];
        min: 0;
     }>;
     nticks: Attr<number, {
        description: "Maximum number of ticks for `tickmode: auto` (the actual number may be lower so steps stay round). 0 picks it from the axis length.";
        dflt: 0;
        editType: "ticks";
        min: 0;
     }>;
     orientation: Attr<"v" | "h", {
        description: "Vertical bar (`v`, beside the plot) or horizontal bar (`h`, above or below).";
        dflt: "v";
        values: readonly ["h", "v"];
     }>;
     outlinecolor: Attr<string, {
        description: "Color of the outline around the bar.";
        dflt: "#444";
     }>;
     outlinewidth: Attr<number, {
        description: "Outline width, px.";
        dflt: 1;
        min: 0;
     }>;
     separatethousands: Attr<boolean, {
        description: "Always separate thousands (1,000). By default only numbers with 5 or more integer digits are separated.";
        dflt: false;
        editType: readonly (
           | "calc"
           | "calcIfAutorange"
           | "crossTraceCalc"
           | "layout"
           | "ticks"
           | "plot"
           | "style"
           | "colorbars"
           | "legend"
           | "modebar"
           | "camera"
          | "none")[];
     }>;
     showexponent: Attr<"none" | "all" | "first" | "last", {
        description: "Which tick labels show the exponent.";
        dflt: "all";
        editType: readonly (
           | "calc"
           | "calcIfAutorange"
           | "crossTraceCalc"
           | "layout"
           | "ticks"
           | "plot"
           | "style"
           | "colorbars"
           | "legend"
           | "modebar"
           | "camera"
          | "none")[];
        values: readonly ["all", "first", "last", "none"];
     }>;
     showticklabels: Attr<boolean, {
        description: "Show tick labels.";
        dflt: true;
        editType: readonly (
           | "calc"
           | "calcIfAutorange"
           | "crossTraceCalc"
           | "layout"
           | "ticks"
           | "plot"
           | "style"
           | "colorbars"
           | "legend"
           | "modebar"
           | "camera"
          | "none")[];
     }>;
     showtickprefix: Attr<"none" | "all" | "first" | "last", {
        description: "Which tick labels get `tickprefix`.";
        dflt: "all";
        editType: readonly (
           | "calc"
           | "calcIfAutorange"
           | "crossTraceCalc"
           | "layout"
           | "ticks"
           | "plot"
           | "style"
           | "colorbars"
           | "legend"
           | "modebar"
           | "camera"
          | "none")[];
        values: readonly ["all", "first", "last", "none"];
     }>;
     showticksuffix: Attr<"none" | "all" | "first" | "last", {
        description: "Which tick labels get `ticksuffix`.";
        dflt: "all";
        editType: readonly (
           | "calc"
           | "calcIfAutorange"
           | "crossTraceCalc"
           | "layout"
           | "ticks"
           | "plot"
           | "style"
           | "colorbars"
           | "legend"
           | "modebar"
           | "camera"
          | "none")[];
        values: readonly ["all", "first", "last", "none"];
     }>;
     thickness: Attr<number, {
        description: "Thickness of the color bar.";
        dflt: 30;
        min: 0;
     }>;
     thicknessmode: Attr<"fraction" | "pixels", {
        description: "Unit of `thickness`: px, or a fraction of the plot width (`v`) / height (`h`).";
        dflt: "pixels";
        values: readonly ["fraction", "pixels"];
     }>;
     tick0: AttrSpec<unknown, unknown>;
     tickangle: Attr<number | "auto", {
        description: "Tick-label rotation in degrees. `auto` rotates x-axis labels by the first `autotickangles` entry that avoids overlap.";
        dflt: "auto";
        editType: readonly (
           | "calc"
           | "calcIfAutorange"
           | "crossTraceCalc"
           | "layout"
           | "ticks"
           | "plot"
           | "style"
           | "colorbars"
           | "legend"
           | "modebar"
           | "camera"
          | "none")[];
        extras: readonly ["auto"];
     }>;
     tickcolor: Attr<string, {
        description: "Tick color. Defaults to `color`.";
        editType: "ticks";
     }>;
     tickfont: ObjectNode<{
        color: Attr<string, {
           description: "Text color.";
           editType: "style";
        }>;
        family: Attr<string, {
           description: "CSS font-family list. The renderer uses the first family it can load and falls back through the list.";
           noBlank: true;
           strict: true;
        }>;
        lineposition: Attr<
           | "none"
           | "under"
           | "over"
           | "through"
           | `under+${string}`
           | `over+${string}`
           | `through+${string}`, {
           description: "Text decoration: `under`, `over` and/or `through` joined with `+` (e.g. `under+over`), or `none`.";
           extras: readonly ["none"];
           flags: readonly ["under", "over", "through"];
        }>;
        shadow: Attr<string, {
           description: "CSS `text-shadow` behind the text (`2px 2px 3px black`; only the first shadow is drawn), `none`, or `auto` for a thin halo in the contrast color of the text.";
        }>;
        size: Attr<number, {
           description: "Font size in CSS pixels.";
           min: 1;
        }>;
        style: Attr<"normal" | "italic", {
           description: "Font style.";
           values: readonly ["normal", "italic"];
        }>;
        textcase: Attr<"normal" | "word caps" | "upper" | "lower", {
           description: "Letter case transform: `upper`, `lower`, `word caps` (first letter of each word), or `normal`.";
           values: readonly ["normal", "word caps", "upper", "lower"];
        }>;
        variant: Attr<
           | "normal"
           | "small-caps"
           | "all-small-caps"
           | "all-petite-caps"
           | "petite-caps"
           | "unicase", {
           description: "Capitals variant (CSS `font-variant-caps`). The SDF text renderer approximates small and petite caps with uppercase letters at a reduced size.";
           values: readonly ["normal", "small-caps", "all-small-caps", "all-petite-caps", "petite-caps", "unicase"];
        }>;
        weight: Attr<number | "normal" | "bold", {
           description: "Font weight: a CSS numeric weight (1–1000), `normal` or `bold`.";
           extras: readonly ["normal", "bold"];
           max: 1000;
           min: 1;
        }>;
     }>;
     tickformat: Attr<string, {
        description: "Tick-label format: a d3-format specifier for numbers (`.2f`, `~s`, `$,`) or a d3-time-format specifier for dates (`%b %Y`), plus `%{n}f` for `n` digits of fractional seconds and `%h` for the half year. Empty picks a format automatically.";
        dflt: "";
        editType: readonly (
           | "calc"
           | "calcIfAutorange"
           | "crossTraceCalc"
           | "layout"
           | "ticks"
           | "plot"
           | "style"
           | "colorbars"
           | "legend"
           | "modebar"
           | "camera"
          | "none")[];
     }>;
     ticklabeloverflow: Attr<"allow" | "hide past div" | "hide past domain", {
        description: "Hide labels past the figure or past the bar. Defaults to `hide past domain` for inside labels, else `hide past div`.";
        values: readonly ["allow", "hide past div", "hide past domain"];
     }>;
     ticklabelposition: Attr<
        | "outside"
        | "inside"
        | "outside top"
        | "inside top"
        | "outside left"
        | "inside left"
        | "outside right"
        | "inside right"
        | "outside bottom"
        | "inside bottom", {
        description: "Tick labels outside the bar (away from it) or inside (over it); `top`/`bottom` (`v`) or `left`/`right` (`h`) move them beside their tick.";
        dflt: "outside";
        values: readonly ["outside", "inside", "outside top", "inside top", "outside bottom", "inside bottom", "outside left", "inside left", "outside right", "inside right"];
     }>;
     ticklabelstep: Attr<number, {
        description: "Label every n-th tick only (`tickmode` `auto` and `linear`).";
        dflt: 1;
        editType: "ticks";
        min: 1;
     }>;
     ticklen: Attr<number, {
        description: "Tick length in px.";
        dflt: 5;
        editType: readonly (
           | "calc"
           | "calcIfAutorange"
           | "crossTraceCalc"
           | "layout"
           | "ticks"
           | "plot"
           | "style"
           | "colorbars"
           | "legend"
           | "modebar"
           | "camera"
          | "none")[];
        min: 0;
     }>;
     tickmode: Attr<"auto" | "linear" | "array" | "sync", {
        description: "`auto` picks up to `nticks` round ticks; `linear` places ticks from `tick0` every `dtick`; `array` uses `tickvals`/`ticktext`; `sync` aligns with the overlaid axis (reserved; behaves as `auto`). Defaults to `array` when `tickvals` is set, `linear` when `dtick` is set, else `auto`.";
        editType: "ticks";
        values: readonly ["auto", "linear", "array", "sync"];
     }>;
     tickprefix: Attr<string, {
        description: "Text before each tick label.";
        dflt: "";
        editType: readonly (
           | "calc"
           | "calcIfAutorange"
           | "crossTraceCalc"
           | "layout"
           | "ticks"
           | "plot"
           | "style"
           | "colorbars"
           | "legend"
           | "modebar"
           | "camera"
          | "none")[];
     }>;
     ticks: Attr<"" | "outside" | "inside", {
        description: "Draw tick marks outside or inside the plot area, or not at all (`''`).";
        dflt: "";
        editType: EditType;
        values: readonly ["outside", "inside", ""];
     }>;
     ticksuffix: Attr<string, {
        description: "Text after each tick label.";
        dflt: "";
        editType: readonly (
           | "calc"
           | "calcIfAutorange"
           | "crossTraceCalc"
           | "layout"
           | "ticks"
           | "plot"
           | "style"
           | "colorbars"
           | "legend"
           | "modebar"
           | "camera"
          | "none")[];
     }>;
     ticktext: AttrSpec<DataArray, DataArray | undefined>;
     tickvals: AttrSpec<DataArray, DataArray | undefined>;
     tickwidth: Attr<number, {
        description: "Tick width in px.";
        dflt: 1;
        editType: "ticks";
        min: 0;
     }>;
     title: ObjectNode<{
        font: ObjectNode<{
           color: Attr<string, {
              description: "Text color.";
              editType: "style";
           }>;
           family: Attr<string, {
              description: "CSS font-family list. The renderer uses the first family it can load and falls back through the list.";
              noBlank: true;
              strict: true;
           }>;
           lineposition: Attr<
              | "none"
              | "under"
              | "over"
              | "through"
              | `under+${(...)}`
              | `over+${(...)}`
              | `through+${(...)}`, {
              description: "Text decoration: `under`, `over` and/or `through` joined with `+` (e.g. `under+over`), or `none`.";
              extras: readonly [...];
              flags: readonly [..., ..., ...];
           }>;
           shadow: Attr<string, {
              description: "CSS `text-shadow` behind the text (`2px 2px 3px black`; only the first shadow is drawn), `none`, or `auto` for a thin halo in the contrast color of the text.";
           }>;
           size: Attr<number, {
              description: "Font size in CSS pixels.";
              min: 1;
           }>;
           style: Attr<"normal" | "italic", {
              description: "Font style.";
              values: readonly [..., ...];
           }>;
           textcase: Attr<"normal" | "word caps" | "upper" | "lower", {
              description: "Letter case transform: `upper`, `lower`, `word caps` (first letter of each word), or `normal`.";
              values: readonly [..., ..., ..., ...];
           }>;
           variant: Attr<
              | "normal"
              | "small-caps"
              | "all-small-caps"
              | "all-petite-caps"
              | "petite-caps"
              | "unicase", {
              description: "Capitals variant (CSS `font-variant-caps`). The SDF text renderer approximates small and petite caps with uppercase letters at a reduced size.";
              values: readonly [..., ..., ..., ..., ..., ...];
           }>;
           weight: Attr<number | "normal" | "bold", {
              description: "Font weight: a CSS numeric weight (1–1000), `normal` or `bold`.";
              extras: readonly [..., ...];
              max: 1000;
              min: 1;
           }>;
        }>;
        side: Attr<"right" | "top" | "bottom", {
           description: "Where the title goes relative to the bar. Defaults to `top` (`v`) or `right` (`h`).";
           values: readonly ["right", "top", "bottom"];
        }>;
        text: Attr<string, {
           description: "Colorbar title.";
           dflt: "";
        }>;
     }>;
     x: Attr<number, {
        description: "Horizontal position (`xref` fraction). Defaults to 1.02 (`v`, paper), 1 (`v`, container) or 0.5 (`h`).";
     }>;
     xanchor: Attr<"left" | "center" | "right", {
        description: "Which side of the colorbar sits at `x`. Defaults to `left` (`v`, paper), `right` (`v`, container) or `center` (`h`).";
        values: readonly ["left", "center", "right"];
     }>;
     xpad: Attr<number, {
        description: "Horizontal padding, px.";
        dflt: 10;
        min: 0;
     }>;
     xref: Attr<"container" | "paper", {
        description: "Reference of `x`: the plot area (`paper`) or the whole figure.";
        dflt: "paper";
        values: readonly ["container", "paper"];
     }>;
     y: Attr<number, {
        description: "Vertical position (`yref` fraction). Defaults to 0.5 (`v`), 1.02 (`h`, paper) or 1 (`h`, container).";
     }>;
     yanchor: Attr<"top" | "middle" | "bottom", {
        description: "Which side of the colorbar sits at `y`. Defaults to `middle` (`v`), `bottom` (`h`, paper) or `top` (`h`, container).";
        values: readonly ["top", "middle", "bottom"];
     }>;
     ypad: Attr<number, {
        description: "Vertical padding, px.";
        dflt: 10;
        min: 0;
     }>;
     yref: Attr<"container" | "paper", {
        description: "Reference of `y`: the plot area (`paper`) or the whole figure.";
        dflt: "paper";
        values: readonly ["container", "paper"];
     }>;
  }>;
  colorscale: AttrSpec<ColorScale, ColorScale | undefined>;
  flatshading: Attr<boolean, {
     description: "Flat shading: one normal per triangle (the default, as in Plotly: the extracted triangles share no vertices, so smooth shading looks the same).";
     dflt: true;
     editType: "calc";
  }>;
  isomax: Attr<number, {
     description:   | "Upper end of the value range drawn. Default: the largest value."
        | "Upper end of the value range of the isosurfaces. Default: the largest value.";
     editType: "calc";
  }>;
  isomin: Attr<number, {
     description:   | "Lower end of the value range drawn. Default: the smallest value."
        | "Lower end of the value range of the isosurfaces. Default: the smallest value.";
     editType: "calc";
  }>;
  lighting: ObjectNode<Record<string, any>>;
  lightposition: ObjectNode<{
     x: Attr<number, {
        description: `${string} of the light, in clip space (moves with the view; ±1 is the edge of the view, 1e5 far away).`;
        dflt: number;
        editType: "calc";
        max: 100000;
        min: -100000;
     }>;
     y: Attr<number, {
        description: `${string} of the light, in clip space (moves with the view; ±1 is the edge of the view, 1e5 far away).`;
        dflt: number;
        editType: "calc";
        max: 100000;
        min: -100000;
     }>;
     z: Attr<number, {
        description: `${string} of the light, in clip space (moves with the view; ±1 is the edge of the view, 1e5 far away).`;
        dflt: number;
        editType: "calc";
        max: 100000;
        min: -100000;
     }>;
  }>;
  material: ObjectNode<{
     castshadow: Attr<boolean, {
        description: "Cast shadows from the lights of `scene.lighting` with `castshadow` (onto three.js material types and the ground plane).";
        dflt: false;
        editType: "calc";
     }>;
     clearcoat: Attr<number, {
        description: string;
        editType: "calc";
        max: 1;
        min: 0;
     }>;
     clearcoatroughness: Attr<number, {
        description: string;
        editType: "calc";
        max: 1;
        min: 0;
     }>;
     emissive: Attr<string, {
        description: string;
        editType: "calc";
     }>;
     emissiveintensity: Attr<number, {
        description: string;
        editType: "calc";
        min: 0;
     }>;
     envmapintensity: Attr<number, {
        description: string;
        editType: "calc";
        min: 0;
     }>;
     ior: Attr<number, {
        description: "Index of refraction (`physical`). Default 1.5.";
        editType: "calc";
        max: 2.333;
        min: 1;
     }>;
     iridescence: Attr<number, {
        description: string;
        editType: "calc";
        max: 1;
        min: 0;
     }>;
     matcap: Attr<string, {
        description: "URL of a matcap image (`matcap`): the surface takes its colors from it by normal direction.";
        editType: "calc";
     }>;
     metalness: Attr<number, {
        description: string;
        editType: "calc";
        max: 1;
        min: 0;
     }>;
     receiveshadow: Attr<boolean, {
        description: "Receive shadows (three.js material types only).";
        dflt: false;
        editType: "calc";
     }>;
     reflectivity: Attr<number, {
        description: string;
        editType: "calc";
        max: 1;
        min: 0;
     }>;
     roughness: Attr<number, {
        description: string;
        editType: "calc";
        max: 1;
        min: 0;
     }>;
     sheen: Attr<number, {
        description: string;
        editType: "calc";
        max: 1;
        min: 0;
     }>;
     sheencolor: Attr<string, {
        description: string;
        editType: "calc";
     }>;
     sheenroughness: Attr<number, {
        description: string;
        editType: "calc";
        max: 1;
        min: 0;
     }>;
     shininess: Attr<number, {
        description: string;
        editType: "calc";
        min: 0;
     }>;
     specular: Attr<string, {
        description: string;
        editType: "calc";
     }>;
     steps: Attr<number, {
        description: "Number of shading bands (`toon`).";
        dflt: 3;
        editType: "calc";
        max: 16;
        min: 2;
     }>;
     thickness: Attr<number, {
        description: string;
        editType: "calc";
        min: 0;
     }>;
     transmission: Attr<number, {
        description: string;
        editType: "calc";
        max: 1;
        min: 0;
     }>;
     type: Attr<
        | "flat"
        | "plotly"
        | "basic"
        | "lambert"
        | "phong"
        | "standard"
        | "physical"
        | "toon"
        | "matcap", {
        description: "How surfaces are shaded. `plotly`: Plotly's lighting model. `flat`: unlit, colors as given. `basic`, `lambert`, `phong`, `standard`, `physical`, `toon`, `matcap`: the three.js material of that name, lit by the lights of the scene (`scene.lighting`) or of the 2.5D view.";
        dflt: "plotly";
        editType: "calc";
        values: readonly ["plotly", "flat", "basic", "lambert", "phong", "standard", "physical", "toon", "matcap"];
     }>;
  }>;
  opacityscale: AttrSpec<unknown, unknown>;
  raymarch: ObjectNode<{
     shading: Attr<boolean, {
        description: "Shade by the value gradient: a light at the camera, with the trace's `lighting.ambient` and `lighting.diffuse` (six more samples per step).";
        dflt: false;
        editType: "plot";
     }>;
     step: Attr<number, {
        description: "Sample spacing along the rays, in grid cells: smaller is finer and slower (the opacity per cell stays the same).";
        dflt: 0.5;
        editType: "plot";
        max: 4;
        min: 0.05;
     }>;
  }>;
  render: Attr<"isosurfaces" | "raymarch", {
     description: "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.";
     dflt: "isosurfaces";
     editType: "calc";
     values: readonly ["isosurfaces", "raymarch"];
  }>;
  reversescale: AttrSpec<boolean, boolean>;
  scene: Attr<"scene" | `scene${number}`, {
     description: "The 3D scene this trace is drawn in: `'scene'` (`layout.scene`), `'scene2'` (`layout.scene2`), ….";
     dflt: "scene";
     editType: "calc";
  }>;
  showscale: AttrSpec<boolean, boolean>;
  slices: ObjectNode<{
     x: ObjectNode<{
        fill: Attr<number, {
           description: "Share of each slice triangle drawn: below 1 leaves a hole in each triangle (a lattice), 0 hides the slices.";
           dflt: 1;
           editType: "calc";
           max: 1;
           min: 0;
        }>;
        locations: AttrSpec<DataArray, DataArray | undefined>;
        show: Attr<boolean, {
           description:   | "Draw slices: planes of constant x through the grid, where the values are in `[isomin, isomax]`."
              | "Draw slices: planes of constant y through the grid, where the values are in `[isomin, isomax]`."
              | "Draw slices: planes of constant z through the grid, where the values are in `[isomin, isomax]`.";
           dflt: false;
           editType: "calc";
        }>;
     }>;
     y: ObjectNode<{
        fill: Attr<number, {
           description: "Share of each slice triangle drawn: below 1 leaves a hole in each triangle (a lattice), 0 hides the slices.";
           dflt: 1;
           editType: "calc";
           max: 1;
           min: 0;
        }>;
        locations: AttrSpec<DataArray, DataArray | undefined>;
        show: Attr<boolean, {
           description:   | "Draw slices: planes of constant x through the grid, where the values are in `[isomin, isomax]`."
              | "Draw slices: planes of constant y through the grid, where the values are in `[isomin, isomax]`."
              | "Draw slices: planes of constant z through the grid, where the values are in `[isomin, isomax]`.";
           dflt: false;
           editType: "calc";
        }>;
     }>;
     z: ObjectNode<{
        fill: Attr<number, {
           description: "Share of each slice triangle drawn: below 1 leaves a hole in each triangle (a lattice), 0 hides the slices.";
           dflt: 1;
           editType: "calc";
           max: 1;
           min: 0;
        }>;
        locations: AttrSpec<DataArray, DataArray | undefined>;
        show: Attr<boolean, {
           description:   | "Draw slices: planes of constant x through the grid, where the values are in `[isomin, isomax]`."
              | "Draw slices: planes of constant y through the grid, where the values are in `[isomin, isomax]`."
              | "Draw slices: planes of constant z through the grid, where the values are in `[isomin, isomax]`.";
           dflt: false;
           editType: "calc";
        }>;
     }>;
  }>;
  spaceframe: ObjectNode<{
     fill: Attr<number, {
        description:   | "Share of each space-frame triangle drawn (default 1)."
           | "Share of each space-frame triangle drawn (default 0.15: thin frames).";
        dflt: 0.15 | 1;
        editType: "calc";
        max: 1;
        min: 0;
     }>;
     show: Attr<boolean, {
        description: "Draw the space frame: the faces of the central tetrahedron of every grid cell inside `[isomin, isomax]`, useful with open surfaces or caps.";
        dflt: false;
        editType: "calc";
     }>;
  }>;
  surface: ObjectNode<{
     count: Attr<number, {
        description: "Number of isosurfaces, evenly spread from `isomin` to `isomax` (2: just those two; 1: the middle value).";
        dflt: 2;
        editType: "calc";
        min: 1;
     }>;
     fill: Attr<number, {
        description: "Share of each surface triangle drawn: below 1 leaves a hole in each triangle (a lattice), 0 hides the surfaces.";
        dflt: 1;
        editType: "calc";
        max: 1;
        min: 0;
     }>;
     pattern: Attr<
        | "all"
        | "E"
        | "B"
        | "A"
        | "C"
        | "D"
        | "odd"
        | "even"
        | `E+${string}`
        | `B+${string}`
        | `A+${string}`
        | `C+${string}`
        | `D+${string}`, {
        description: "Which parts of the surfaces are drawn: every grid cell is cut into five tetrahedra (`A`–`D` at four corners, `E` in the middle); `'all'`, a combination such as `'A+B'`, or `'odd'` / `'even'` (only the cells whose `i + j + k` is odd / even: a checkerboard).";
        dflt: "all";
        editType: "calc";
        extras: readonly ["all", "odd", "even"];
        flags: readonly ["A", "B", "C", "D", "E"];
     }>;
     show: Attr<boolean, {
        description: "Draw the isosurfaces between `isomin` and `isomax`.";
        dflt: true;
        editType: "calc";
     }>;
  }>;
  text: Attr<string | readonly string[], {
     arrayOk: true;
     description: "Text per grid point, shown in hover labels (after the value) and as `%{text}` in templates.";
     dflt: "";
     editType: "calc";
  }>;
  value: AttrSpec<DataArray, DataArray | undefined>;
  valuehoverformat: Attr<string, {
     description: `d3 number format of ${string} values in hover labels. Default: ${string}.`;
     dflt: "";
     editType: "none";
  }>;
  x: AttrSpec<DataArray, DataArray | undefined>;
  xhoverformat: Attr<string, {
     description: `d3 number format of ${string} values in hover labels. Default: ${string}.`;
     dflt: "";
     editType: "none";
  }>;
  y: AttrSpec<DataArray, DataArray | undefined>;
  yhoverformat: Attr<string, {
     description: `d3 number format of ${string} values in hover labels. Default: ${string}.`;
     dflt: "";
     editType: "none";
  }>;
  z: AttrSpec<DataArray, DataArray | undefined>;
  zhoverformat: Attr<string, {
     description: `d3 number format of ${string} values in hover labels. Default: ${string}.`;
     dflt: "";
     editType: "none";
  }>;
}>;

Experimental

The volume schema.

Released under the MIT License.