Stream Graph

Catalogue stream graph using centered stack boundaries and smooth area bands.

Stream Graph
Stream Graph Pipeline pipeline

Data Sources

8

Fields

18

Scales

3

Layers

12

Glyphs

53

rect 7 / line 23 / path 4 / text 19

Jan / Search: 18Jan / Social: 12Jan / Retail: 22Jan / Partner: 8JanFebMarAprMayJunJulAugSep-100-50050100SearchSocialRetailPartnerSeries

Build Path

Stream Graph Pipeline

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

Pipeline recipe graph

12 pipelines
13 nodes
19 edges

Data Flow Diagram

0/543 nodes
0/982 edges
543 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

8 tables
1 transforms

Imported table

source_gallery_streamgraph
raw
7 columns
feeds pipeline_stream_stack_boundaries_transform

ChartSpec

{
  "id": "gallery.streamGraph",
  "data": [
    {
      "id": "source_gallery_streamgraph",
      "rows": 36
    },
    {
      "id": "source_segments",
      "rows": 36
    },
    {
      "id": "__guide.pipeline_x_grid_guide",
      "rows": 9
    },
    {
      "id": "__guide.pipeline_y_grid_guide",
      "rows": 5
    },
    {
      "id": "__guide.pipeline_x_guide",
      "rows": 9
    },
    {
      "id": "__guide.pipeline_y_guide",
      "rows": 5
    },
    {
      "id": "__guide.pipeline_stream_series_legend_guide",
      "rows": 4
    },
    {
      "id": "__guide.pipeline_stream_series_legend_guide.title",
      "rows": 1
    }
  ],
  "transforms": [
    {
      "id": "pipeline_stream_stack_boundaries_transform",
      "type": "stack",
      "input": "source_gallery_streamgraph",
      "output": "source_segments",
      "options": {
        "endField": "value",
        "errorMethod": "standardError",
        "field": "period",
        "fit": "contain",
        "geometryField": "period",
        "groupBy": [
          "period"
        ],
        "idField": "period",
        "includeMax": false,
        "labelField": "period",
        "layoutKind": "",
        "layoutMode": "proportionalAngle",
        "mode": "stream",
        "order": [
          "Search",
          "Social",
          "Retail",
          "Partner"
        ],
        "orderField": "period",
        "parentField": "series",
        "seriesBy": "series",
        "sourceField": "period",
        "startField": "series",
        "targetField": "series",
        "value": "value",
        "xField": "series",
        "yField": "value"
      }
    }
  ],
  "axes": [
    {
      "id": "pipeline_x_guide",
      "scale": "pipeline_x_x_scale",
      "orientation": "bottom"
    },
    {
      "id": "pipeline_y_guide",
      "scale": "pipeline_y_y_scale",
      "orientation": "left"
    }
  ],
  "grids": [
    {
      "id": "pipeline_x_grid_guide",
      "scale": "pipeline_x_x_scale",
      "orientation": "x"
    },
    {
      "id": "pipeline_y_grid_guide",
      "scale": "pipeline_y_y_scale",
      "orientation": "y"
    }
  ],
  "legends": [
    {
      "id": "pipeline_stream_series_legend_guide",
      "scale": "pipeline_color_color_scale",
      "kind": "color",
      "title": "Series"
    }
  ],
  "fields": [
    "__rowLabel",
    "id",
    "period",
    "periodindex",
    "series",
    "value",
    "end",
    "start",
    "tooltip",
    "total",
    "label",
    "x",
    "y",
    "symbolX",
    "symbolY",
    "labelX",
    "labelY",
    "text"
  ],
  "scales": [
    {
      "id": "pipeline_x_x_scale",
      "type": "band",
      "domain": {
        "source": "field",
        "data": "source_segments",
        "field": "period",
        "fields": [],
        "includeZero": false,
        "order": "input",
        "reverse": false,
        "symmetric": false
      }
    },
    {
      "id": "pipeline_y_y_scale",
      "type": "linear",
      "domain": {
        "source": "field",
        "data": "source_segments",
        "field": "end",
        "fields": [
          "start",
          "end"
        ],
        "includeZero": true,
        "order": "input",
        "reverse": false,
        "symmetric": false
      }
    },
    {
      "id": "pipeline_color_color_scale",
      "type": "ordinal",
      "domain": {
        "source": "field",
        "data": "source_segments",
        "field": "series",
        "fields": [],
        "includeZero": false,
        "order": "input",
        "reverse": false,
        "symmetric": false
      }
    }
  ],
  "layers": [
    {
      "id": "pipeline_x_grid_guide",
      "mark": "line",
      "role": "guide"
    },
    {
      "id": "pipeline_y_grid_guide",
      "mark": "line",
      "role": "guide"
    },
    {
      "id": "pipeline_x_guide-tick-marks",
      "mark": "line",
      "role": "guide"
    },
    {
      "id": "pipeline_x_guide-labels",
      "mark": "text",
      "role": "guide"
    },
    {
      "id": "pipeline_y_guide-labels",
      "mark": "text",
      "role": "guide"
    },
    {
      "id": "pipeline_stream_series_legend_guide-swatches",
      "mark": "rect",
      "role": "guide"
    },
    {
      "id": "pipeline_stream_series_legend_guide-labels",
      "mark": "text",
      "role": "guide"
    },
    {
      "id": "pipeline_stream_series_legend_guide-title",
      "mark": "text",
      "role": "guide"
    },
    {
      "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_stream_bands_layer",
      "mark": "path",
      "role": "data",
      "path": {
        "directD": false,
        "areaBand": true,
        "closedToY": false,
        "curve": "smooth",
        "groupBy": [
          "series"
        ],
        "sortBy": "periodIndex"
      }
    }
  ]
}

Resolved SceneGraph

{
  "scene": "gallery.streamGraph.scene",
  "scales": [
    {
      "id": "pipeline_x_x_scale",
      "type": "band",
      "domain": [
        "Jan",
        "Feb",
        "Mar",
        "Apr",
        "May",
        "Jun",
        "Jul",
        "Aug",
        "Sep"
      ],
      "range": [
        68,
        726
      ],
      "bandwidth": 64.625
    },
    {
      "id": "pipeline_y_y_scale",
      "type": "linear",
      "domain": [
        -100,
        100
      ],
      "range": [
        294,
        46
      ],
      "ticks": [
        -100,
        -50,
        0,
        50,
        100
      ]
    },
    {
      "id": "pipeline_color_color_scale",
      "type": "ordinal",
      "domain": [
        "Search",
        "Social",
        "Retail",
        "Partner"
      ],
      "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_x_grid_guide",
      "role": "guide",
      "zIndex": 0,
      "glyphs": 9
    },
    {
      "id": "pipeline_y_grid_guide",
      "role": "guide",
      "zIndex": 0,
      "glyphs": 5
    },
    {
      "id": "pipeline_view_layout_surface",
      "role": "context",
      "zIndex": 0,
      "glyphs": 1
    },
    {
      "id": "pipeline_plot_layout_surface",
      "role": "context",
      "zIndex": 0,
      "glyphs": 1
    },
    {
      "id": "pipeline_x_guide-tick-marks",
      "role": "guide",
      "zIndex": 5,
      "glyphs": 9
    },
    {
      "id": "pipeline_stream_bands_layer",
      "role": "data",
      "zIndex": 10,
      "glyphs": 4
    },
    {
      "id": "pipeline_x_guide-labels",
      "role": "guide",
      "zIndex": 20,
      "glyphs": 9
    },
    {
      "id": "pipeline_y_guide-labels",
      "role": "guide",
      "zIndex": 20,
      "glyphs": 5
    },
    {
      "id": "pipeline_stream_series_legend_guide-swatches",
      "role": "guide",
      "zIndex": 40,
      "glyphs": 4
    },
    {
      "id": "pipeline_stream_series_legend_guide-labels",
      "role": "guide",
      "zIndex": 41,
      "glyphs": 4
    },
    {
      "id": "pipeline_stream_series_legend_guide-title",
      "role": "guide",
      "zIndex": 42,
      "glyphs": 1
    }
  ]
}

Glyph Data Tree

12 layers

Full parameter lineage for the active compiler surface.

create_chart_surface

1

pipeline_x_grid_guide

9

pipeline_y_grid_guide

5

pipeline_view_layout_surface

1

pipeline_plot_layout_surface

1

pipeline_x_guide-tick-marks

9

pipeline_stream_bands_layer

4

pipeline_x_guide-labels

9

pipeline_y_guide-labels

5

pipeline_stream_series_legend_guide-swatches

4

pipeline_stream_series_legend_guide-labels

4

pipeline_stream_series_legend_guide-title

1

Glyph Inspector

none

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