Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs-mintlify/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"docs/explore-analyze/charts/chart-types/area",
"docs/explore-analyze/charts/chart-types/scatter",
"docs/explore-analyze/charts/chart-types/pie",
"docs/explore-analyze/charts/chart-types/funnel",
"docs/explore-analyze/charts/chart-types/heatmap",
"docs/explore-analyze/charts/chart-types/boxplot",
"docs/explore-analyze/charts/chart-types/table",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: Funnel
description: Show how a value narrows from stage to stage, such as signup → activation → purchase.
---

Funnel charts draw one bar per stage, centered on a shared midline, with a connector between each adjacent pair of stages. Each bar's width is proportional to its stage's value, so the figure narrows wherever values drop. Best for stage-to-stage conversion: how many users, orders, or events survive each step of a process.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit / opportunity: the repo already has recipes/data-modeling/funnels.mdx — "Implementing funnel analysis" with the packaged Funnels helper. That recipe produces exactly the step + conversions shape this chart consumes, so a one-line pointer here (and ideally a link back from the recipe) would make the modeling → visualization path discoverable. Something like: "To model the stages themselves, see Implementing funnel analysis."

Separately, that recipe doesn't appear in docs.json at all (grep -i funnel docs.json matches only the new chart page), so it may be unreachable from the sidebar. Out of scope for this PR, but worth a follow-up.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skipping this one. recipes/data-modeling/funnels.mdx is hidden: true in its frontmatter, so its absence from docs.json is deliberate rather than an oversight, and linking it from a listed page would surface it against that. Worth revisiting if the recipe is ever unhidden.


{/* Screenshot: funnel chart — order counts across four statuses, with stage names and values on the bars and conversion percentages on the connectors. Place directly below this paragraph, full width. (hidden — replace this comment with <Frame><img src="..." /></Frame> when image is ready) */}

## Fields

A funnel needs exactly two fields, picked on the Fields tab:

- **Stage** — a dimension (a time dimension works too, bucketed by its grain). Each distinct value becomes one stage.
- **Value** — a measure. It is rolled up per stage, so a result with extra columns still draws one bar per stage.

{/* Screenshot: Fields tab with the Stage and Value selectors bound. Place inline, 50% width, right-aligned. (hidden — replace this comment with <Frame><img src="..." /></Frame> when image is ready) */}

Stages keep the order your query returned them in. To reorder stages, adjust the sort in the results table — a stage that grows partway down is real data (re-entry, late-arriving events), so the chart never sorts it away for you.

A stage whose value is zero still draws, as a thin line in its stage color, so a gap in the data reads as a zero rather than as a missing stage.

## Conversion percentages

The connectors between stages carry the funnel's percentages. Two independent toggles in the **Data labels** section of the Style tab control them:

- **First** — each stage as a share of the first stage, drawn as `36% of first`. On by default.
- **Prev** — each stage as a share of the stage before it, drawn as `20% of previous`.

Turning both on stacks the two lines on each connector; turning both off leaves the connectors unlabeled. Whichever you select also appears in the tooltip, alongside the stage and value.

{/* Screenshot: Style tab Data labels section with the First and Prev toggles. Place inline, 50% width, right-aligned. (hidden — replace this comment with <Frame><img src="..." /></Frame> when image is ready) */}

## Data labels

Each bar carries its stage name and value, both on by default and toggled in the **Data labels** section of the Style tab. The value's number format has its own picker, and one font size governs every label the funnel draws — the bar labels and the connector percentages alike.

Labels always sit at the bar's center. When a bar is too narrow to hold its label, the text switches from white to a dark color so it stays readable against the page background.

## Color

Each stage takes its own color from the palette selected in the **Palette** dropdown on the Style tab, in palette order. See [Palettes](/docs/explore-analyze/charts/configuration/color-and-stacking#palettes) for the built-in palettes and how to define a custom one.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The #palettes anchor resolves — color-and-stacking.mdx:24 is ## Palettes. 👍

One leftover from the previous round: that page's scope sentence (color-and-stacking.mdx:6) still says the Color-section settings "apply across bar, line, area, scatter, and heatmap charts". A reader following this link lands on a page that, by its own first paragraph, excludes the funnel. Either add funnel to that list, or narrow the claim there to the parts that are chart-type-specific. (Pie has the same gap, so it's a pre-existing seam — but this PR is what makes it reachable.)


{/* Screenshot: Style tab with the Palette dropdown open, showing the built-in discrete palettes. Place inline, 50% width, right-aligned. (hidden — replace this comment with <Frame><img src="..." /></Frame> when image is ready) */}

## Legend

A legend naming each stage in its palette color is available in the **Legend** section of the Style tab, along with its placement.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two notes on the new Legend section:

  1. No link out, unlike the Color section right above it. color-and-stacking.mdx:87 documents the same Legend section (Position: right/left/top/bottom; Hidden), so [Legend](/docs/explore-analyze/charts/configuration/color-and-stacking#legend) would save repeating the placement options here.
  2. Possible contradiction with that page. It says "The legend appears when a Color channel is assigned" — the funnel has no Color channel (## Fields above says exactly two fields, Stage and Value), yet this page says a legend is available. Both can't be describing the same rule. Worth confirming which is right before linking them together.

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Cube includes a library of built-in chart types covering the most common visuali
- [Area](/docs/explore-analyze/charts/chart-types/area)
- [Scatter](/docs/explore-analyze/charts/chart-types/scatter)
- [Pie & donut](/docs/explore-analyze/charts/chart-types/pie)
- [Funnel](/docs/explore-analyze/charts/chart-types/funnel)
- [Heatmap](/docs/explore-analyze/charts/chart-types/heatmap)
- [Boxplot](/docs/explore-analyze/charts/chart-types/boxplot)
- [Table](/docs/explore-analyze/charts/chart-types/table)
Expand Down Expand Up @@ -79,9 +80,11 @@ Otherwise Cube checks these in order and takes the first that matches:
The two [bar](/docs/explore-analyze/charts/chart-types/bar) rows are variants of the same chart
type, not separate ones.

Pie, area, boxplot and HTML are never recommended — pick them yourself. Pie's shape, one measure
across a few categories, is the one Bar already answers, and a bar chart compares those values more
accurately. All four stay available in the picker like any other chart type.
Pie, funnel, area, boxplot and HTML are never recommended — pick them yourself. Pie's shape, one
measure across a few categories, is the one Bar already answers, and a bar chart compares those
values more accurately. A funnel additionally asserts that its stages are sequential steps of one
process, which the shape of a query does not reveal. All five stay available in the picker like any
other chart type.

### When nothing is recommended

Expand Down