Funnel chart
Display sequential stages of a process with the FunnelChart component.
A funnel chart shows data as parts of a funnel. Funnel charts can be segmented by either multiple measures or a single attribute. A funnel chart displays values as progressively decreasing proportions.

Buckets
| Prop | Required | Takes | What it does |
|---|---|---|---|
measures | Yes | One or more measures | Sets the size of the segments. With more than one measure, each measure is a segment. |
viewBy | No | One attribute | Draws one segment per attribute value. Works only with a single measure. |
filters | No | Filters | Limits the data the funnel chart shows. |
Sorting
By default, the funnel chart sorts the segments by value in descending order, so the largest value sits in the broadest part of the funnel. FunnelChart has a sortBy prop. For the segments to follow sortBy, also set enableChartSorting: true in config. Otherwise, the chart re-sorts them by value.
Configuration
Pass these options in the config prop. See Chart configuration for details.
| Option | What it changes |
|---|---|
colors, colorPalette, colorMapping | Colors of the segments: one per viewBy value, or one per measure without viewBy. |
legend | Whether the legend shows and where. position defaults to "right". The legend appears only with viewBy or more than one measure. |
dataLabels | visible shows or hides the labels. style: "backplate" adds a background behind them. By default, each label shows the value and its percentage of the first segment’s value; percentsVisible: false hides the percentage. |
enableChartSorting | Keeps the segment order that sortBy sets. See Sorting. |
chartFill | type sets how segments are filled: "solid", "pattern", or "outline". |
separators | Thousands and decimal separators in the number format. |
Limits
- A funnel chart can’t show negative values. If the data contains any, the chart shows an error and
onErrorreceives aNegativeValuesSdkError. - A funnel chart renders up to 10,000 segments. With more, the chart shows an error and
onErrorreceives aDataTooLargeToDisplaySdkError. Filter the data to fit. viewByworks only with a single measure. WithviewByand more than one measure, the chart shows an error andonErrorreceives aDataTooLargeToDisplaySdkError.- The funnel chart leaves out empty values and leading zero values.
Structure
import "@gooddata/sdk-ui-charts/styles/css/main.css";
import { FunnelChart } from "@gooddata/sdk-ui-charts";
<FunnelChart
measures={<measures>}
config={<chart-config>}
…
/>
Example
import "@gooddata/sdk-ui-charts/styles/css/main.css";
import { FunnelChart } from "@gooddata/sdk-ui-charts";
import * as Md from "./catalog.js";
const style = { height: 300 };
<div style={style}>
<FunnelChart
measures={[Md.$FranchiseFeesAdRoyalty, Md.$FranchiseFeesInitialFranchiseFee, Md.$FranchiseFeesOngoingRoyalty]}
/>
</div>
Props
| Prop | Type | Required | Description | Inherited from |
|---|---|---|---|---|
measures | AttributesMeasuresOrPlaceholders | Yes | Specify one or more measures to chart into a funnel. | IFunnelChartBucketProps |
backend | IAnalyticalBackend | No | Analytical backend, from which the chart will obtain data to visualize If you do not specify instance of analytical backend using this prop, then you MUST have BackendProvider up in the component tree. | IBucketChartProps |
config | IChartConfig | No | Configure chart’s behavior and appearance. | ICommonChartProps |
drillableItems | ExplicitDrill[] | No | Configure drillability; e.g. which parts of the visualization can be interacted with. | IVisualizationProps |
ErrorComponent | ComponentType<IErrorProps> | No | React component to display in the event when there is an error with either obtaining the data from backend or with the data itself. | IVisualizationProps |
execConfig | IExecutionConfig | No | Execution configuration, will provide the execution with necessary config before initiating execution. | ICommonChartProps |
exportTitle | string | No | Set title to use for exported files. | IVisualizationProps |
filters | NullableFiltersOrPlaceholders | No | Specify filters to apply on the data to chart. | IFunnelChartBucketProps |
height | number | No | Set height of the chart (in pixels). | ICommonChartProps |
LoadingComponent | ComponentType<ILoadingProps> | No | React component to display while loading data from the backend. | IVisualizationProps |
locale | string | No | Set Locale for visualization localization. | IVisualizationProps |
onDataView | OnDataView | No | (Alpha) Called when the visualization loads a DataView, i.e. it receives data from the backend. | IVisualizationCallbacks |
onDrill | OnFiredDrillEvent | No | Called when user triggers a drill on a visualization. | IVisualizationCallbacks |
onError | OnError | No | Called when an error occurs while loading data for the visualization. | IVisualizationCallbacks |
onExportReady | OnExportReady | No | Called when the visualization is ready to be exported. | IVisualizationCallbacks |
onLegendReady | OnLegendReady | No | Called when legend is rendered. | IChartCallbacks |
onLoadingChanged | OnLoadingChanged | No | Called when loading status of the visualization changes - vis starts or stops loading | IVisualizationCallbacks |
placeholdersResolutionContext | any | No | Resolution context for composed placeholders. | IFunnelChartBucketProps |
sortBy | SortsOrPlaceholders | No | Specify how to sort the data to chart. | IFunnelChartBucketProps |
viewBy | AttributeOrPlaceholder | No | Specify attribute that will be used to slice the single measure into multiple pieces that will be charted into a funnel. | IFunnelChartBucketProps |
width | number | No | Set width of the chart (in pixels). | ICommonChartProps |
workspace | string | No | Identifier of analytical workspace, from which the chart will obtain data to visualize. If you do not specify workspace identifier, then you MUST have WorkspaceProvider up in the component tree. | IBucketChartProps |
Related
Show hierarchical data as stacked layers with the PyramidChart component.
Show cumulative contributions to a total with the WaterfallChart component.
Show proportions as a ring chart with the DonutChart component.
Configure chart appearance, axes, legends, colors, and data labels.
Shared behavior of GoodData.UI visual components — responsive sizing, the style and data props model, and the visualization lifecycle callbacks.