Tree Diagram

A flat parent-child table is normalized into hierarchy rows, then laid out as nodes and curved links.

Tree Diagram
Tree Diagram Pipeline pipeline

Data Sources

4

Fields

23

Scales

1

Layers

6

Glyphs

32

rect 3 / path 9 / point 10 / text 10

Growth Program to AcquireAcquire to SearchAcquire to PartnersGrowth Program to RetainRetain to OnboardingRetain to SupportGrowth Program to ExpandExpand to Cross-sellExpand to Enterprisegrowth growthacquire acquiresearch searchpartners partnersretain retainonboarding onboardingsupport supportexpand expandcross-sell cross-sellenterprise enterpriseGrowth ProgramGrowth ProgramAcquireAcquireSearchSearchPartnersPartnersRetainRetainOnboardingOnboardingSupportSupportExpandExpandCross-sellCross-sellEnterpriseEnterprise

Build Path

Tree Diagram Pipeline

This example is rebuilt from gallery data source tree-rows by recipe treeDiagram: raw table rows -> TabularSource -> pipeline drafts -> analyzeAuthoringDrafts() -> materialized ChartSpec -> compileChart() -> SceneGraph -> SVG. The graph below shows the authored pipeline stage.

Pipeline recipe graph

9 pipelines
10 nodes
7 edges

Data Flow Diagram

0/338 nodes
0/583 edges
338 hidden

Select a glyph to highlight its complete source path.

Scope

Roles

source
transform
field
scale
layer
param
glyph

No matching flow nodes

Adjust search, scope, or role filters.

Available Data

4 tables
3 transforms

Imported table

source_gallery_treediagram
raw
7 columns
feeds pipeline_tree_hierarchy_transform

ChartSpec

{
  "id": "gallery.treeDiagram",
  "data": [
    {
      "id": "source_gallery_treediagram",
      "rows": 10
    },
    {
      "id": "source_hierarchy",
      "rows": 10
    },
    {
      "id": "source_tree_nodes",
      "rows": 10
    },
    {
      "id": "source_tree_links",
      "rows": 9
    }
  ],
  "transforms": [
    {
      "id": "pipeline_tree_hierarchy_transform",
      "type": "hierarchy",
      "input": "source_gallery_treediagram",
      "output": "source_hierarchy",
      "options": {
        "endField": "label",
        "errorMethod": "standardError",
        "field": "node",
        "fit": "contain",
        "geometryField": "node",
        "groupBy": [
          "node"
        ],
        "idField": "node",
        "includeMax": false,
        "labelField": "label",
        "layoutKind": "",
        "layoutMode": "proportionalAngle",
        "mode": "normal",
        "order": [],
        "orderField": "node",
        "parentField": "parent",
        "seriesBy": "parent",
        "sourceField": "node",
        "startField": "parent",
        "targetField": "parent",
        "value": "value",
        "xField": "parent",
        "yField": "label"
      }
    },
    {
      "id": "pipeline_tree_node_layout_transform",
      "type": "layout",
      "input": "source_hierarchy",
      "output": "source_tree_nodes",
      "options": {
        "errorMethod": "standardError",
        "fit": "contain",
        "includeMax": false,
        "layout": "pipeline_plot_layout",
        "layoutKind": "treeNodes",
        "layoutMode": "proportionalAngle",
        "mode": "normal",
        "order": []
      }
    },
    {
      "id": "pipeline_tree_link_layout_transform",
      "type": "layout",
      "input": "source_hierarchy",
      "output": "source_tree_links",
      "options": {
        "errorMethod": "standardError",
        "fit": "contain",
        "includeMax": false,
        "layout": "pipeline_plot_layout",
        "layoutKind": "treeLinks",
        "layoutMode": "proportionalAngle",
        "mode": "normal",
        "order": []
      }
    }
  ],
  "axes": [],
  "grids": [],
  "legends": [],
  "fields": [
    "__rowLabel",
    "id",
    "node",
    "parent",
    "label",
    "value",
    "aggregateValue",
    "childCount",
    "depth",
    "formatted",
    "isLeaf",
    "order",
    "parentId",
    "pathLabel",
    "rootId",
    "tooltip",
    "labelX",
    "labelY",
    "r",
    "x",
    "y",
    "childId",
    "pathD"
  ],
  "scales": [
    {
      "id": "pipeline_depthcolor_color_scale",
      "type": "ordinal",
      "domain": {
        "source": "field",
        "data": "source_tree_nodes",
        "field": "depth",
        "fields": [],
        "includeZero": false,
        "order": "input",
        "reverse": false,
        "symmetric": false
      }
    }
  ],
  "layers": [
    {
      "id": "create_chart_surface",
      "mark": "rect",
      "role": "context"
    },
    {
      "id": "pipeline_view_layout_surface",
      "mark": "rect",
      "role": "context"
    },
    {
      "id": "pipeline_plot_layout_surface",
      "mark": "rect",
      "role": "context"
    },
    {
      "id": "pipeline_tree_links_layer",
      "mark": "path",
      "role": "data",
      "path": {
        "directD": true,
        "areaBand": false,
        "closedToY": false,
        "curve": "linear",
        "sortBy": ""
      }
    },
    {
      "id": "pipeline_tree_nodes_layer",
      "mark": "point",
      "role": "data"
    },
    {
      "id": "pipeline_node_labels_layer",
      "mark": "text",
      "role": "guide"
    }
  ]
}

Resolved SceneGraph

{
  "scene": "gallery.treeDiagram.scene",
  "scales": [
    {
      "id": "pipeline_depthcolor_color_scale",
      "type": "ordinal",
      "domain": [
        0,
        1,
        2
      ],
      "range": [
        "var(--colors-blue-9)",
        "var(--colors-green-9)",
        "var(--colors-amber-9)",
        "var(--colors-purple-9)",
        "var(--colors-red-9)"
      ]
    }
  ],
  "layers": [
    {
      "id": "create_chart_surface",
      "role": "context",
      "zIndex": -10,
      "glyphs": 1
    },
    {
      "id": "pipeline_view_layout_surface",
      "role": "context",
      "zIndex": 0,
      "glyphs": 1
    },
    {
      "id": "pipeline_plot_layout_surface",
      "role": "context",
      "zIndex": 0,
      "glyphs": 1
    },
    {
      "id": "pipeline_tree_links_layer",
      "role": "data",
      "zIndex": 5,
      "glyphs": 9
    },
    {
      "id": "pipeline_tree_nodes_layer",
      "role": "data",
      "zIndex": 10,
      "glyphs": 10
    },
    {
      "id": "pipeline_node_labels_layer",
      "role": "guide",
      "zIndex": 20,
      "glyphs": 10
    }
  ]
}

Glyph Data Tree

6 layers

Full parameter lineage for the active compiler surface.

create_chart_surface

1

pipeline_view_layout_surface

1

pipeline_plot_layout_surface

1

pipeline_tree_links_layer

9

pipeline_tree_nodes_layer

10

pipeline_node_labels_layer

10

Glyph Inspector

none

Select a glyph in the chart to inspect resolved params and lineage.