apexsankey 1.7.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/publish.yml +65 -2
- package/README.md +5 -8
- package/apexsankey.d.ts +24 -24
- package/apexsankey.es.min.js +1 -1
- package/apexsankey.min.js +1 -1
- package/demo/basic-sankey.html +81 -64
- package/demo/css-theming.html +33 -17
- package/demo/sankey-alternate-node.html +93 -81
- package/demo/sankey-custom-fonts.html +78 -146
- package/demo/sankey-edge-options.html +205 -88
- package/demo/sankey-node-customization.html +83 -90
- package/demo/sankey-node-overlapping.html +158 -409
- package/demo/sankey-path-highlight.html +4 -4
- package/package.json +2 -2
|
@@ -3,104 +3,221 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
-
<title>
|
|
7
|
-
<link href="https://fonts.googleapis.com
|
|
6
|
+
<title>Edge Options - Global Trade Routes</title>
|
|
7
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
8
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
9
|
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap" rel="stylesheet" />
|
|
8
10
|
<script src="../apexsankey.min.js"></script>
|
|
11
|
+
<style>
|
|
12
|
+
body {
|
|
13
|
+
max-width: 1000px;
|
|
14
|
+
margin: 0 auto;
|
|
15
|
+
font-family: 'Inter', sans-serif;
|
|
16
|
+
background: #fff;
|
|
17
|
+
padding: 20px 0;
|
|
18
|
+
}
|
|
19
|
+
h2 {
|
|
20
|
+
font-size: 22px;
|
|
21
|
+
font-weight: 700;
|
|
22
|
+
color: #1a1a2e;
|
|
23
|
+
margin: 0 0 4px 0;
|
|
24
|
+
line-height: 1.3;
|
|
25
|
+
}
|
|
26
|
+
.subtitle {
|
|
27
|
+
font-size: 13px;
|
|
28
|
+
color: #6e6e6e;
|
|
29
|
+
margin-bottom: 16px;
|
|
30
|
+
}
|
|
31
|
+
.controls {
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-wrap: wrap;
|
|
34
|
+
gap: 20px;
|
|
35
|
+
align-items: center;
|
|
36
|
+
background: #f8fafc;
|
|
37
|
+
border: 1px solid #e2e8f0;
|
|
38
|
+
border-radius: 8px;
|
|
39
|
+
padding: 14px 18px;
|
|
40
|
+
margin-bottom: 16px;
|
|
41
|
+
}
|
|
42
|
+
.control-group {
|
|
43
|
+
display: flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
gap: 8px;
|
|
46
|
+
}
|
|
47
|
+
.control-group label {
|
|
48
|
+
font-weight: 600;
|
|
49
|
+
font-size: 12px;
|
|
50
|
+
color: #475569;
|
|
51
|
+
white-space: nowrap;
|
|
52
|
+
}
|
|
53
|
+
.toggle-btn {
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
padding: 5px 14px;
|
|
56
|
+
border-radius: 6px;
|
|
57
|
+
border: 1.5px solid #6366f1;
|
|
58
|
+
background: #6366f1;
|
|
59
|
+
color: #fff;
|
|
60
|
+
font-family: 'Inter', sans-serif;
|
|
61
|
+
font-weight: 600;
|
|
62
|
+
font-size: 12px;
|
|
63
|
+
transition:
|
|
64
|
+
background 0.15s,
|
|
65
|
+
color 0.15s;
|
|
66
|
+
}
|
|
67
|
+
.toggle-btn.off {
|
|
68
|
+
background: #fff;
|
|
69
|
+
color: #6366f1;
|
|
70
|
+
}
|
|
71
|
+
input[type='range'] {
|
|
72
|
+
width: 120px;
|
|
73
|
+
accent-color: #6366f1;
|
|
74
|
+
}
|
|
75
|
+
.value-label {
|
|
76
|
+
font-weight: 600;
|
|
77
|
+
font-size: 12px;
|
|
78
|
+
color: #334155;
|
|
79
|
+
min-width: 32px;
|
|
80
|
+
text-align: right;
|
|
81
|
+
}
|
|
82
|
+
</style>
|
|
9
83
|
</head>
|
|
10
84
|
<body>
|
|
11
|
-
<
|
|
85
|
+
<h2>Global Trade Routes</h2>
|
|
86
|
+
<p class="subtitle">
|
|
87
|
+
Explore edge styling with interactive controls for
|
|
88
|
+
<code>edgeOpacity</code>, <code>edgeGradientFill</code>, and
|
|
89
|
+
<code>edgeGap</code>
|
|
90
|
+
</p>
|
|
91
|
+
|
|
92
|
+
<div class="controls">
|
|
93
|
+
<div class="control-group">
|
|
94
|
+
<label>edgeGradientFill</label>
|
|
95
|
+
<button id="toggle-gradient" class="toggle-btn" aria-pressed="true">Enabled</button>
|
|
96
|
+
</div>
|
|
97
|
+
<div class="control-group">
|
|
98
|
+
<label>edgeOpacity</label>
|
|
99
|
+
<input type="range" id="slider-opacity" min="0.1" max="0.8" step="0.05" value="0.4" />
|
|
100
|
+
<span id="val-opacity" class="value-label">0.40</span>
|
|
101
|
+
</div>
|
|
102
|
+
<div class="control-group">
|
|
103
|
+
<label>edgeGap</label>
|
|
104
|
+
<input type="range" id="slider-gap" min="0" max="8" step="1" value="2" />
|
|
105
|
+
<span id="val-gap" class="value-label">2</span>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
|
|
109
|
+
<div id="svg-sankey"></div>
|
|
12
110
|
<script>
|
|
13
111
|
const data = {
|
|
14
112
|
nodes: [
|
|
15
|
-
{id: '
|
|
16
|
-
{id: '
|
|
17
|
-
{id: '
|
|
18
|
-
{id: '
|
|
19
|
-
{id: '
|
|
20
|
-
{id: '
|
|
21
|
-
{id: '
|
|
22
|
-
{id: '
|
|
23
|
-
{id: '
|
|
24
|
-
{id: '
|
|
25
|
-
{id: '
|
|
26
|
-
{id: '
|
|
27
|
-
{id: '
|
|
28
|
-
{id: '
|
|
29
|
-
{id: 'Finance & insurance', title: 'finance & insurance'},
|
|
113
|
+
{id: 'China', title: 'China', color: '#EF4444'},
|
|
114
|
+
{id: 'USA', title: 'United States', color: '#3B82F6'},
|
|
115
|
+
{id: 'Germany', title: 'Germany', color: '#F59E0B'},
|
|
116
|
+
{id: 'Japan', title: 'Japan', color: '#EC4899'},
|
|
117
|
+
{id: 'South Korea', title: 'South Korea', color: '#8B5CF6'},
|
|
118
|
+
{id: 'Electronics', title: 'Electronics', color: '#0EA5E9'},
|
|
119
|
+
{id: 'Automotive', title: 'Automotive', color: '#F97316'},
|
|
120
|
+
{id: 'Machinery', title: 'Machinery', color: '#64748B'},
|
|
121
|
+
{id: 'Textiles', title: 'Textiles', color: '#D946EF'},
|
|
122
|
+
{id: 'Chemicals', title: 'Chemicals', color: '#10B981'},
|
|
123
|
+
{id: 'Europe', title: 'Europe', color: '#6366F1'},
|
|
124
|
+
{id: 'North America', title: 'North America', color: '#14B8A6'},
|
|
125
|
+
{id: 'Asia Pacific', title: 'Asia Pacific', color: '#F43F5E'},
|
|
126
|
+
{id: 'Rest of World', title: 'Rest of World', color: '#A3A3A3'},
|
|
30
127
|
],
|
|
31
128
|
edges: [
|
|
32
|
-
{source: '
|
|
33
|
-
{source: '
|
|
34
|
-
{source: '
|
|
35
|
-
{source: '
|
|
36
|
-
{source: '
|
|
37
|
-
|
|
38
|
-
{source: '
|
|
39
|
-
{source: '
|
|
40
|
-
{source: '
|
|
41
|
-
{source: '
|
|
42
|
-
{source: '
|
|
43
|
-
|
|
44
|
-
{source: '
|
|
45
|
-
{source: '
|
|
46
|
-
{source: '
|
|
47
|
-
{source: '
|
|
48
|
-
{source: '
|
|
49
|
-
{source: '
|
|
50
|
-
{source: '
|
|
51
|
-
{source: '
|
|
52
|
-
{source: '
|
|
53
|
-
{source: '
|
|
54
|
-
{source: '
|
|
55
|
-
{source: '
|
|
56
|
-
{source: '
|
|
57
|
-
{source: '
|
|
58
|
-
{source: '
|
|
59
|
-
{source: '
|
|
60
|
-
{source: '
|
|
61
|
-
{source: '
|
|
62
|
-
{source: '
|
|
63
|
-
{source: '
|
|
64
|
-
{source: 'Level 2', target: 'Manufacturing', value: 2},
|
|
65
|
-
{source: 'Level 2', target: 'Other', value: 2},
|
|
66
|
-
{source: 'Level 2', target: 'Transport & storage', value: 1},
|
|
67
|
-
{source: 'Level 2', target: 'Finance & insurance', value: 1},
|
|
68
|
-
{source: 'Level 1 and entry level', target: 'Wholesale & retail', value: 1},
|
|
69
|
-
{source: 'Level 1 and entry level', target: 'Health & social work', value: 2},
|
|
70
|
-
{source: 'Level 1 and entry level', target: 'Education', value: 1},
|
|
71
|
-
{source: 'Level 1 and entry level', target: 'Construction', value: 2},
|
|
72
|
-
{source: 'Level 1 and entry level', target: 'Manufacturing', value: 1},
|
|
73
|
-
{source: 'Level 1 and entry level', target: 'Other', value: 2},
|
|
74
|
-
{source: 'Level 1 and entry level', target: 'Transport & storage', value: 1},
|
|
75
|
-
{source: 'Level 1 and entry level', target: 'Finance & insurance', value: 1},
|
|
76
|
-
{source: 'No qualifications', target: 'Wholesale & retail', value: 1},
|
|
77
|
-
{source: 'No qualifications', target: 'Health & social work', value: 1},
|
|
78
|
-
{source: 'No qualifications', target: 'Education', value: 1},
|
|
79
|
-
{source: 'No qualifications', target: 'Construction', value: 1},
|
|
80
|
-
{source: 'No qualifications', target: 'Manufacturing', value: 1},
|
|
81
|
-
{source: 'No qualifications', target: 'Other', value: 1},
|
|
82
|
-
{source: 'No qualifications', target: 'Transport & storage', value: 1},
|
|
83
|
-
{source: 'No qualifications', target: 'Finance & insurance', value: 1},
|
|
84
|
-
// { source: 'Other', target: 'Wholesale & retail', value: 1 },
|
|
85
|
-
// { source: 'Other', target: 'Health & social work', value: 1 },
|
|
86
|
-
// { source: 'Other', target: 'Education', value: 1 },
|
|
87
|
-
// { source: 'Other', target: 'Construction', value: 1 },
|
|
88
|
-
// { source: 'Other', target: 'Manufacturing', value: 1 },
|
|
89
|
-
// // { source: 'Other', target: 'Other', value: 1 },
|
|
90
|
-
// { source: 'Other', target: 'Transport & storage', value: 1 },
|
|
91
|
-
// { source: 'Other', target: 'Finance & insurance', value: 1 }
|
|
129
|
+
{source: 'China', target: 'Electronics', value: 280},
|
|
130
|
+
{source: 'China', target: 'Textiles', value: 150},
|
|
131
|
+
{source: 'China', target: 'Machinery', value: 120},
|
|
132
|
+
{source: 'USA', target: 'Electronics', value: 180},
|
|
133
|
+
{source: 'USA', target: 'Chemicals', value: 140},
|
|
134
|
+
{source: 'USA', target: 'Machinery', value: 100},
|
|
135
|
+
{source: 'Germany', target: 'Automotive', value: 220},
|
|
136
|
+
{source: 'Germany', target: 'Machinery', value: 160},
|
|
137
|
+
{source: 'Germany', target: 'Chemicals', value: 90},
|
|
138
|
+
{source: 'Japan', target: 'Automotive', value: 170},
|
|
139
|
+
{source: 'Japan', target: 'Electronics', value: 140},
|
|
140
|
+
{source: 'South Korea', target: 'Electronics', value: 160},
|
|
141
|
+
{source: 'South Korea', target: 'Automotive', value: 80},
|
|
142
|
+
{source: 'Electronics', target: 'North America', value: 300},
|
|
143
|
+
{source: 'Electronics', target: 'Europe', value: 260},
|
|
144
|
+
{source: 'Electronics', target: 'Asia Pacific', value: 150},
|
|
145
|
+
{source: 'Electronics', target: 'Rest of World', value: 50},
|
|
146
|
+
{source: 'Automotive', target: 'North America', value: 200},
|
|
147
|
+
{source: 'Automotive', target: 'Europe', value: 180},
|
|
148
|
+
{source: 'Automotive', target: 'Asia Pacific', value: 60},
|
|
149
|
+
{source: 'Automotive', target: 'Rest of World', value: 30},
|
|
150
|
+
{source: 'Machinery', target: 'Europe', value: 160},
|
|
151
|
+
{source: 'Machinery', target: 'Asia Pacific', value: 120},
|
|
152
|
+
{source: 'Machinery', target: 'North America', value: 70},
|
|
153
|
+
{source: 'Machinery', target: 'Rest of World', value: 30},
|
|
154
|
+
{source: 'Textiles', target: 'Europe', value: 60},
|
|
155
|
+
{source: 'Textiles', target: 'North America', value: 50},
|
|
156
|
+
{source: 'Textiles', target: 'Rest of World', value: 40},
|
|
157
|
+
{source: 'Chemicals', target: 'Europe', value: 80},
|
|
158
|
+
{source: 'Chemicals', target: 'Asia Pacific', value: 90},
|
|
159
|
+
{source: 'Chemicals', target: 'North America', value: 40},
|
|
160
|
+
{source: 'Chemicals', target: 'Rest of World', value: 20},
|
|
92
161
|
],
|
|
93
162
|
};
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
163
|
+
|
|
164
|
+
let gradientFill = true;
|
|
165
|
+
let edgeOpacity = 0.4;
|
|
166
|
+
let edgeGap = 2;
|
|
167
|
+
|
|
168
|
+
function buildOptions() {
|
|
169
|
+
return {
|
|
170
|
+
nodeWidth: 18,
|
|
171
|
+
fontFamily: 'Inter, sans-serif',
|
|
172
|
+
fontWeight: '500',
|
|
173
|
+
fontSize: '12px',
|
|
174
|
+
fontColor: '#334155',
|
|
175
|
+
width: '100%',
|
|
176
|
+
height: 560,
|
|
177
|
+
edgeGradientFill: gradientFill,
|
|
178
|
+
edgeOpacity: edgeOpacity,
|
|
179
|
+
edgeGap: edgeGap,
|
|
180
|
+
enableToolbar: false,
|
|
181
|
+
canvasStyle: 'border: 1px solid #e2e8f0; border-radius: 8px; background: #fafafa; box-sizing: border-box;',
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
function render() {
|
|
186
|
+
const el = document.getElementById('svg-sankey');
|
|
187
|
+
el.innerHTML = '';
|
|
188
|
+
const s = new ApexSankey(el, buildOptions());
|
|
189
|
+
s.render(data);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
render();
|
|
193
|
+
|
|
194
|
+
// Gradient toggle
|
|
195
|
+
const toggleBtn = document.getElementById('toggle-gradient');
|
|
196
|
+
toggleBtn.addEventListener('click', () => {
|
|
197
|
+
gradientFill = !gradientFill;
|
|
198
|
+
toggleBtn.textContent = gradientFill ? 'Enabled' : 'Disabled';
|
|
199
|
+
toggleBtn.classList.toggle('off', !gradientFill);
|
|
200
|
+
toggleBtn.setAttribute('aria-pressed', String(gradientFill));
|
|
201
|
+
render();
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
// Opacity slider
|
|
205
|
+
const sliderOpacity = document.getElementById('slider-opacity');
|
|
206
|
+
const valOpacity = document.getElementById('val-opacity');
|
|
207
|
+
sliderOpacity.addEventListener('input', () => {
|
|
208
|
+
edgeOpacity = parseFloat(sliderOpacity.value);
|
|
209
|
+
valOpacity.textContent = edgeOpacity.toFixed(2);
|
|
210
|
+
render();
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
// Gap slider
|
|
214
|
+
const sliderGap = document.getElementById('slider-gap');
|
|
215
|
+
const valGap = document.getElementById('val-gap');
|
|
216
|
+
sliderGap.addEventListener('input', () => {
|
|
217
|
+
edgeGap = parseInt(sliderGap.value, 10);
|
|
218
|
+
valGap.textContent = edgeGap;
|
|
219
|
+
render();
|
|
220
|
+
});
|
|
104
221
|
</script>
|
|
105
222
|
</body>
|
|
106
223
|
</html>
|
|
@@ -3,108 +3,101 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
-
<title>
|
|
7
|
-
<link href="https://fonts.googleapis.com
|
|
6
|
+
<title>Node Customization - Recruitment Pipeline</title>
|
|
7
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
8
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
9
|
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap" rel="stylesheet" />
|
|
8
10
|
<script src="../apexsankey.min.js"></script>
|
|
11
|
+
<style>
|
|
12
|
+
body {
|
|
13
|
+
max-width: 1000px;
|
|
14
|
+
margin: 0 auto;
|
|
15
|
+
font-family: 'Inter', sans-serif;
|
|
16
|
+
background: #fff;
|
|
17
|
+
padding: 20px 0;
|
|
18
|
+
}
|
|
19
|
+
h2 {
|
|
20
|
+
font-size: 22px;
|
|
21
|
+
font-weight: 700;
|
|
22
|
+
color: #1a1a2e;
|
|
23
|
+
margin: 0 0 4px 0;
|
|
24
|
+
line-height: 1.3;
|
|
25
|
+
}
|
|
26
|
+
.subtitle {
|
|
27
|
+
font-size: 13px;
|
|
28
|
+
color: #6e6e6e;
|
|
29
|
+
margin-bottom: 16px;
|
|
30
|
+
}
|
|
31
|
+
</style>
|
|
9
32
|
</head>
|
|
10
33
|
<body>
|
|
11
|
-
<
|
|
34
|
+
<h2>Recruitment Pipeline</h2>
|
|
35
|
+
<p class="subtitle">
|
|
36
|
+
Wide nodes with visible borders to emphasize pipeline stages (<code>nodeWidth: 28</code>,
|
|
37
|
+
<code>nodeBorderWidth: 2</code>, <code>nodeBorderColor: '#1e293b'</code>)
|
|
38
|
+
</p>
|
|
39
|
+
<div id="svg-sankey"></div>
|
|
12
40
|
<script>
|
|
13
41
|
const data = {
|
|
14
42
|
nodes: [
|
|
15
|
-
|
|
16
|
-
{id: '
|
|
17
|
-
{id: '
|
|
18
|
-
{id: '
|
|
19
|
-
{id: '
|
|
20
|
-
|
|
21
|
-
{id: '
|
|
22
|
-
{id: '
|
|
23
|
-
|
|
24
|
-
{id: '
|
|
25
|
-
{id: '
|
|
26
|
-
{id: '
|
|
27
|
-
|
|
28
|
-
{id: '
|
|
29
|
-
{id: '
|
|
30
|
-
{id: '
|
|
31
|
-
{id: '
|
|
43
|
+
// Sources
|
|
44
|
+
{id: 'LinkedIn', title: 'LinkedIn', color: '#0A66C2'},
|
|
45
|
+
{id: 'Indeed', title: 'Indeed', color: '#2164F3'},
|
|
46
|
+
{id: 'Referral', title: 'Employee Referral', color: '#7C3AED'},
|
|
47
|
+
{id: 'Career Page', title: 'Career Page', color: '#0891B2'},
|
|
48
|
+
// Screening
|
|
49
|
+
{id: 'Applied', title: 'Applied', color: '#64748B'},
|
|
50
|
+
{id: 'Auto Rejected', title: 'Auto-Rejected', color: '#CBD5E1'},
|
|
51
|
+
// Stages
|
|
52
|
+
{id: 'Phone Screen', title: 'Phone Screen', color: '#F59E0B'},
|
|
53
|
+
{id: 'Technical', title: 'Technical Interview', color: '#F97316'},
|
|
54
|
+
{id: 'Culture Fit', title: 'Culture Fit', color: '#EF4444'},
|
|
55
|
+
// Outcomes
|
|
56
|
+
{id: 'Offer Made', title: 'Offer Made', color: '#10B981'},
|
|
57
|
+
{id: 'Rejected', title: 'Rejected', color: '#94A3B8'},
|
|
58
|
+
{id: 'Withdrew', title: 'Withdrew', color: '#D4D4D8'},
|
|
59
|
+
{id: 'Hired', title: 'Hired', color: '#059669'},
|
|
60
|
+
{id: 'Declined', title: 'Declined Offer', color: '#A3A3A3'},
|
|
32
61
|
],
|
|
33
62
|
edges: [
|
|
34
|
-
{source: '
|
|
35
|
-
{source: '
|
|
36
|
-
{source: '
|
|
37
|
-
{source: '
|
|
38
|
-
{source: '
|
|
39
|
-
{source: '
|
|
40
|
-
{source: '
|
|
41
|
-
{source: '
|
|
42
|
-
{source: '
|
|
43
|
-
{source: '
|
|
44
|
-
{source: '
|
|
45
|
-
{source: '
|
|
46
|
-
{source: '
|
|
47
|
-
{source: '
|
|
48
|
-
{source: '
|
|
49
|
-
{source: '
|
|
50
|
-
{source: '
|
|
51
|
-
{source: 'In Progress', target: 'Marketing', value: 2},
|
|
52
|
-
{source: 'In Progress', target: 'Sales', value: 1},
|
|
53
|
-
{source: 'In Progress', target: 'HR', value: 1},
|
|
54
|
-
{source: 'In Progress', target: 'Finance', value: 1},
|
|
55
|
-
{source: 'Software Engineering', target: 'Internship', value: 1},
|
|
56
|
-
{source: 'Software Engineering', target: 'Junior', value: 1},
|
|
57
|
-
{source: 'Software Engineering', target: 'Mid-level', value: 1},
|
|
58
|
-
{source: 'Software Engineering', target: 'Senior', value: 1},
|
|
59
|
-
{source: 'Software Engineering', target: 'Entry Level', value: 1},
|
|
60
|
-
{source: 'Data Science', target: 'Internship', value: 1},
|
|
61
|
-
{source: 'Data Science', target: 'Junior', value: 1},
|
|
62
|
-
{source: 'Data Science', target: 'Mid-level', value: 1},
|
|
63
|
-
{source: 'Data Science', target: 'Senior', value: 1},
|
|
64
|
-
{source: 'Data Science', target: 'Entry Level', value: 1},
|
|
65
|
-
{source: 'Marketing', target: 'Internship', value: 1},
|
|
66
|
-
{source: 'Marketing', target: 'Junior', value: 1},
|
|
67
|
-
{source: 'Marketing', target: 'Mid-level', value: 1},
|
|
68
|
-
{source: 'Marketing', target: 'Senior', value: 1},
|
|
69
|
-
{source: 'Marketing', target: 'Entry Level', value: 1},
|
|
70
|
-
{source: 'Sales', target: 'Internship', value: 1},
|
|
71
|
-
{source: 'Sales', target: 'Junior', value: 1},
|
|
72
|
-
{source: 'Sales', target: 'Mid-level', value: 1},
|
|
73
|
-
{source: 'Sales', target: 'Senior', value: 1},
|
|
74
|
-
{source: 'Sales', target: 'Entry Level', value: 1},
|
|
75
|
-
{source: 'HR', target: 'Internship', value: 1},
|
|
76
|
-
{source: 'HR', target: 'Junior', value: 1},
|
|
77
|
-
{source: 'HR', target: 'Mid-level', value: 1},
|
|
78
|
-
{source: 'HR', target: 'Senior', value: 1},
|
|
79
|
-
{source: 'HR', target: 'Entry Level', value: 1},
|
|
80
|
-
{source: 'Finance', target: 'Internship', value: 1},
|
|
81
|
-
{source: 'Finance', target: 'Junior', value: 1},
|
|
82
|
-
{source: 'Finance', target: 'Mid-level', value: 1},
|
|
83
|
-
{source: 'Finance', target: 'Senior', value: 1},
|
|
84
|
-
{source: 'Finance', target: 'Entry Level', value: 1},
|
|
85
|
-
{source: 'Internship', target: 'Full-time', value: 1},
|
|
86
|
-
{source: 'Internship', target: 'Part-time', value: 1},
|
|
87
|
-
{source: 'Junior', target: 'Full-time', value: 1},
|
|
88
|
-
{source: 'Junior', target: 'Part-time', value: 1},
|
|
89
|
-
{source: 'Mid-level', target: 'Full-time', value: 1},
|
|
90
|
-
{source: 'Mid-level', target: 'Part-time', value: 1},
|
|
91
|
-
{source: 'Senior', target: 'Full-time', value: 1},
|
|
92
|
-
{source: 'Senior', target: 'Part-time', value: 1},
|
|
93
|
-
{source: 'Entry Level', target: 'Full-time', value: 1},
|
|
94
|
-
{source: 'Entry Level', target: 'Part-time', value: 1},
|
|
63
|
+
{source: 'LinkedIn', target: 'Applied', value: 340},
|
|
64
|
+
{source: 'Indeed', target: 'Applied', value: 280},
|
|
65
|
+
{source: 'Referral', target: 'Applied', value: 120},
|
|
66
|
+
{source: 'Career Page', target: 'Applied', value: 160},
|
|
67
|
+
{source: 'Applied', target: 'Auto Rejected', value: 450},
|
|
68
|
+
{source: 'Applied', target: 'Phone Screen', value: 450},
|
|
69
|
+
{source: 'Phone Screen', target: 'Technical', value: 220},
|
|
70
|
+
{source: 'Phone Screen', target: 'Rejected', value: 180},
|
|
71
|
+
{source: 'Phone Screen', target: 'Withdrew', value: 50},
|
|
72
|
+
{source: 'Technical', target: 'Culture Fit', value: 110},
|
|
73
|
+
{source: 'Technical', target: 'Rejected', value: 90},
|
|
74
|
+
{source: 'Technical', target: 'Withdrew', value: 20},
|
|
75
|
+
{source: 'Culture Fit', target: 'Offer Made', value: 65},
|
|
76
|
+
{source: 'Culture Fit', target: 'Rejected', value: 35},
|
|
77
|
+
{source: 'Culture Fit', target: 'Withdrew', value: 10},
|
|
78
|
+
{source: 'Offer Made', target: 'Hired', value: 48},
|
|
79
|
+
{source: 'Offer Made', target: 'Declined', value: 17},
|
|
95
80
|
],
|
|
96
81
|
};
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
fontFamily: 'Quicksand, sans-serif',
|
|
101
|
-
fontWeight: '600',
|
|
102
|
-
nodeWidth: 5,
|
|
82
|
+
|
|
83
|
+
const options = {
|
|
84
|
+
nodeWidth: 28,
|
|
103
85
|
nodeBorderWidth: 2,
|
|
104
|
-
nodeBorderColor: '#
|
|
105
|
-
|
|
86
|
+
nodeBorderColor: '#1e293b',
|
|
87
|
+
fontFamily: 'Inter, sans-serif',
|
|
88
|
+
fontWeight: '600',
|
|
89
|
+
fontSize: '12px',
|
|
90
|
+
fontColor: '#1e293b',
|
|
91
|
+
width: '100%',
|
|
92
|
+
height: 560,
|
|
93
|
+
edgeGradientFill: true,
|
|
94
|
+
edgeOpacity: 0.25,
|
|
95
|
+
spacing: 30,
|
|
96
|
+
enableToolbar: true,
|
|
97
|
+
canvasStyle: 'border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; box-sizing: border-box;',
|
|
106
98
|
};
|
|
107
|
-
|
|
99
|
+
|
|
100
|
+
const s = new ApexSankey(document.getElementById('svg-sankey'), options);
|
|
108
101
|
s.render(data);
|
|
109
102
|
</script>
|
|
110
103
|
</body>
|