Multi-set Bar Chart

Rebuilds the multi-set bar chart with grouped-band layout rows, direct rect widths, and a color legend.

Multi-set Bar Chart
Gallery Multi-set Bar Pipeline pipeline

Data Sources

7

Fields

19

Scales

2

Layers

11

Glyphs

37

rect 18 / line 5 / text 14

value grouped by category panel020406080Q1 / Online: 42k revenueQ1 / Retail: 31k revenueQ1 / Wholesale: 24k revenueQ2 / Online: 54k revenueQ2 / Retail: 36k revenueQ2 / Wholesale: 29k revenueQ3 / Online: 62k revenueQ3 / Retail: 43k revenueQ3 / Wholesale: 34k revenueQ4 / Online: 71k revenueQ4 / Retail: 48k revenueQ4 / Wholesale: 39k revenueQ1Q1Q2Q2Q3Q3Q4Q4OnlineRetailWholesaleseries

Build Path

Gallery Multi-set Bar Pipeline

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

Pipeline recipe graph

10 pipelines
11 nodes
14 edges

Data Flow Diagram

0/424 nodes
0/754 edges
424 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

7 tables
2 transforms

Imported table

source_gallery_multisetbar
raw
8 columns
feeds pipeline_grouped_bar_layout_transform

ChartSpec

{
  "id": "gallery.multiSetBar",
  "data": [
    {
      "id": "source_gallery_multisetbar",
      "rows": 12
    },
    {
      "id": "source_grouped_bars",
      "rows": 12
    },
    {
      "id": "source_group_labels",
      "rows": 4
    },
    {
      "id": "__guide.pipeline_ygrid_guide",
      "rows": 5
    },
    {
      "id": "__guide.pipeline_yaxis_guide",
      "rows": 5
    },
    {
      "id": "__guide.pipeline_colorlegend_guide",
      "rows": 3
    },
    {
      "id": "__guide.pipeline_colorlegend_guide.title",
      "rows": 1
    }
  ],
  "transforms": [
    {
      "id": "pipeline_grouped_bar_layout_transform",
      "type": "layout",
      "input": "source_gallery_multisetbar",
      "output": "source_grouped_bars",
      "options": {
        "count": 1,
        "errorMethod": "standardError",
        "fit": "contain",
        "groupBy": [
          "category"
        ],
        "includeMax": true,
        "innerPadding": 0.18,
        "layout": "pipeline_value_grouped_by_category_panel_layout",
        "layoutKind": "groupedBand",
        "layoutMode": "proportionalAngle",
        "mode": "normal",
        "order": [],
        "paddingInner": 0.28,
        "paddingOuter": 0.08,
        "seriesBy": "series",
        "value": "value"
      }
    },
    {
      "id": "pipeline_group_labels_transform",
      "type": "layout",
      "input": "source_grouped_bars",
      "output": "source_group_labels",
      "options": {
        "count": 1,
        "errorMethod": "standardError",
        "fit": "contain",
        "groupBy": [
          "category"
        ],
        "includeMax": true,
        "layout": "pipeline_value_grouped_by_category_panel_layout",
        "layoutKind": "groupCenters",
        "layoutMode": "proportionalAngle",
        "mode": "normal",
        "order": [],
        "yOffset": 320
      }
    }
  ],
  "axes": [
    {
      "id": "pipeline_yaxis_guide",
      "scale": "pipeline_value_y_y_scale",
      "orientation": "left"
    }
  ],
  "grids": [
    {
      "id": "pipeline_ygrid_guide",
      "scale": "pipeline_value_y_y_scale",
      "orientation": "y"
    }
  ],
  "legends": [
    {
      "id": "pipeline_colorlegend_guide",
      "scale": "pipeline_series_color_color_scale",
      "kind": "color",
      "title": "series"
    }
  ],
  "fields": [
    "__rowLabel",
    "id",
    "category",
    "series",
    "value",
    "formatted",
    "tooltip",
    "groupCenter",
    "groupIndex",
    "seriesIndex",
    "width",
    "x",
    "labelY",
    "label",
    "y",
    "symbolX",
    "symbolY",
    "labelX",
    "text"
  ],
  "scales": [
    {
      "id": "pipeline_value_y_y_scale",
      "type": "linear",
      "domain": {
        "source": "field",
        "data": "source_grouped_bars",
        "field": "value",
        "fields": [],
        "includeZero": true,
        "order": "input",
        "reverse": false,
        "symmetric": false
      }
    },
    {
      "id": "pipeline_series_color_color_scale",
      "type": "ordinal",
      "domain": {
        "source": "field",
        "data": "source_grouped_bars",
        "field": "series",
        "fields": [],
        "includeZero": false,
        "order": "input",
        "reverse": false,
        "symmetric": false
      }
    }
  ],
  "layers": [
    {
      "id": "pipeline_ygrid_guide",
      "mark": "line",
      "role": "guide"
    },
    {
      "id": "pipeline_yaxis_guide-labels",
      "mark": "text",
      "role": "guide"
    },
    {
      "id": "pipeline_colorlegend_guide-swatches",
      "mark": "rect",
      "role": "guide"
    },
    {
      "id": "pipeline_colorlegend_guide-labels",
      "mark": "text",
      "role": "guide"
    },
    {
      "id": "pipeline_colorlegend_guide-title",
      "mark": "text",
      "role": "guide"
    },
    {
      "id": "create_chart_surface",
      "mark": "rect",
      "role": "context"
    },
    {
      "id": "pipeline_value_grouped_by_category_panel_layout_surface",
      "mark": "rect",
      "role": "context"
    },
    {
      "id": "pipeline_value_grouped_by_category_panel_layout_frame",
      "mark": "rect",
      "role": "guide"
    },
    {
      "id": "pipeline_value_grouped_by_category_panel_layout_label",
      "mark": "text",
      "role": "guide"
    },
    {
      "id": "pipeline_value_grouped_by_category_bars_layer",
      "mark": "rect",
      "role": "data"
    },
    {
      "id": "pipeline_value_grouped_by_category_group_labels_layer",
      "mark": "text",
      "role": "guide"
    }
  ]
}

Resolved SceneGraph

{
  "scene": "gallery.multiSetBar.scene",
  "scales": [
    {
      "id": "pipeline_value_y_y_scale",
      "type": "linear",
      "domain": [
        0,
        80
      ],
      "range": [
        282,
        26
      ],
      "ticks": [
        0,
        20,
        40,
        60,
        80
      ]
    },
    {
      "id": "pipeline_series_color_color_scale",
      "type": "ordinal",
      "domain": [
        "Online",
        "Retail",
        "Wholesale"
      ],
      "range": [
        "var(--colors-blue-9)",
        "var(--colors-orange-9)",
        "var(--colors-green-9)",
        "var(--colors-purple-9)"
      ]
    }
  ],
  "layers": [
    {
      "id": "create_chart_surface",
      "role": "context",
      "zIndex": -10,
      "glyphs": 1
    },
    {
      "id": "pipeline_ygrid_guide",
      "role": "guide",
      "zIndex": 0,
      "glyphs": 5
    },
    {
      "id": "pipeline_value_grouped_by_category_panel_layout_surface",
      "role": "context",
      "zIndex": 0,
      "glyphs": 1
    },
    {
      "id": "pipeline_value_grouped_by_category_panel_layout_frame",
      "role": "guide",
      "zIndex": 1,
      "glyphs": 1
    },
    {
      "id": "pipeline_value_grouped_by_category_panel_layout_label",
      "role": "guide",
      "zIndex": 2,
      "glyphs": 1
    },
    {
      "id": "pipeline_yaxis_guide-labels",
      "role": "guide",
      "zIndex": 20,
      "glyphs": 5
    },
    {
      "id": "pipeline_value_grouped_by_category_bars_layer",
      "role": "data",
      "zIndex": 20,
      "glyphs": 12
    },
    {
      "id": "pipeline_value_grouped_by_category_group_labels_layer",
      "role": "guide",
      "zIndex": 20,
      "glyphs": 4
    },
    {
      "id": "pipeline_colorlegend_guide-swatches",
      "role": "guide",
      "zIndex": 40,
      "glyphs": 3
    },
    {
      "id": "pipeline_colorlegend_guide-labels",
      "role": "guide",
      "zIndex": 41,
      "glyphs": 3
    },
    {
      "id": "pipeline_colorlegend_guide-title",
      "role": "guide",
      "zIndex": 42,
      "glyphs": 1
    }
  ]
}

Glyph Data Tree

11 layers

Full parameter lineage for the active compiler surface.

create_chart_surface

1

pipeline_ygrid_guide

5

pipeline_value_grouped_by_category_panel_layout_surface

1

pipeline_value_grouped_by_category_panel_layout_frame

1

pipeline_value_grouped_by_category_panel_layout_label

1

pipeline_yaxis_guide-labels

5

pipeline_value_grouped_by_category_bars_layer

12

pipeline_value_grouped_by_category_group_labels_layer

4

pipeline_colorlegend_guide-swatches

3

pipeline_colorlegend_guide-labels

3

pipeline_colorlegend_guide-title

1

Glyph Inspector

none

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