Graflume · Alpha

Funnel

Compare declining stage totals and conversion loss in a funnel layout.

Chart family · Advanced families

Funnel

Compare declining stage totals and conversion loss in a funnel layout.

Quick API
funnel()
Browser snapshot
graflume/complete
mark
funnel
Presets
5

Basic implementation

The smallest runnable chart

Start with only the required data and family encoding. Expand the code to run the same example.

Basic example

Compare declining stage totals and conversion loss in a funnel layout.

StatusLoading

  • minimal-implementation
Graflume.funnel() Canvas 2D
Control help

Zoom and pan inspect the rendered surface without changing data axes or values. When playback controls are available, they move through real steps in the order each unique value first appears in the source data.

Use Tab to reach a control and Enter or Space to activate it. With the chart focused, use plus and minus to zoom and arrow keys to pan.

Auto placement compares perimeter candidates and avoids the plot, legend, and other callouts when possible. Explicit placement is preserved with only necessary safety correction. Callout text wraps safely inside the bubble. Long unbroken tokens are visually shortened within the line budget, while the complete source text remains available to assistive technology.

Loading

Browser API · Portable schema

Browser API

Graflume.funnel()

const data = [
  {
    "category": "Visited",
    "value": 12000
  },
  {
    "category": "Explored a chart",
    "value": 8450
  },
  {
    "category": "Created a view",
    "value": 5120
  },
  {
    "category": "Shared with a team",
    "value": 2940
  },
  {
    "category": "Returned in 30 days",
    "value": 1860
  }
];

const options = {
  "axes": {
    "x": false,
    "y": false
  },
  "height": 620,
  "locale": "en",
  "mark": {
    "options": {
      "mode": "default"
    }
  },
  "width": "container",
  "x": {
    "field": "category",
    "title": "Journey stage",
    "type": "ordinal"
  },
  "y": {
    "field": "value",
    "title": "Teams",
    "type": "quantitative"
  }
};

Graflume.funnel('#chart', data, options);

Portable schema

ChartSpec 0.1 · options

{
  "axes": {
    "x": false,
    "y": false
  },
  "height": 620,
  "locale": "en",
  "mark": {
    "options": {
      "mode": "default"
    }
  },
  "width": "container",
  "x": {
    "field": "category",
    "title": "Journey stage",
    "type": "ordinal"
  },
  "y": {
    "field": "value",
    "title": "Teams",
    "type": "quantitative"
  }
}

Common features

Features shared by every chart

Use the tabs to compare header, tooltip, theme, legend, highlight, callout, selection, view controls, and accessibility one feature at a time. Hover over a data mark. On supported charts, move the pointer along the axis to see the nearest value. All exact values are available in the table below.

Header

Add a chart title and supporting description inside the visualization.

StatusLoading

  • header
Graflume.funnel() Canvas 2D
Control help

Zoom and pan inspect the rendered surface without changing data axes or values. When playback controls are available, they move through real steps in the order each unique value first appears in the source data.

Use Tab to reach a control and Enter or Space to activate it. With the chart focused, use plus and minus to zoom and arrow keys to pan.

Auto placement compares perimeter candidates and avoids the plot, legend, and other callouts when possible. Explicit placement is preserved with only necessary safety correction. Callout text wraps safely inside the bubble. Long unbroken tokens are visually shortened within the line budget, while the complete source text remains available to assistive technology.

Loading

Browser API · Portable schema

Browser API

Graflume.funnel()

const data = [
  {
    "category": "Visited",
    "value": 12000
  },
  {
    "category": "Explored a chart",
    "value": 8450
  },
  {
    "category": "Created a view",
    "value": 5120
  },
  {
    "category": "Shared with a team",
    "value": 2940
  },
  {
    "category": "Returned in 30 days",
    "value": 1860
  }
];

const options = {
  "axes": {
    "x": false,
    "y": false
  },
  "height": 620,
  "locale": "en",
  "mark": {
    "options": {
      "mode": "default"
    }
  },
  "title": {
    "subtitle": "Funnel chart uses runnable data and options to demonstrate length funnel; neck configuration.",
    "text": "Funnel"
  },
  "width": "container",
  "x": {
    "field": "category",
    "title": "Journey stage",
    "type": "ordinal"
  },
  "y": {
    "field": "value",
    "title": "Teams",
    "type": "quantitative"
  }
};

Graflume.funnel('#chart', data, options);

Portable schema

ChartSpec 0.1 · options

{
  "axes": {
    "x": false,
    "y": false
  },
  "height": 620,
  "locale": "en",
  "mark": {
    "options": {
      "mode": "default"
    }
  },
  "title": {
    "subtitle": "Funnel chart uses runnable data and options to demonstrate length funnel; neck configuration.",
    "text": "Funnel"
  },
  "width": "container",
  "x": {
    "field": "category",
    "title": "Journey stage",
    "type": "ordinal"
  },
  "y": {
    "field": "value",
    "title": "Teams",
    "type": "quantitative"
  }
}

Chart-specific features

Every executable mode in this family

These tabs come from Graflume's public catalog. Every mode owns runnable data, options, a Quick API, and source-backed feature claims.

Funnel chart

Funnel chart uses runnable data and options to demonstrate length funnel; neck configuration.

StatusLoading

  • funnel
  • length funnel
  • neck configuration
Graflume.funnel() Canvas 2D
Control help

Zoom and pan inspect the rendered surface without changing data axes or values. When playback controls are available, they move through real steps in the order each unique value first appears in the source data.

Use Tab to reach a control and Enter or Space to activate it. With the chart focused, use plus and minus to zoom and arrow keys to pan.

Auto placement compares perimeter candidates and avoids the plot, legend, and other callouts when possible. Explicit placement is preserved with only necessary safety correction. Callout text wraps safely inside the bubble. Long unbroken tokens are visually shortened within the line budget, while the complete source text remains available to assistive technology.

Loading

Browser API · Portable schema

Browser API

Graflume.funnel()

const data = [
  {
    "category": "Visited",
    "value": 12000
  },
  {
    "category": "Explored a chart",
    "value": 8450
  },
  {
    "category": "Created a view",
    "value": 5120
  },
  {
    "category": "Shared with a team",
    "value": 2940
  },
  {
    "category": "Returned in 30 days",
    "value": 1860
  }
];

const options = {
  "accessibility": {
    "description": "Zoom and pan inspect the rendered surface without changing data axes or values. When playback controls are available, they move through real steps in the order each unique value first appears in the source data.",
    "label": "Funnel example"
  },
  "axes": {
    "x": false,
    "y": false
  },
  "height": 620,
  "interaction": {
    "controls": {
      "annotations": false,
      "export": true,
      "fullscreen": true,
      "labels": {
        "controls": "Chart controls",
        "enterFullscreen": "Enter fullscreen",
        "exitFullscreen": "Exit fullscreen",
        "exportPng": "Download PNG",
        "hideAnnotations": "Hide callouts",
        "loop": "Loop playback",
        "nextFrame": "Next frame",
        "pause": "Pause",
        "play": "Play",
        "previousFrame": "Previous frame",
        "reset": "Reset view",
        "seek": "Playback position",
        "showAnnotations": "Show callouts",
        "speed": "Playback speed",
        "zoomIn": "Zoom in",
        "zoomOut": "Zoom out"
      },
      "playback": false,
      "reset": true,
      "zoom": true
    },
    "hover": true,
    "navigation": {
      "drag": true,
      "keyboard": true,
      "maxZoom": 6,
      "minZoom": 1,
      "pinch": true,
      "wheel": "modifier"
    },
    "tooltip": {
      "fields": [
        {
          "field": "category",
          "format": "auto",
          "label": "Category"
        },
        {
          "field": "value",
          "format": "number",
          "label": "Value"
        }
      ],
      "title": "Funnel",
      "trigger": "mark"
    }
  },
  "locale": "en",
  "mark": {
    "options": {
      "mode": "default"
    }
  },
  "padding": {
    "top": 52
  },
  "theme": "graflume-light",
  "title": {
    "subtitle": "Funnel chart uses runnable data and options to demonstrate length funnel; neck configuration.",
    "text": "Funnel"
  },
  "width": "container",
  "x": {
    "field": "category",
    "title": "Journey stage",
    "type": "ordinal"
  },
  "y": {
    "field": "value",
    "title": "Teams",
    "type": "quantitative"
  }
};

Graflume.funnel('#chart', data, options);

Portable schema

ChartSpec 0.1 · options

{
  "accessibility": {
    "description": "Zoom and pan inspect the rendered surface without changing data axes or values. When playback controls are available, they move through real steps in the order each unique value first appears in the source data.",
    "label": "Funnel example"
  },
  "axes": {
    "x": false,
    "y": false
  },
  "height": 620,
  "interaction": {
    "controls": {
      "annotations": false,
      "export": true,
      "fullscreen": true,
      "labels": {
        "controls": "Chart controls",
        "enterFullscreen": "Enter fullscreen",
        "exitFullscreen": "Exit fullscreen",
        "exportPng": "Download PNG",
        "hideAnnotations": "Hide callouts",
        "loop": "Loop playback",
        "nextFrame": "Next frame",
        "pause": "Pause",
        "play": "Play",
        "previousFrame": "Previous frame",
        "reset": "Reset view",
        "seek": "Playback position",
        "showAnnotations": "Show callouts",
        "speed": "Playback speed",
        "zoomIn": "Zoom in",
        "zoomOut": "Zoom out"
      },
      "playback": false,
      "reset": true,
      "zoom": true
    },
    "hover": true,
    "navigation": {
      "drag": true,
      "keyboard": true,
      "maxZoom": 6,
      "minZoom": 1,
      "pinch": true,
      "wheel": "modifier"
    },
    "tooltip": {
      "fields": [
        {
          "field": "category",
          "format": "auto",
          "label": "Category"
        },
        {
          "field": "value",
          "format": "number",
          "label": "Value"
        }
      ],
      "title": "Funnel",
      "trigger": "mark"
    }
  },
  "locale": "en",
  "mark": {
    "options": {
      "mode": "default"
    }
  },
  "padding": {
    "top": 52
  },
  "theme": "graflume-light",
  "title": {
    "subtitle": "Funnel chart uses runnable data and options to demonstrate length funnel; neck configuration.",
    "text": "Funnel"
  },
  "width": "container",
  "x": {
    "field": "category",
    "title": "Journey stage",
    "type": "ordinal"
  },
  "y": {
    "field": "value",
    "title": "Teams",
    "type": "quantitative"
  }
}

Edge cases

Numeric range, irregular structure, and data volume

Exercise numeric range, sparse structure, and large inputs with valid data. Each tab materializes data only when needed and never silently repairs invalid values.

Wide numeric range

Mix zero, very small finite values, and very large finite values to verify automatic domains, precision, and stable geometry. NaN and Infinity remain intentionally invalid. It applies 2 data-integrity rules that preserve finite values and axis domains.

StatusLoading

  • extreme-range
  • extreme-small
  • extreme-large
  • zero
  • budget:marks<=5
Graflume.funnel() Canvas 2D
Control help

Zoom and pan inspect the rendered surface without changing data axes or values. When playback controls are available, they move through real steps in the order each unique value first appears in the source data.

Use Tab to reach a control and Enter or Space to activate it. With the chart focused, use plus and minus to zoom and arrow keys to pan.

Auto placement compares perimeter candidates and avoids the plot, legend, and other callouts when possible. Explicit placement is preserved with only necessary safety correction. Callout text wraps safely inside the bubble. Long unbroken tokens are visually shortened within the line budget, while the complete source text remains available to assistive technology.

Loading

Browser API · Portable schema

Browser API

Graflume.funnel()

const data = [
  {
    "category": "Visited",
    "value": 1000000000000
  },
  {
    "category": "Explored a chart",
    "value": 1
  },
  {
    "category": "Created a view",
    "value": 1e-9
  },
  {
    "category": "Shared with a team",
    "value": 0
  },
  {
    "category": "Returned in 30 days",
    "value": 0
  }
];

const options = {
  "accessibility": {
    "description": "A realistic product journey exposes the largest conversion loss. The example uses curated, deterministic data and exposes its exact values in a semantic table.",
    "label": "Funnel"
  },
  "axes": {
    "x": false,
    "y": false
  },
  "height": 620,
  "locale": "en",
  "mark": {
    "options": {
      "mode": "default"
    }
  },
  "title": {
    "subtitle": "edge case · range",
    "text": "Funnel"
  },
  "width": "container",
  "x": {
    "field": "category",
    "title": "Journey stage",
    "type": "ordinal"
  },
  "y": {
    "field": "value",
    "title": "Teams",
    "type": "quantitative"
  }
};

Graflume.funnel('#chart', data, options);

Portable schema

ChartSpec 0.1 · options

{
  "accessibility": {
    "description": "A realistic product journey exposes the largest conversion loss. The example uses curated, deterministic data and exposes its exact values in a semantic table.",
    "label": "Funnel"
  },
  "axes": {
    "x": false,
    "y": false
  },
  "height": 620,
  "locale": "en",
  "mark": {
    "options": {
      "mode": "default"
    }
  },
  "title": {
    "subtitle": "edge case · range",
    "text": "Funnel"
  },
  "width": "container",
  "x": {
    "field": "category",
    "title": "Journey stage",
    "type": "ordinal"
  },
  "y": {
    "field": "value",
    "title": "Teams",
    "type": "quantitative"
  }
}

Extreme environments

Reconfigure for display, input, and device capability

Combine container size, input method, display capability, and user preference instead of guessing a device name. Compare mobile, watch, e-paper, monochrome, dot-matrix, and standards-based extreme environments on the same chart.

Fluid responsive

Reflow axes, legends, descriptions, and controls from the available container size.

960×540 · adaptive.profiles=responsive-fluid
  • zoom-reflow
  • shape-rectangle
  • display-color
  • input-fine
  • motion-full
  • renderer-canvas-spatial

Extreme environment preview

Choose a profile above to preserve the same data and ChartSpec while reconfiguring the chart for display size, input method, display capability, and user preference.

StatusLoading

  • adaptive
  • capability-driven
  • no-user-agent-branching
  • Legend: legend · categories · category
  • Point and range highlights: highlights[] · datum · category
  • Custom callouts: annotations[] · datum · category · callout · placement:auto
  • Interactive selection: selection · multiple · toggle
Graflume.funnel() Canvas 2D
Control help

Zoom and pan inspect the rendered surface without changing data axes or values. When playback controls are available, they move through real steps in the order each unique value first appears in the source data.

Use Tab to reach a control and Enter or Space to activate it. With the chart focused, use plus and minus to zoom and arrow keys to pan.

Auto placement compares perimeter candidates and avoids the plot, legend, and other callouts when possible. Explicit placement is preserved with only necessary safety correction. Callout text wraps safely inside the bubble. Long unbroken tokens are visually shortened within the line budget, while the complete source text remains available to assistive technology.

Loading

Browser API · Portable schema

Browser API

Graflume.funnel()

const data = [
  {
    "category": "Visited",
    "value": 12000
  },
  {
    "category": "Explored a chart",
    "value": 8450
  },
  {
    "category": "Created a view",
    "value": 5120
  },
  {
    "category": "Shared with a team",
    "value": 2940
  },
  {
    "category": "Returned in 30 days",
    "value": 1860
  }
];

const options = {
  "accessibility": {
    "description": "A realistic product journey exposes the largest conversion loss. The example uses curated, deterministic data and exposes its exact values in a semantic table.",
    "label": "Funnel chart: A realistic product journey exposes the largest conversion loss"
  },
  "annotations": [
    {
      "connector": {
        "visible": true
      },
      "detail": "Attach user-authored safe text to a datum, axis range, or normalized plot position.",
      "id": "manual-callout",
      "placement": "auto",
      "style": {
        "maxWidth": 220,
        "padding": 8
      },
      "target": {
        "field": "category",
        "type": "datum",
        "value": "Created a view"
      },
      "text": "Point and range highlights · Created a view"
    }
  ],
  "axes": {
    "x": false,
    "y": false
  },
  "create": {
    "adaptive": {
      "profiles": "auto"
    }
  },
  "height": 620,
  "highlights": [
    {
      "id": "manual-focus",
      "padding": 7,
      "target": {
        "field": "category",
        "type": "datum",
        "value": "Created a view"
      }
    }
  ],
  "interaction": {
    "controls": {
      "annotations": true,
      "export": true,
      "fullscreen": true,
      "labels": {
        "controls": "Chart controls",
        "enterFullscreen": "Enter fullscreen",
        "exitFullscreen": "Exit fullscreen",
        "exportPng": "Download PNG",
        "hideAnnotations": "Hide callouts",
        "loop": "Loop playback",
        "nextFrame": "Next frame",
        "pause": "Pause",
        "play": "Play",
        "previousFrame": "Previous frame",
        "reset": "Reset view",
        "seek": "Playback position",
        "showAnnotations": "Show callouts",
        "speed": "Playback speed",
        "zoomIn": "Zoom in",
        "zoomOut": "Zoom out"
      },
      "playback": false,
      "reset": true,
      "zoom": true
    },
    "hover": true,
    "navigation": {
      "drag": true,
      "keyboard": true,
      "maxZoom": 6,
      "minZoom": 1,
      "pinch": true,
      "wheel": "modifier"
    },
    "selection": {
      "ariaLabel": "Interactive selection",
      "clearOnBackground": true,
      "clearOnEscape": true,
      "highlight": {
        "padding": 5
      },
      "key": "category",
      "mode": "multiple",
      "toggle": true
    },
    "tooltip": {
      "fields": [
        {
          "field": "category",
          "format": "auto",
          "label": "Category"
        },
        {
          "field": "value",
          "format": "number",
          "label": "Value"
        }
      ],
      "title": "Funnel",
      "trigger": "mark"
    }
  },
  "legend": {
    "field": "category",
    "interactive": true,
    "labels": {
      "hide": "Hide",
      "show": "Show"
    },
    "maxItems": 8,
    "mode": "categories",
    "orientation": "horizontal",
    "position": "bottom",
    "title": "Category",
    "visible": true
  },
  "locale": "en",
  "mark": {
    "options": {
      "mode": "default"
    }
  },
  "padding": {
    "top": 52
  },
  "theme": "graflume-light",
  "title": {
    "subtitle": "A realistic product journey exposes the largest conversion loss",
    "text": "Funnel chart"
  },
  "width": "container",
  "x": {
    "field": "category",
    "title": "Journey stage",
    "type": "ordinal"
  },
  "y": {
    "field": "value",
    "title": "Teams",
    "type": "quantitative"
  }
};

Graflume.funnel('#chart', data, options);

Portable schema

ChartSpec 0.1 · options

{
  "accessibility": {
    "description": "A realistic product journey exposes the largest conversion loss. The example uses curated, deterministic data and exposes its exact values in a semantic table.",
    "label": "Funnel chart: A realistic product journey exposes the largest conversion loss"
  },
  "annotations": [
    {
      "connector": {
        "visible": true
      },
      "detail": "Attach user-authored safe text to a datum, axis range, or normalized plot position.",
      "id": "manual-callout",
      "placement": "auto",
      "style": {
        "maxWidth": 220,
        "padding": 8
      },
      "target": {
        "field": "category",
        "type": "datum",
        "value": "Created a view"
      },
      "text": "Point and range highlights · Created a view"
    }
  ],
  "axes": {
    "x": false,
    "y": false
  },
  "create": {
    "adaptive": {
      "profiles": "auto"
    }
  },
  "height": 620,
  "highlights": [
    {
      "id": "manual-focus",
      "padding": 7,
      "target": {
        "field": "category",
        "type": "datum",
        "value": "Created a view"
      }
    }
  ],
  "interaction": {
    "controls": {
      "annotations": true,
      "export": true,
      "fullscreen": true,
      "labels": {
        "controls": "Chart controls",
        "enterFullscreen": "Enter fullscreen",
        "exitFullscreen": "Exit fullscreen",
        "exportPng": "Download PNG",
        "hideAnnotations": "Hide callouts",
        "loop": "Loop playback",
        "nextFrame": "Next frame",
        "pause": "Pause",
        "play": "Play",
        "previousFrame": "Previous frame",
        "reset": "Reset view",
        "seek": "Playback position",
        "showAnnotations": "Show callouts",
        "speed": "Playback speed",
        "zoomIn": "Zoom in",
        "zoomOut": "Zoom out"
      },
      "playback": false,
      "reset": true,
      "zoom": true
    },
    "hover": true,
    "navigation": {
      "drag": true,
      "keyboard": true,
      "maxZoom": 6,
      "minZoom": 1,
      "pinch": true,
      "wheel": "modifier"
    },
    "selection": {
      "ariaLabel": "Interactive selection",
      "clearOnBackground": true,
      "clearOnEscape": true,
      "highlight": {
        "padding": 5
      },
      "key": "category",
      "mode": "multiple",
      "toggle": true
    },
    "tooltip": {
      "fields": [
        {
          "field": "category",
          "format": "auto",
          "label": "Category"
        },
        {
          "field": "value",
          "format": "number",
          "label": "Value"
        }
      ],
      "title": "Funnel",
      "trigger": "mark"
    }
  },
  "legend": {
    "field": "category",
    "interactive": true,
    "labels": {
      "hide": "Hide",
      "show": "Show"
    },
    "maxItems": 8,
    "mode": "categories",
    "orientation": "horizontal",
    "position": "bottom",
    "title": "Category",
    "visible": true
  },
  "locale": "en",
  "mark": {
    "options": {
      "mode": "default"
    }
  },
  "padding": {
    "top": 52
  },
  "theme": "graflume-light",
  "title": {
    "subtitle": "A realistic product journey exposes the largest conversion loss",
    "text": "Funnel chart"
  },
  "width": "container",
  "x": {
    "field": "category",
    "title": "Journey stage",
    "type": "ordinal"
  },
  "y": {
    "field": "value",
    "title": "Teams",
    "type": "quantitative"
  }
}

Catalog

Modes · compatibility identifiers

The source-controlled catalog maps callable modes in this family and compatibility identifiers to their canonical modes. This table contains executable entries only.

5 modes · 4 compatibility identifiers

Funnel · supported modes · representative funnel
IDNameQuick APImodemarkrenderer
funnelFunnel chartfunnel()defaultfunnelcanvas
funnel-areaFunnel area chartfunnelArea()areafunnelcanvas
funnel-3dDepth funnel chartfunnel3d()funnel-3dpyramidcanvas
pyramidPyramid chartpyramid()pyramidpyramidcanvas
pyramid-3dDepth pyramid chartpyramid3d()pyramid-3dpyramidcanvas
Funnel · compatibility identifiers
IdentifierCanonical mode ID
funnelfunnel
funnel3dfunnel-3d
pyramidpyramid
pyramid3dpyramid-3d

Manual

Integration checklist

ARIA · table fallback

Accessibility

Canvas ARIA metadata is paired with a text summary and table fallback.

standard · large · ultra

Performance

Standard, large, and ultra profiles bound rendering work.