Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Create a chart showing diminishing quantities surviving stages of a process
| ResourceFunction["FunnelChart"][data] shows a list of the numerical values in data as a funnel. | |
| ResourceFunction["FunnelChart"][<|"lbl1"→val1,"lbl2"→val2,…|>] shows values vali as a funnel labeled with the lbli. | 
| "EdgeStyle" | Black | style for the EdgeForm of the funnel | 
| "ProportionTextStyle" | Automatic | style for appearance element "Proportion" | 
| "SpacingStyle" | GrayLevel[0.9] | style for transitions between funnel stages | 
| "StepProportionTextStyle" | Automatic | style for appearance element "StepProportion" | 
| "ValueTextStyle" | Automatic | style for appearance element "Value" | 
| AppearanceElements | None | list of text elements to display on each stage | 
| ChartLabels | Automatic | list of labels for each stage of the funnel | 
| ColorFunction | Automatic | function giving the color of each funnel stage | 
| InterpolationOrder | 1 | shape of the funnel stages | 
| Spacings | 0.04 | space to allow for transitions between stages | 
Display a funnel chart for a process where 10 items entered the process, but only 1 completed it:
| In[1]:= | ![ResourceFunction["FunnelChart"][{10, 7, 3, 1}]](https://www.wolframcloud.com/obj/resourcesystem/images/39f/39fcda15-ff2f-47b2-ac5d-e86f8f5bd6bf/22cfe9001a23e336.png) | 
| Out[1]= |  | 
Funnel charts are often used to describe business processes where there is a loss between stages. For example, sales leads being developed into sales:
| In[2]:= | ![ResourceFunction[
 "FunnelChart"][<|"Leads" -> 10, "Responses" -> 7, "Negotiated" -> 3, "Won" -> 1|>]](https://www.wolframcloud.com/obj/resourcesystem/images/39f/39fcda15-ff2f-47b2-ac5d-e86f8f5bd6bf/7c295b9b9a93a048.png) | 
| Out[2]= |  | 
While it is not the typical usage, it is possible to give use data that is not monotonically decreasing:
| In[3]:= | ![ResourceFunction[
 "FunnelChart"][<|"Leads" -> 5, "Responses" -> 12, "Negotiated" -> 5, "Won" -> 20|>, ColorFunction -> ColorData[2], BaseStyle -> 20]](https://www.wolframcloud.com/obj/resourcesystem/images/39f/39fcda15-ff2f-47b2-ac5d-e86f8f5bd6bf/3b47ba58b89b6bd3.png) | 
| Out[3]= |  | 
AppearanceElements controls which numbers are displayed on the FunnelChart. There are three choices. "Values" displays the raw data:
| In[4]:= | ![ResourceFunction[
 "FunnelChart"][<|"Leads" -> 10, "Responses" -> 7, "Negotiated" -> 3, "Won" -> 1|>, AppearanceElements -> "Value"]](https://www.wolframcloud.com/obj/resourcesystem/images/39f/39fcda15-ff2f-47b2-ac5d-e86f8f5bd6bf/67951b05d3f71d04.png) | 
| Out[4]= |  | 
"Proportion" displays the data as a proportion of the first value in the funnel:
| In[5]:= | ![ResourceFunction[
 "FunnelChart"][<|"Leads" -> 10, "Responses" -> 7, "Negotiated" -> 3, "Won" -> 1|>, AppearanceElements -> "Proportion"]](https://www.wolframcloud.com/obj/resourcesystem/images/39f/39fcda15-ff2f-47b2-ac5d-e86f8f5bd6bf/1d9401eaf91fd3ac.png) | 
| Out[5]= |  | 
"StepProportion" displays the data as a proportion of the previous stage of the process:
| In[6]:= | ![ResourceFunction[
 "FunnelChart"][<|"Leads" -> 10, "Responses" -> 7, "Negotiated" -> 3, "Won" -> 1|>, AppearanceElements -> "StepProportion", Spacings -> 0.15]](https://www.wolframcloud.com/obj/resourcesystem/images/39f/39fcda15-ff2f-47b2-ac5d-e86f8f5bd6bf/42e7f20a5c16380b.png) | 
| Out[6]= |  | 
Multiple AppearanceElements can be given as a list or by using the value All:
| In[7]:= | ![ResourceFunction[
 "FunnelChart"][<|"Leads" -> 10, "Responses" -> 7, "Negotiated" -> 3, "Won" -> 1|>, AppearanceElements -> All, Spacings -> 0.15]](https://www.wolframcloud.com/obj/resourcesystem/images/39f/39fcda15-ff2f-47b2-ac5d-e86f8f5bd6bf/344a73af4cb30fec.png) | 
| Out[7]= |  | 
All text contents are subject to styles given with BaseStyle. AppearanceElements can be individually styled with "ValueTextStyle", "ProportionTextStyle" and "StepProportionTextStyle":
| In[8]:= | ![ResourceFunction[
 "FunnelChart"][<|"Leads" -> 10, "Responses" -> 7, "Negotiated" -> 3, "Won" -> 1|>,
 AppearanceElements -> All, Spacings -> 0.15,
 "ValueTextStyle" -> Directive[LightGray, FontSize -> 20], "ProportionTextStyle" -> Directive[White, FontSize -> 20] , "StepProportionTextStyle" -> Directive[Red, FontSize -> 9], BaseStyle -> {30, Gray}]](https://www.wolframcloud.com/obj/resourcesystem/images/39f/39fcda15-ff2f-47b2-ac5d-e86f8f5bd6bf/4761cbb757ad8708.png) | 
| Out[8]= |  | 
Funnel colors can be given with any ColorFunction that accepts integer values from 1 to the number of stages:
| In[9]:= | ![ResourceFunction[
 "FunnelChart"][<|"Leads" -> 10, "Responses" -> 7, "Negotiated" -> 3, "Won" -> 1|>, ColorFunction -> ColorData[2], BaseStyle -> 20]](https://www.wolframcloud.com/obj/resourcesystem/images/39f/39fcda15-ff2f-47b2-ac5d-e86f8f5bd6bf/3e9540ad345762b2.png) | 
| Out[9]= |  | 
InterpolationOrder controls the shape of the funnel stages. Typical values are 0, 1 or 2:
| In[10]:= | ![ResourceFunction[
   "FunnelChart"][<|"Leads" -> 10, "Responses" -> 7, "Interested" -> 6, "Negotiated" -> 3, "Won" -> 1|>, InterpolationOrder -> #] & /@ {0, 1, 2}](https://www.wolframcloud.com/obj/resourcesystem/images/39f/39fcda15-ff2f-47b2-ac5d-e86f8f5bd6bf/1d2a3ca0538d38c9.png) | 
| Out[10]= |  | 
Control the style of spacings with "SpacingStyle":
| In[12]:= | ![ResourceFunction[
 "FunnelChart"][<|"Leads" -> 10, "Responses" -> 7, "Negotiated" -> 3, "Won" -> 1|>, Spacings -> 0.1, "SpacingStyle" -> None]](https://www.wolframcloud.com/obj/resourcesystem/images/39f/39fcda15-ff2f-47b2-ac5d-e86f8f5bd6bf/4412fdd50aad6d6f.png) | 
| Out[12]= |  | 
This work is licensed under a Creative Commons Attribution 4.0 International License