# SmartVisuals Ridgeline for Power BI

> Ridgeline plots for Power BI from raw rows: one joint bandwidth, density, step and series ridges, gradient fill. Premium tests each ridge against a baseline.

- Page: https://www.smartvisuals.io/visuals/ridgeline
- Fields and settings: https://www.smartvisuals.io/visuals/ridgeline/settings
- Microsoft Marketplace: https://marketplace.microsoft.com/en-us/product/smartvisuals.smartvisuals-ridgeline?tab=overview
- Package: https://www.smartvisuals.io/downloads/smartvisuals-ridgeline-1.0.2.0.pbiviz
- Price: Free tier for every viewer; premium $1.99 per user per month or $19 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.2.0
- GUID (visualType and publicCustomVisuals): `smartvisualsRidgelineFB7996FE0DE636587159749D3E635C60`

## What is free

- **Three ridge shapes**: Density (smoothed), step (a histogram on bins shared by every ridge) and as is, which draws a Count measure over a value column for series ridgelines.
- **One joint bandwidth**: Every ridge smoothed with the same bandwidth by default, as R's ggridges picks it, from a Scott, Silverman or R rule with a smoothness control; the footnote states it.
- **Ridges, your way**: Overlap, one height scale or each ridge to its own peak, a gradient fill along the values or group colours with fx, median and quartile lines, a rug or jittered points.
- **Labels and lines**: Ridge labels left of the plot or where each ridge starts, n per ridge, the median value, mean, median and up to four percentile lines, and a typed reference line.
- **Two ridges per row**: Split By overlays two levels in each row, such as this year over last year, with a legend.
- **Large data and a log axis**: Up to 150,000 rows, or a value column with a Count measure expanded inside the visual; a logarithmic axis with the density estimated on the log scale.
- **Caption, footnote, templates and four themes**: A smart caption, a methods footnote, sizes and colours for labels and axes, style templates, and the SmartVisuals, Dark, Clean and Slate themes.
- **Native Power BI behaviour**: Tooltips and report page tooltips, cross-filtering and highlighting, drill-down, on-object formatting, keyboard navigation, high contrast and 20 languages.

## What premium adds

- **Distribution shift**: Every ridge tested against the first, the last, the previous or a named ridge with Kolmogorov-Smirnov or Mann-Whitney U, Holm or Bonferroni corrected; the shift size in the median, mean, P10, P90 or Wasserstein distance beside each ridge, and the baseline's outline on every ridge.
- **Quantile bands and tail share**: The middle half, 10-90 % or your own percentiles shaded under each ridge, and the share at or above (or below) a threshold printed on every ridge.
- **Sort by a statistic or by the shift**: Order the ridges by median, mean, number of observations, spread (IQR) or the size of the shift; data order and name are free.
- **Top N and Others**: Keep the N ridges with the most observations, the highest or lowest median, the widest spread or the biggest shift, and pool the rest into one Others ridge.
- **Play through the ridges**: Build the ridges up one by one or spotlight one at a time, with step buttons; off by default and respects Reduce Motion.
- **Confidence intervals and weights**: A mean confidence interval on every ridge, and survey weights with an effective n.
- **Spec limits and capability**: Spec limits typed or from LSL, USL and Target measures, with Cp, Cpk, Cpl, Cpu, Cpm, Pp and Ppk.
- **Advanced density**: Six kernels, a fixed bandwidth and bounded support by reflection.
- **Small multiples**: One ridgeline per plant, region or product on a shared axis, from a single field.
- **More quartile definitions**: The seven further Hyndman-Fan quartile types beside the free Excel / DAX ones and Tukey's hinges.
- **Split By beyond two levels**: Three or more Split By levels overlaid in each row; up to two levels are free.
- **Second reference line**: A second typed reference line beside the free first one.

## Fields

| Field | Internal name | Takes | Needed | What it is for |
| --- | --- | --- | --- | --- |
| Group | `group` | Column | Optional | One ridge per group, e.g. Month, Shift or Carrier |
| Split By | `series` | Column | Optional | Overlaid ridges within each row, e.g. This year and Last year |
| Sample / ID | `detail` | Column | Optional | The observation grain, e.g. Measurement ID - without it Power BI sums the values |
| Value | `value` | Measure | Optional | The observed value per Sample / ID |
| Value (as column) | `valueColumn` | Column | Optional | For large data: the value itself as a column, with Count as the measure |
| Count | `count` | Measure | Optional | How many observations have this value (with Value as column); with the As is shape, the height drawn |
| Weight | `weight` | Measure | Optional | Survey or sampling weight per observation (premium) |
| Small Multiples | `facet` | Column | Optional | One panel per value, shared axis (premium) |
| Tooltips | `tooltips` | Measure | Optional | Extra fields in point tooltips |
| Lower Spec Limit (LSL) | `lsl` | Measure | Optional | Lower spec limit per group, e.g. from a spec table (premium); replaces the typed LSL |
| Upper Spec Limit (USL) | `usl` | Measure | Optional | Upper spec limit per group, e.g. from a spec table (premium); replaces the typed USL |
| Spec Target | `target` | Measure | Optional | Target per group for Cpm and the target line (premium); replaces the typed target |

## 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`).

### Layout (`layout`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Sort Groups By | `sortGroups` | `data` (Data order), `name` (Name), `median` (Median), `mean` (Mean), `n` (Number of observations), `iqr` (Spread (IQR)), `shift` (Shift vs the baseline ridge) |
| Sort Direction | `sortDirection` | `asc` (Ascending), `desc` (Descending) |
| Hide Groups With Fewer Than | `minGroupSize` | Number |

### Statistics (`stats`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Quartile Method | `quartileMethod` | `linear` (Excel / DAX inclusive: PERCENTILE.INC (type 7)), `weibull` (Excel / DAX exclusive: PERCENTILE.EXC, Minitab, SPSS (type 6)), `tukey` (Tukey's hinges (R fivenum)), `median_unbiased` (Median-unbiased (type 8)), `hazen` (Midpoint, Hazen (type 5)), `normal_unbiased` (Normal-unbiased (type 9)), `interpolated_inverted_cdf` (Linear CDF (type 4)), `inverted_cdf` (Nearest rank, inverted CDF (type 1)), `averaged_inverted_cdf` (Averaged inverted CDF (type 2)), `closest_observation` (Closest observation (type 3)) |

### Density (`density`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Bandwidth Rule | `bandwidthRule` | `scott` (Scott), `silverman` (Silverman), `nrd0` (Silverman rule of thumb (R default)) |
| Same Bandwidth for All Ridges | `joint` | On / off |
| Smoothness (%) | `smoothness` | Number |
| Trim to Data Range | `trim` | On / off |
| Ridge Overlap (%) | `overlap` | Number |
| Fill Opacity (%, -1 = theme) | `fillOpacity` | Number |

### Ridges (`ridges`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Ridge Shape | `shape` | `density` (Density (smoothed)), `step` (Step (histogram)), `asis` (As is (Count as height)) |
| Binning | `binRule` | `fd` (Freedman-Diaconis), `sturges` (Sturges), `scott` (Scott), `rice` (Rice), `sqrt` (Square root), `doane` (Doane), `auto` (Auto (numpy)), `count` (Fixed number of bins) |
| Number of Bins | `binCount` | Number |
| Smooth Curve (never overshoots) | `smooth` | On / off |
| Ridge Height | `height` | `shared` (Same scale for all ridges), `own` (Each ridge to its own peak) |
| Fill | `fill` | `gradient` (Gradient along the values), `group` (Group colours) |
| Gradient Low Color | `gradientLow` | Colour |
| Gradient High Color | `gradientHigh` | Colour |
| Outline Width (-1 = theme) | `outlineWidth` | Number |
| Outline Color | `outlineColor` | Colour |
| Median Line | `showMedian` | On / off |
| Quartile Lines | `showQuartiles` | On / off |
| Median and Quartile Color | `lineColor` | Colour |
| Observations Under the Ridge | `rug` | `none` (None), `rug` (Rug (ticks)), `points` (Jittered points) |
| Rug and Point Size | `rugSize` | Number |
| Rug and Point Color | `rugColor` | Colour |
| Ridge Labels | `labelPosition` | `left` (Left of the plot), `start` (On each ridge, where it starts) |

### Distribution Shift (`shift`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Compare With a Baseline Ridge | `show` | On / off |
| Baseline | `baseline` | `first` (First ridge), `last` (Last ridge), `previous` (The ridge before (each vs previous)), `named` (A ridge by name) |
| Baseline Ridge Name | `baselineName` | Text |
| Test | `test` | `ks` (Kolmogorov-Smirnov (any change in shape)), `mannwhitney` (Mann-Whitney U (higher or lower)) |
| Multiple Comparisons | `correction` | `holm` (Holm), `bonferroni` (Bonferroni), `none` (None) |
| Confidence | `level` | `90` (90 %), `95` (95 %), `99` (99 %) |
| Shift Size | `measure` | `median` (Change in median), `mean` (Change in mean), `p10` (Change in the 10th percentile), `p90` (Change in the 90th percentile), `wasserstein` (Wasserstein distance (whole shape)) |
| Baseline Outline on Every Ridge | `showGhost` | On / off |
| Baseline Outline Color | `ghostColor` | Colour |
| Shift Labels | `showLabels` | On / off |
| Shift Label Font Size | `labelSize` | Number |
| Shift Up Color | `upColor` | Colour |
| Shift Down Color | `downColor` | Colour |
| Label Non-significant Ridges | `showNs` | On / off |

### Quantile Bands (`bands`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Show Quantile Bands | `show` | On / off |
| Bands | `set` | `quartiles` (Middle half (25-75 %)), `deciles` (10-90 % and the middle half), `custom` (Custom percentiles) |
| Percentiles | `custom` | Text |
| Band Color | `color` | Colour |
| Share Beyond a Threshold | `tail` | On / off |
| Threshold | `tailValue` | Number |
| Side | `tailSide` | `above` (At or above the threshold), `below` (Below the threshold) |
| Tail Color | `tailColor` | Colour |
| Show the Share on Each Ridge | `tailLabels` | On / off |
| Share Font Size | `fontSize` | Number |

### Top N (`topN`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Show Only the Top N Ridges | `show` | On / off |
| N | `count` | Number |
| Ranked By | `by` | `n` (Most observations), `median` (Highest median), `lowMedian` (Lowest median), `iqr` (Widest spread (IQR)), `shift` (Biggest shift vs the baseline) |
| Pool the Rest Into Others | `others` | On / off |
| Others Label | `othersLabel` | Text |

### Play (`play`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Play Button | `show` | On / off |
| Animation | `mode` | `build` (Ridges appear one by one), `spotlight` (Spotlight one ridge at a time) |
| Seconds per Ridge | `speed` | Number |
| Loop | `loop` | On / off |
| Control Font Size | `fontSize` | Number |
| Control Color | `color` | Colour |

### Data Labels (`ridgeLabels`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Median Value | `showMedian` | On / off |
| Font Size | `fontSize` | Number |
| Color | `color` | Colour |

### Confidence Intervals (`ci`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Mean ± Confidence Interval | `showMeanCI` | On / off |
| Notched Boxes (median CI) | `showNotch` | On / off |
| Confidence | `level` | `90` (90 %), `95` (95 %), `99` (99 %) |
| Interval Color | `color` | Colour |

### Spec Limits & Capability (`spec`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Lower Spec Limit | `useLsl` | On / off |
| LSL | `lsl` | Number |
| Upper Spec Limit | `useUsl` | On / off |
| USL | `usl` | Number |
| Target | `useTarget` | On / off |
| Target Value | `target` | Number |
| Show Cp, Cpk, Cpl, Cpu, Cpm, Pp, Ppk | `showIndices` | On / off |
| Control Limits (±3σ within) | `showControl` | On / off |
| Limit Color | `color` | Colour |
| Label Font Size | `fontSize` | Number |

### Advanced Density (`kde`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Kernel | `kernel` | `gaussian` (Gaussian), `epanechnikov` (Epanechnikov), `biweight` (Biweight), `triangular` (Triangular), `cosine` (Cosine), `uniform` (Uniform (box)) |
| Fixed Bandwidth (0 = rule) | `fixedBandwidth` | Number |
| Bounded Below | `useLower` | On / off |
| Lower Bound | `lower` | Number |
| Bounded Above | `useUpper` | On / off |
| Upper Bound | `upper` | Number |

### Statistic Lines (`statLines`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Mean Line | `showMean` | On / off |
| Median Line | `showMedian` | On / off |
| Percentile Lines | `percentiles` | Text |
| Computed For | `scope` | `all` (All data in the panel), `group` (Each group) |
| Labels | `showLabels` | On / off |
| Color | `color` | Colour |
| Label Font Size | `fontSize` | Number |

### Reference Line (`reference`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Show Reference Line | `show` | On / off |
| Value | `value` | Number |
| Label | `label` | Text |
| Color | `color` | Colour |
| Second Reference Line | `show2` | On / off |
| Second Value | `value2` | Number |
| Second Label | `label2` | Text |
| Second Color | `color2` | Colour |
| Label Font Size | `fontSize` | Number |

### Value Axis (`valueAxis`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Show | `show` | On / off |
| Fixed Minimum | `useMin` | On / off |
| Minimum | `min` | Number |
| Fixed Maximum | `useMax` | On / off |
| Maximum | `max` | Number |
| Logarithmic Scale | `log` | On / off |
| Gridlines | `gridlines` | On / off |
| Show Title | `showTitle` | On / off |
| Title | `title` | Text |
| Decimal Places (-1 = auto) | `decimals` | Number |
| Font Size | `fontSize` | Number |
| Text Color | `color` | Colour |

### Group Axis (`categoryAxis`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Show | `show` | On / off |
| Show n per Group | `showN` | On / off |
| Font Size | `fontSize` | Number |
| Text Color | `color` | Colour |
| n Font Size | `nFontSize` | Number |
| n Color | `nColor` | Colour |
| Show Title | `showTitle` | On / off |

### Colors (`colors`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| One Colour for All Groups | `single` | On / off |
| Colour | `fill` | Colour |

### Legend (`legend`)

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

### Smart Caption (`caption`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Show | `show` | On / off |
| Position | `position` | `top` (Top), `bottom` (Bottom) |
| Font Size | `fontSize` | Number |
| Text Color | `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 Color | `color` | Colour |

### Accessibility (`accessibility`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Focus Outline Color | `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 |

### Templates (`templates`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Export (copy this text) | `export` | Text |
| Import (paste a template) | `import` | Text |

### Group Colors (`groupColors`)

| Setting | Internal name | Type or options |
| --- | --- | --- |
| Colour | `fill` | Colour |
