Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Chart changing weights over multiple stages
ResourceFunction["AlluvialFlowChart"][flows,categories,stages] generates an alluvial chart of flows over categories through stages. |
| "BlockWidth" | 0.25 | width of stage blocks |
| "HorizontalSpacing" | 2.4 | horizontal gap between stage blocks |
| "SortBySize" | "Groups" | sort by stage groups |
| "RibbonCurveFactor" | 0.75 | how much the ribbons curve |
| "MinFlowThreshold" | 3 | minimum value to show |
| "ShowPercentages" | False | whether to show the percentages |
| LabelStyle | Directive[FontFamily→\"Arial\",FontWeight→Bold] | label styling |
| "ValueStyle" | Directive[FontFamily→\"Arial\",FontSize→9.5] | value styling |
Construct a simple 2-stage alluvial diagram:
| In[1]:= | ![]() |
| Out[1]= | ![]() |
When the mouse is moved over a stage, neighbouring connected stages are highlighted with their values updated accordingly:
| In[2]:= | ![]() |

Specify the size of the stage blocks:
| In[3]:= | ![]() |
| Out[4]= | ![]() |
Specify the size of the horizontal gap between the stage blocks, where the spacing specification can be a single list value that is used for all or a list of values that will be used accordingly:
| In[5]:= | ![]() |
| Out[6]= | ![]() |
Specify whether or not to show the stage blocks percentage value in the block rather than the raw value:
| In[7]:= | ![]() |
| Out[8]= | ![]() |
Specify whether a sort function is to be applied to the stages. With the setting "Groups", AlluvialFlowChart tries to minimize flow crossings:
| In[9]:= | ![]() |
| Out[10]= | ![]() |
True - sort each stage big to small values:
| In[11]:= | ![]() |
| Out[12]= | ![]() |
fallback - sort each stage by reverse categories:
| In[13]:= | ![]() |
| Out[14]= | ![]() |
Specify the smoothness of the ribbon curves:
| In[15]:= | ![]() |
| Out[16]= | ![]() |
Specify the minimum ribbon value that will be shown in the chart:
| In[17]:= | ![]() |
| Out[18]= | ![]() |
Specify a function that generates the style of the label element of the stage block:
| In[19]:= | ![]() |
| Out[20]= | ![]() |
Specify a function that generates the style of the value element within the stage block:
| In[21]:= | ![]() |
| Out[25]= | ![]() |
The ResourceFunction AlluvialChart has simpler visual functionality and fewer refinement options. Additionally, there is no mouseover functionality to show flows between neighbouring stages:
| In[26]:= | ![]() |
| Out[27]= | ![]() |
Wolfram Language 13.0 (December 2021) or above
This work is licensed under a Creative Commons Attribution 4.0 International License