Skip to main content
Basic Usage
{% funnel_chart
    data="demo_daily_orders"
    category="category"
    value="sum(transactions)"
/%}

Examples

Funnel Chart with Custom Styling

Funnel Chart with Custom Styling
{% funnel_chart
    data="demo_daily_orders"
    category="category"
    value="sum(transactions)"
    align="left"
    label_position="outside"
    gap=5
    title="Styled Funnel"
/%}

Funnel Chart with Custom Colors

Funnel Chart with Custom Colors
{% funnel_chart
    data="demo_daily_orders"
    category="category"
    value="sum(transactions)"
    chart_options={
        color_palette = ["#0d0887", "#6300a7", "#a62098", "#d5546e", "#f68d45", "#fcd225", "#f0f921"]
    }
/%}

Attributes

data
String
required
Name of the table to query
filters
Array
default:"[]"
Array of column names to use as filters
date_range
Use date_range to filter data for specific time periods. Accepts predefined ranges (e.g., “last 12 months”), dynamic ranges (e.g., “Last 90 days”), custom date ranges (e.g., “2020-01-01 to 2023-03-01”), or partial ranges (e.g., “from 2020-01-01”, “until 2023-03-01”)Example:
date_range={
  range = value
  date = "string"
}
Attributes:
  • range: enum
  • date: string
category
String
required
Column name for funnel stages/categories
value
String
required
Column name for values
title
String
Title to display above the chart
subtitle
String
Subtitle to display below the title
info
String
Information tooltip text (can only be used with title)
URL to link the info text to (can only be used with info)
Create a custom link title for the info link, placed after the info text (can only be used with info_link)
value_fmt
String
default:"num"
Format for values
legend
Boolean
default:"true"
Show legend
legend_location
default:"top"
Position of the legend (top or bottom)Allowed values:
  • top
  • bottom
label_position
String
default:"inside"
Label positionAllowed values:
  • inside
  • outside
  • center
chart_options
default:"{}"
Chart configuration optionsExample:
chart_options={
  color_palette = []
}
Attributes:
  • color_palette: array
align
String
default:"left"
Funnel alignmentAllowed values:
  • center
  • left
  • right
show_percent
Boolean
default:"false"
Show percentages relative to first stage
min_size
String
default:"0%"
Minimum size of funnel stages
max_size
String
default:"100%"
Maximum size of funnel stages
gap
Number
default:"1"
Gap between funnel stages in pixels
where
String
Custom SQL WHERE condition to apply to the query. For date filters, use date_range instead.
having
String
Custom SQL HAVING condition to apply to the query after GROUP BY
limit
Number
Maximum number of rows to return from the query
order
String
Column name(s) with optional direction (e.g. “column_name”, “column_name desc”)
qualify
String
Custom SQL QUALIFY condition to filter windowed results
width
Number
Set the width of this component (in percent) relative to the page width