@mk7s/holochart-traces-hier
Interfaces
| Interface | Description |
|---|---|
| Hierarchy | A built hierarchy. |
| HierarchyInput | What buildHierarchy reads (a defaulted trace's attributes). |
| HierNode | One node of a hierarchy: Plotly's calcdata item (cdi) and its d3 node in one object. |
| IcicleTraceInsidetextfont | Font of labels inside nodes. Defaults to textfont, with a color contrasting the node. |
| IcicleTraceLeaf | Leaf style. |
| IcicleTraceMarker | Cell style. |
| IcicleTraceMarkerLine | Cell outlines. |
| IcicleTraceMarkerPattern | Hatch pattern of the cell fill (drawn in screen px, for print and grayscale). |
| IcicleTraceOutsidetextfont | Font of the root's label when the root is transparent (it sits on the background; not with a colorscale or several roots). Defaults to textfont. |
| IcicleTracePathbar | The path bar: where the current root sits in the hierarchy. |
| IcicleTracePathbarTextfont | Font of path bar labels. Defaults to textfont, with a color contrasting the segment. |
| IcicleTraceRoot | Root style. |
| IcicleTraceTextfont | Font of node labels. Defaults to layout.font. |
| IcicleTraceTiling | How cells are laid out. |
| PartitionCell | A node placed by partition: x along the partitioned axis, y across levels. |
| RectCalc | Calcdata of a treemap or icicle trace. |
| RectLayout | Placement of a treemap or icicle in container px (top-left origin), set by crossTraceLayout. |
| SankeyCalc | Calcdata of a sankey trace. |
| SankeyGraph | - |
| SankeyLayoutOptions | - |
| SankeyTraceLink | The links. |
| SankeyTraceLinkConcentrationscales | One item of colorscales. |
| SankeyTraceLinkFlow | Flow particles (a Holochart extension): dots streaming along every link from its source to its target, spread across its width, as many as its size and density call for. Off unless link.flow is set (flow: {} turns them on). They dim with links outside a hover highlight, and hold still under prefers-reduced-motion: reduce. |
| SankeyTraceLinkLine | Outlines of the links. |
| SankeyTraceNode | The nodes. |
| SankeyTraceNodeLine | Outlines of the nodes. |
| SankeyTraceTextfont | Font of the node labels. Default: layout.font, with the automatic halo (shadow: auto). |
| SunburstCalc | Calcdata of a sunburst trace. |
| SunburstLayout | Placement of a sunburst in container px (top-left origin), set by crossTraceLayout. |
| SunburstTraceInsidetextfont | Font of labels inside nodes. Defaults to textfont, with a color contrasting the node. |
| SunburstTraceLeaf | Leaf style. |
| SunburstTraceMarker | Sector style. |
| SunburstTraceMarkerLine | Sector outlines. |
| SunburstTraceMarkerPattern | Hatch pattern of the sector fill (drawn in screen px, for print and grayscale). |
| SunburstTraceOutsidetextfont | Font of the root's label when the root is transparent (it sits on the background; not with a colorscale or several roots). Defaults to textfont. |
| SunburstTraceRoot | Root style. |
| SunburstTraceTextfont | Font of node labels. Defaults to layout.font. |
| TreemapTraceInsidetextfont | Font of labels inside nodes. Defaults to textfont, with a color contrasting the node. |
| TreemapTraceMarker | Tile style. |
| TreemapTraceMarkerLine | Tile outlines. |
| TreemapTraceMarkerPad | Padding inside branch tiles around their children, px. Defaults to twice textfont.size on the header's side (the top, the bottom with bottom text positions) and half of textfont.size elsewhere. |
| TreemapTraceMarkerPattern | Hatch pattern of the tile fill (drawn in screen px, for print and grayscale). |
| TreemapTraceOutsidetextfont | Font of the root's label when the root is transparent (it sits on the background; not with a colorscale or several roots). Defaults to textfont. |
| TreemapTracePathbar | The path bar: where the current root sits in the hierarchy. |
| TreemapTracePathbarTextfont | Font of path bar labels. Defaults to textfont, with a color contrasting the segment. |
| TreemapTraceRoot | Root style. |
| TreemapTraceTextfont | Font of node labels. Defaults to layout.font. |
| TreemapTraceTiling | How tiles are laid out. |
Type Aliases
| Type Alias | Description |
|---|---|
| BaseIcicleTrace | Icicle: a hierarchy as rows (or columns) of cells, children next to their parents, with a path bar and drill-down. |
| BaseTreemapTrace | Treemap: a hierarchy as nested rectangles sized by value, with a path bar and drill-down. |
| HierarchyResult | A hierarchy, or Plotly's warning when the rows do not make one. |
| SankeyTrace | Sankey diagram: nodes in columns sized by their flow and links between them as wide as their value; cycles are drawn as loops; drag nodes to rearrange. |
| SunburstTrace | Sunburst: a hierarchy as rings of sectors, children outside their parents, with drill-down. |
| TracesHier | Any trace of @mk7s/holochart-traces-hier, discriminated on type. Type a partial bundle's figures with it: FigureInput<TracesHier>. |
Variables
| Variable | Description |
|---|---|
| hierTraces | Every hierarchical and flow trace module, for register(...hierTraces). |
| icicle | - |
| icicleAttributes | The icicle schema. |
| sankey | - |
| sankeyAttributes | The sankey schema. |
| sunburst | - |
| sunburstAttributes | The sunburst schema. |
| treemap | - |
| treemapAttributes | The treemap schema. |
Functions
| Function | Description |
|---|---|
| buildHierarchy | Build the hierarchy of a trace's rows (see the module comment). warnings holds Plotly's messages, also when a tree was built (none today: every warning is fatal, as in Plotly). |
| nodePath | The labels from the root down to the node's parent, each followed by / (Plotly's getPath): '/' for the root, 'Eve/Seth/' for a grandchild of Eve. |
| partition | d3's partition of the subtree at entry over [0, dx] × [0, dy]: each level is dy / (entry.height + 1) tall, and children split their parent's x span by value (d3's treemapDice; a remainder or total above the children's sum leaves a gap at the end). Cells come breadth first (d3 descendants), so parents precede their children. With padding (icicle's tiling.pad), every cell then gives up padding px at its far x and y ends, and the entry starts padding px in, as in d3. |
| sankeyLayout | Lay out a sankey (see the module comment). links refer to node indices 0 … nodeCount − 1; links whose value is not positive, or whose ends are not nodes, must be filtered by the caller. |