Donut Chart

Raw regional totals derive annular sector paths with generated legend swatches.

Donut Chart

Data Sources

4

Fields

20

Scales

1

Layers

6

Glyphs

22

path 5 / text 12 / rect 5

North: 42 (30%)South: 31 (22.14%)East: 27 (19.29%)West: 22 (15.71%)Central: 18 (12.86%)140k30%22.14%19.29%15.71%12.86%NorthSouthEastWestCentralRegion

Data Flow Diagram

0/218 nodes
0/358 edges
218 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
1 transforms

Regional sales

regional-sales
raw
4 columns
feeds donut-sector-layout

ChartSpec

{
  "id": "catalogue.donut-chart",
  "data": [
    {
      "id": "regional-sales",
      "rows": 5
    },
    {
      "id": "sectors",
      "rows": 5
    },
    {
      "id": "__guide.region-legend",
      "rows": 5
    },
    {
      "id": "__guide.region-legend.title",
      "rows": 1
    }
  ],
  "transforms": [
    {
      "id": "donut-sector-layout",
      "type": "layout",
      "input": "regional-sales",
      "output": "sectors",
      "options": {
        "innerRadius": 70,
        "labelField": "region",
        "layout": "plot",
        "layoutKind": "polarSectors",
        "outerRadius": 138,
        "paddingInner": 1.6,
        "value": "value"
      }
    }
  ],
  "legends": [
    {
      "id": "region-legend",
      "scale": "color",
      "kind": "color",
      "title": "Region"
    }
  ],
  "fields": [
    "region",
    "value",
    "share",
    "pathD",
    "labelX",
    "labelY",
    "percentLabel",
    "tooltip",
    "startAngle",
    "endAngle",
    "midAngle",
    "innerRadius",
    "outerRadius",
    "formatted",
    "label",
    "x",
    "y",
    "symbolX",
    "symbolY",
    "text"
  ],
  "scales": [
    {
      "id": "color",
      "type": "ordinal",
      "domain": {
        "source": "field",
        "data": "sectors",
        "field": "region"
      }
    }
  ],
  "layers": [
    {
      "id": "region-legend-swatches",
      "mark": "rect",
      "role": "guide"
    },
    {
      "id": "region-legend-labels",
      "mark": "text",
      "role": "guide"
    },
    {
      "id": "region-legend-title",
      "mark": "text",
      "role": "guide"
    },
    {
      "id": "donut-sectors",
      "mark": "path",
      "role": "data",
      "path": {
        "directD": true,
        "areaBand": false,
        "closedToY": false,
        "curve": "linear",
        "groupBy": [
          "id"
        ]
      }
    },
    {
      "id": "donut-total",
      "mark": "text",
      "role": "guide"
    },
    {
      "id": "sector-labels",
      "mark": "text",
      "role": "guide"
    }
  ]
}

Resolved SceneGraph

{
  "scene": "catalogue.donut-chart.scene",
  "scales": [
    {
      "id": "color",
      "type": "ordinal",
      "domain": [
        "North",
        "South",
        "East",
        "West",
        "Central"
      ],
      "range": [
        "var(--colors-blue-9)",
        "var(--colors-green-9)",
        "var(--colors-amber-9)",
        "var(--colors-purple-9)",
        "var(--colors-red-9)"
      ]
    }
  ],
  "layers": [
    {
      "id": "donut-sectors",
      "role": "data",
      "zIndex": 10,
      "glyphs": 5
    },
    {
      "id": "donut-total",
      "role": "guide",
      "zIndex": 20,
      "glyphs": 1
    },
    {
      "id": "sector-labels",
      "role": "guide",
      "zIndex": 25,
      "glyphs": 5
    },
    {
      "id": "region-legend-swatches",
      "role": "guide",
      "zIndex": 30,
      "glyphs": 5
    },
    {
      "id": "region-legend-labels",
      "role": "guide",
      "zIndex": 31,
      "glyphs": 5
    },
    {
      "id": "region-legend-title",
      "role": "guide",
      "zIndex": 32,
      "glyphs": 1
    }
  ]
}

Glyph Data Tree

6 layers

Full parameter lineage for the active compiler surface.

donut-sectors

5

donut-total

1

sector-labels

5

region-legend-swatches

5

region-legend-labels

5

region-legend-title

1

Glyph Inspector

none

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