You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New Sample Diagrams: "Start Simple" and "Financial Results"
"Start Simple" gives you just 2 simple gray flows.
- This is probably a better starting point when you're doing something
which isn't like any of the other samples.
"Financial Results" is an opinionated take on the quarterly-results
graph of a business. Some notable things:
- Costs and Expenses are distinct; color them differently.
- Green/red is not an accessible color pairing. I took the cue for
these particular colors from Bloomberg's accessible Terminal colors
(https://www.bloomberg.com/ux/2021/10/14/designing-the-terminal-for-color-accessibility/):
profit = blue, expense = rust, cost = a grayish variant of their
default gold.
"Financial Results", "Ranked Election", "Start Simple", and
"Job Search" all now place their labels BEFORE their nodes.
- This ought to make the diagrams easier to read for someone who hasn't
seen a Sankey before. (Most people are not acclimated to reading &
tracing labels when they switch positions in the middle.)
Copy file name to clipboardExpand all lines: build/constants.js
+57-1Lines changed: 57 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -77,11 +77,17 @@ const fontMetrics
77
77
name: 'Basic Budget',
78
78
flows: "// Enter Flows between Nodes, like this:\n// Source [AMOUNT] Target\n\nWages [1500] Budget\nOther [250] Budget\n\nBudget [450] Taxes\nBudget [420] Housing\nBudget [400] Food\nBudget [295] Transportation\nBudget [25] Savings\n\n// You can set a Node's color, like this:\n:Budget #708090\n// ...or a color for a single Flow:\nBudget [160] Other Necessities #0F0\n\n// Use the controls below to customize\n// your diagram's appearance...",
79
79
settings: {
80
+
canvas_width: 600,
80
81
node_height: 50,
81
82
node_spacing: 85,
83
+
node_width: 9,
82
84
font_size: 16,
85
+
unit_prefix: '',
83
86
layout_style_auto: true,
84
87
flow_outside_in: true,
88
+
theme_a_radio: true,
89
+
label_pos_inside: true,
90
+
justify_ends: false,
85
91
},
86
92
}],
87
93
@@ -90,11 +96,17 @@ const fontMetrics
90
96
name: 'Ranked Election',
91
97
flows: '// Sample Ranked Election diagram\n\nGH - Round 1 [300000] GH - Round 2\nEF - Round 1 [220000] EF - Round 2\nCD - Round 1 [200000] CD - Round 2\nAB - Round 1 [10000] GH - Round 2\nAB - Round 1 [25000] EF - Round 2\nAB - Round 1 [20000] CD - Round 2\n\nGH - Round 2 [310000] GH - Round 3\nEF - Round 2 [245000] EF - Round 3\nCD - Round 2 [50000] GH - Round 3\nCD - Round 2 [95000] EF - Round 3\n\n// This line sets a custom gray color:\n:No further votes #555 <<\nAB - Round 1 [20000] No further votes\nCD - Round 2 [75000] No further votes',
0 commit comments