# SmartVisuals Hierarchy for Power BI

> Power BI hierarchy visual: treemap, sunburst, circle packing, tree diagram, mind map and dendrogram from one set of fields, with variance against budget explained.

- Page: https://www.smartvisuals.io/visuals/hierarchy
- Fields and settings: https://www.smartvisuals.io/visuals/hierarchy/settings
- Microsoft Marketplace: https://marketplace.microsoft.com/en-us/product/smartvisuals.smartvisuals-hierarchy?tab=overview
- Package: https://www.smartvisuals.io/downloads/smartvisuals-hierarchy-1.0.1.0.pbiviz
- Price: Free tier for every viewer; premium $4.49 per user per month or $45 per user per year on Microsoft Marketplace, with a 30-day free trial. Premium works in edit mode without a licence; unlicensed viewers see the free tier, never a blocked visual.
- Certified by Microsoft: no
- Version: 1.0.1.0
- GUID (visualType and publicCustomVisuals): `smartvisualsHierarchy1CEF96C7F8933A42E2CED154428B3951`

## What is free

- **Six views, one set of fields**: Treemap, Sunburst, Circle Packing, Tree Diagram, Mind Map and Dendrogram, switched with tabs in the visual or with View > Chart in the format pane.
- **Level columns or a parent-child table**: Region, Country, City (a model hierarchy works), or Node ID and Parent ID. Blank levels collapse; orphans, cycles and duplicate IDs are handled and named in a data-notes strip.
- **Parent values from the model**: Each level takes the model's own value, so ratios are right on every level; the footnote says when a parent had to be summed.
- **Zoom, expand and search**: Click to zoom in with a breadcrumb back, expand and collapse in the tree, and a search box that finds any name and lights its path.
- **Treemap, sunburst and circle packing**: Five tilings and header bands per group; a sunburst with the zoom root's name and total in the centre; parent names on the rim, and packed bubbles from one level.
- **Tree, mind map and dendrogram**: Five node styles including a decomposition bar, splits by highest, lowest or relative value, lock levels, clustering boxes, edge labels, mini map and toolbar; a two-sided mind map; a linear or radial dendrogram.
- **Free depth**: Three levels in the treemap, sunburst and circle packing views, four in the tree views; deeper levels fold into their parent with the same totals.
- **Labels and colour**: Name, value, % of parent, % of total and rank, fitted and never cut; colour by branch, level, a level's value or a Color measure on a 2-stop gradient, with a colour-blind safe palette.
- **Power BI features**: Tooltips with the full path and report page tooltips, cross-filter and cross-highlight, Ctrl + click, context menu, bookmarks and the header's drill buttons as an option.
- **Templates, themes and accessibility**: Five templates (Executive, IBCS (Finance), Minimal, Presentation, Print), four themes and on-object formatting; one tab stop with arrow keys, a screen-reader live region, high contrast with fill patterns and Reduce motion, in 20 languages.

## What premium adds

- **Variance vs comparison**: Every node in every view coloured by its variance against budget or last year, ▲/▼ on the labels, lower-is-better per measure, branch or node; in the tree a split by the biggest variance and a status icon per card.
- **Change explained**: One to three sentences naming the branches behind the change, and each node's share of it in the tooltip.
- **Variance drawer, KPI cards and sparklines**: In the tree views: the waterfall of a node's children against the comparison, up to three more measures per card and a sparkline per node over a Date field.
- **Then vs now and target markers**: Treemap tiles and circles sized by the comparison with the current value as an outline, and a target marker on every node.
- **Icicle, half circle and sunburst centre**: The sunburst laid out straight or as a half circle, and the Color measure, your text or an image in its centre.
- **Deeper hierarchies**: Beyond three levels in the area views and four in the tree views, up to eight level fields or a parent-child table of any depth.
- **Small multiples and play over periods**: One chart per value on one scale, and a play bar through the periods in the treemap, sunburst and circle packing views.
- **Top N and Others**: Keep the N largest children of every node, or fold small shares, ranked by size or by variance.
- **Colour scales and fx rules**: 3-stop and diverging scales with typed limits, and conditional formatting rules for node colours.
- **Table view and notes on nodes**: A table of the drawn tree with the variance and a CSV export, and comments on nodes from a Notes measure.

## Fields

| Field | Internal name | Takes | Needed | What it is for |
| --- | --- | --- | --- | --- |
| Levels | `levels` | Column | Optional | The hierarchy as columns, top first (Region, Country, City); a model hierarchy works too |
| Node ID | `nodeId` | Column | Optional | Parent-child table: the node's own ID (cost centre, account, part) |
| Parent ID | `parentId` | Column | Optional | Parent-child table: the ID of the node's parent (blank for the top) |
| Label | `label` | Column | Optional | Parent-child table: the name shown for a node (else its ID) |
| Size | `size` | Measure | Optional | Area, angle or radius of each node; bar length in the tree |
| Color | `color` | Measure | Optional | Colours the nodes by a measure (gradient); the tree shows it as a second value |
| Comparison | `comparison` | Measure | Optional | Budget, target or prior period: variance, change explained, targets (premium) |
| KPIs | `kpis` | Measure | Optional, up to 3 | Up to three more values on the tree's node cards (premium) |
| Date | `date` | Column | Optional | A sparkline per tree node over this field (premium) |
| Play axis | `play` | Column | Optional | Periods to play through (premium) |
| Small multiples | `facet` | Column | Optional | One chart per value, same scale (premium) |
| Image | `image` | Measure | Optional | A data:image URI per node (a text measure), drawn in tiles, circles and tree nodes |
| Tooltips | `tooltips` | Measure | Optional, up to 8 | Extra fields in tooltips |
| Favourable direction | `direction` | Measure | Optional | Per node: a positive value means higher is better, a negative one lower is better (premium, with Variance) |
| Notes | `notes` | Measure | Optional | A note per node (a text measure): a marker on the node, the text in the tooltip and the drawer (premium) |

## Format pane

Each card is a key under `visual.objects` in a PBIR visual.json; each setting is a property of it. Toggles take `true`/`false`, choices and text a value in single quotes (`'auto'`), numbers a `D` suffix (`12D`).

### View (`view`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Chart | `type` | `treemap` (Treemap), `sunburst` (Sunburst), `pack` (Circle Packing), `tree` (Tree Diagram), `mindmap` (Mind Map), `dendrogram` (Dendrogram) |
| Show View Tabs | `showTabs` | On / off |
| Tab Position | `tabPosition` | `top` (Top), `bottom` (Bottom) |

### Templates (`templates`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Style Template | `preset` | `none` (None (style defaults)), `executive` (Executive), `ibcs` (IBCS (Finance)), `minimal` (Minimal), `presentation` (Presentation), `print` (Print), `custom` (Custom) |
| Export (copy this text) | `export` | Text |
| Import (paste a template) | `import` | Text |
| Applied | `applied` | Text |

### Hierarchy (`hierarchy`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Levels Shown | `levels` | Number |
| Sort Siblings | `sort` | `auto` (Follow the Power BI sort, else largest first), `desc` (Largest first), `asc` (Smallest first), `name` (Name), `data` (Data order) |
| Merge a Child Named Like Its Parent | `mergeSameName` | On / off |
| Collapse Blank Levels | `collapseBlanks` | On / off |
| Nodes Whose Parent Is Missing | `orphans` | `unassigned` (Collect under Unassigned), `roots` (Show as top-level nodes) |
| IDs Ignore Upper/Lower Case | `caseInsensitive` | On / off |
| Name of the Whole | `rootLabel` | Text |
| Color Measure Adds Up | `colorAdditive` | On / off |

### Navigation (`navigation`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Click to Zoom In | `zoom` | On / off |
| Breadcrumb | `breadcrumb` | On / off |
| Search Box | `search` | On / off |
| Hover Highlights the Path | `hoverFocus` | On / off |
| Animate Zoom | `animate` | On / off |
| Power BI Drill Buttons | `hostDrill` | On / off |
| Breadcrumb and Search Font Size | `fontSize` | Number |
| Breadcrumb Text Colour | `color` | Colour |

### Treemap (`treemap`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Tiling | `tile` | `squarify` (Squarified (golden ratio)), `binary` (Binary (balanced)), `sliceDice` (Slice and dice), `slice` (Slice (rows)), `dice` (Dice (columns)) |
| Header Band per Group | `headers` | On / off |
| Header Height | `headerHeight` | Number |
| Gap Between Tiles | `paddingInner` | Number |
| Padding Inside Groups | `paddingOuter` | Number |
| Corner Radius (-1 = theme) | `cornerRadius` | Number |
| Nested Borders | `borders` | `theme` (From theme), `none` (None), `thin` (Thin), `byDepth` (Heavier for higher levels) |
| Images in Tiles | `images` | On / off |

### Sunburst (`sunburst`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Layout | `shape` | `sunburst` (Sunburst (multi-level donut)), `halfCircle` (Half circle), `icicle` (Icicle) |
| Centre Size (%) | `innerRadius` | Number |
| Start Angle (°) | `startAngle` | Number |
| Gap Between Arcs (°) | `padAngle` | Number |
| Icicle Direction | `orientation` | `leftRight` (Left to right), `topDown` (Top down) |
| Arc Labels | `labelMode` | `auto` (Auto (fits the arc)), `radial` (Radial), `tangential` (Along the arc) |
| Centre Shows | `centre` | `total` (Name and total of the zoom root), `none` (Nothing), `measure` (The Color measure), `text` (Your text), `image` (The node's image) |
| Centre Text | `centreText` | Text |
| Centre Font Size | `centreSize` | Number |
| Centre Text Colour (empty = theme) | `centreColor` | Colour |

### Circle Packing (`pack`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Gap Between Circles | `padding` | Number |
| Names On | `labels` | `auto` (Auto (parents on the rim, leaves inside)), `leaves` (Leaves only), `parents` (Parents only) |
| Parent Circles | `parentFill` | `tint` (Tinted), `outline` (Outline only), `solid` (Solid) |
| Images in Circles | `images` | On / off |

### Tree (`tree`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Direction | `orientation` | `horizontal` (Left to right), `vertical` (Top down) |
| Radial Dendrogram | `radial` | On / off |
| Node Style | `template` | `card` (Card with bar), `pill` (Pill), `bar` (Bar (decomposition)), `minimal` (Minimal text), `circle` (Circle) |
| Node Width | `nodeWidth` | Number |
| Space Between Levels | `levelGap` | Number |
| Space Between Siblings | `siblingGap` | Number |
| Node Bars Scaled To | `barScale` | `parent` (The parent), `level` (The largest on the level), `root` (The whole) |
| Second Value (Color Measure) on the Card | `secondValue` | On / off |
| Status Icon | `status` | `none` (None), `colorSign` (From the Color measure (above / below zero)), `variance` (From the variance vs Comparison) |
| Links | `linkStyle` | `theme` (From theme), `curve` (Curved), `elbow` (Elbow), `straight` (Straight) |
| Link Width by Value | `linkWidth` | On / off |
| Edge Labels | `edgeLabels` | `none` (None), `share` (% of parent), `value` (Value) |
| Clustering Boxes | `clusters` | `none` (None), `branch` (Around each top-level branch) |
| Expand Next (Split) | `split` | `manual` (As clicked), `high` (Highest value), `low` (Lowest value), `relative` (Relative (stands out most)), `variance` (Biggest variance), `unfavourable` (Biggest unfavourable variance), `favourable` (Biggest favourable variance) |
| Lock Levels for Readers | `lockLevels` | Number |
| Mini Map | `minimap` | On / off |
| Toolbar (Expand, Collapse, Fit) | `toolbar` | On / off |
| Value Bars at the Leaves | `leafBars` | On / off |
| Tapered Branches | `tapered` | On / off |
| Images on Nodes | `images` | On / off |

### Data Labels (`labels`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Show | `show` | On / off |
| Name | `name` | On / off |
| Value | `value` | On / off |
| % of Parent | `pctParent` | On / off |
| % of Total | `pctTotal` | On / off |
| Rank Among Siblings | `rank` | On / off |
| Display Units | `displayUnits` | `auto` (Auto), `none` (None), `K` (Thousands), `M` (Millions), `B` (Billions) |
| Decimals (-1 = auto) | `decimals` | Number |
| Percent Decimals | `pctDecimals` | Number |
| Font Size | `fontSize` | Number |
| Second Line Font Size | `detailSize` | Number |
| Text Colour (empty = contrast) | `color` | Colour |

### Colours (`colors`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Colour By | `mode` | `branch` (Top-level branch), `level` (Level), `category` (A level's value), `measure` (The Color measure) |
| Level Whose Values Colour | `categoryLevel` | Number |
| Lighten Deeper Levels | `tint` | On / off |
| Measure Scale | `scale` | `twoStop` (2-stop gradient), `threeStop` (3-stop gradient), `diverging` (Diverging around a centre) |
| Low Colour | `low` | Colour |
| Centre Colour | `mid` | Colour |
| High Colour | `high` | Colour |
| Minimum (empty = data) | `min` | Text |
| Centre (empty = mean) | `centre` | Text |
| Maximum (empty = data) | `max` | Text |
| Level 1 | `level1` | Colour |
| Level 2 | `level2` | Colour |
| Level 3 | `level3` | Colour |
| Level 4 | `level4` | Colour |
| Level 5 | `level5` | Colour |
| Level 6 | `level6` | Colour |
| Level 7 | `level7` | Colour |
| Level 8 | `level8` | Colour |
| Value 1 | `cat1` | Colour |
| Value 2 | `cat2` | Colour |
| Value 3 | `cat3` | Colour |
| Value 4 | `cat4` | Colour |
| Value 5 | `cat5` | Colour |
| Value 6 | `cat6` | Colour |
| Value 7 | `cat7` | Colour |
| Value 8 | `cat8` | Colour |
| Value 9 | `cat9` | Colour |
| Value 10 | `cat10` | Colour |
| Value 11 | `cat11` | Colour |
| Value 12 | `cat12` | Colour |
| Colour-Blind Safe Palette | `colorBlind` | On / off |

### Variance vs Comparison (`variance`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Colour and Label by Variance | `show` | On / off |
| Colour By | `basis` | `percent` (Variance %), `absolute` (Variance) |
| Favourable When | `direction` | `higher` (Higher is better (revenue)), `lower` (Lower is better (cost)) |
| Branch 1 | `branchDir1` | `inherit` (As above), `higher` (Higher is better), `lower` (Lower is better) |
| Branch 2 | `branchDir2` | `inherit` (As above), `higher` (Higher is better), `lower` (Lower is better) |
| Branch 3 | `branchDir3` | `inherit` (As above), `higher` (Higher is better), `lower` (Lower is better) |
| Branch 4 | `branchDir4` | `inherit` (As above), `higher` (Higher is better), `lower` (Lower is better) |
| Branch 5 | `branchDir5` | `inherit` (As above), `higher` (Higher is better), `lower` (Lower is better) |
| Branch 6 | `branchDir6` | `inherit` (As above), `higher` (Higher is better), `lower` (Lower is better) |
| Branch 7 | `branchDir7` | `inherit` (As above), `higher` (Higher is better), `lower` (Lower is better) |
| Branch 8 | `branchDir8` | `inherit` (As above), `higher` (Higher is better), `lower` (Lower is better) |
| Branch 9 | `branchDir9` | `inherit` (As above), `higher` (Higher is better), `lower` (Lower is better) |
| Branch 10 | `branchDir10` | `inherit` (As above), `higher` (Higher is better), `lower` (Lower is better) |
| Branch 11 | `branchDir11` | `inherit` (As above), `higher` (Higher is better), `lower` (Lower is better) |
| Branch 12 | `branchDir12` | `inherit` (As above), `higher` (Higher is better), `lower` (Lower is better) |
| Neutral Band (±) | `threshold` | Number |
| Neutral Band In | `thresholdUnit` | `percent` (% of comparison), `absolute` (Units of the measure) |
| Variance in Labels | `labels` | On / off |
| Name of the Comparison | `comparisonName` | Text |
| Favourable Colour | `good` | Colour |
| Unfavourable Colour | `bad` | Colour |
| Neutral Colour | `neutral` | Colour |

### Change Explained (`explain`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Insights Strip | `show` | On / off |
| Position | `position` | `top` (Top), `bottom` (Bottom) |
| Contributors Listed | `count` | Number |
| Font Size | `fontSize` | Number |
| Text Colour | `color` | Colour |

### Targets (`targets`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Comparison as a Target Marker | `show` | On / off |
| Marker Colour | `color` | Colour |

### Then vs Now (`thenVsNow`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Size by Comparison, Outline the Current Value | `show` | On / off |
| Reverse (Size by Current) | `reverse` | On / off |

### Top N and Others (`topN`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Rank By | `rankBy` | `size` (Size), `variance` (Largest variance (either way)), `unfavourable` (Most unfavourable variance) |
| Keep Top N per Level (0 = all) | `count` | Number |
| Fold Below % of Parent (0 = off) | `minShare` | Number |
| Others Label | `othersLabel` | Text |
| Small-Items Threshold (px) | `lod` | Number |

### KPI Cards (`kpis`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| KPI Slots 3-5 on Node Cards | `show` | On / off |
| ▲/▼ vs Comparison | `indicators` | On / off |
| KPI 1 Format | `format1` | Text |
| KPI 2 Format | `format2` | Text |
| KPI 3 Format | `format3` | Text |

### Variance Drawer (`drawer`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Variance Drawer (Waterfall of the Children) | `show` | On / off |
| Steps Before Others | `topN` | Number |
| Width (%) | `width` | Number |

### Sparklines (`sparklines`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Sparkline per Node | `show` | On / off |
| Style | `style` | `line` (Line), `area` (Area) |
| Last-Point Marker | `markers` | On / off |

### Small Multiples (`smallMultiples`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Columns (0 = auto) | `columns` | Number |
| Panels | `max` | Number |
| Font Size | `fontSize` | Number |
| Panel Title Colour | `color` | Colour |

### Play Over Periods (`play`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Play Controls | `enabled` | On / off |
| Seconds per Period | `speed` | Number |
| Loop | `loop` | On / off |
| Opens At | `start` | `last` (The last period), `first` (The first period) |

### Table View (`table`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Table View Button | `show` | On / off |
| CSV Export Button | `export` | On / off |

### Legend (`legend`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Show | `show` | On / off |
| Position | `position` | `bottom` (Bottom), `top` (Top), `right` (Right) |
| Orientation | `orientation` | `horizontal` (Horizontal), `vertical` (Vertical) |
| Title | `showTitle` | On / off |
| Title Text | `titleText` | Text |
| Font Size | `fontSize` | Number |
| Text Colour | `color` | Colour |

### Notes on Nodes (`nodeNotes`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Show Notes | `show` | On / off |
| Marker | `marker` | Text |

### Borders (`borders`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Border Colour (empty = theme) | `color` | Colour |
| Border Width (-1 = theme) | `width` | Number |

### Data Notes (`notes`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Data-Notes Strip | `show` | On / off |
| Font Size | `fontSize` | Number |
| Text Colour | `color` | Colour |

### Footnote (`footnote`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Show | `show` | On / off |
| Source | `source` | Text |
| State the Methods | `showMethod` | On / off |
| Font Size | `fontSize` | Number |
| Text Colour | `color` | Colour |

### Tabs and Buttons (`controls`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Font Size | `fontSize` | Number |
| Text Colour | `color` | Colour |

### Accessibility (`accessibility`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Patterns (Tell Items Apart Without Colour) | `patterns` | On / off |
| Focus Outline Colour | `focusColor` | Colour |
| Focus Outline Width | `focusWidth` | Number |
| Minimum Text Size (0 = off) | `minFontSize` | Number |
| Reduce Motion | `reduceMotion` | On / off |

### Theme (`theme`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Theme | `selectedTheme` | `smartvisuals` (SmartVisuals), `dark` (Dark), `clean` (Clean (White)), `slate` (Slate) |
| Font | `font` | `inter` (Inter), `segoe` (Segoe UI), `arial` (Arial), `georgia` (Georgia) |
| Transparent Background | `transparentBg` | On / off |

### Branch Colours (`dataPoint`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Colour | `fill` | Colour |
| Label Colour | `labelColor` | Colour |
| Colour | `fillNode` | Colour |
| Label Colour | `labelColorNode` | Colour |
