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.
@@ -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>Document</title>
7
- <link href="https://fonts.googleapis.com/css2?family=Quicksand:wght@400;600&display=swap" rel="stylesheet" />
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
- <div id="svg-sankey" style="margin: 0 auto"></div>
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: 'England', title: 'england'},
16
- {id: 'Wales', title: 'wales'},
17
- {id: 'Level 4', title: 'level 4'},
18
- {id: 'Level 3', title: 'level 3'},
19
- {id: 'Level 2', title: 'level 2'},
20
- {id: 'Level 1 and entry level', title: 'level 1 and entry level'},
21
- {id: 'No qualifications', title: 'no qualifications'},
22
- {id: 'Other', title: 'other'},
23
- {id: 'Wholesale & retail', title: 'wholesale & retail'},
24
- {id: 'Health & social work', title: 'health & social work'},
25
- {id: 'Education', title: 'education'},
26
- {id: 'Construction', title: 'construction'},
27
- {id: 'Manufacturing', title: 'manufacturing'},
28
- {id: 'Transport & storage', title: 'transport & storage'},
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: 'England', target: 'Level 4', value: 13},
33
- {source: 'England', target: 'Level 3', value: 8},
34
- {source: 'England', target: 'Level 2', value: 8},
35
- {source: 'England', target: 'Level 1 and entry level', value: 6},
36
- {source: 'England', target: 'No qualifications', value: 3},
37
- // { source: 'England', target: 'Other', value: 4 },
38
- {source: 'Wales', target: 'Level 4', value: 7},
39
- {source: 'Wales', target: 'Level 3', value: 8},
40
- {source: 'Wales', target: 'Level 2', value: 4},
41
- {source: 'Wales', target: 'Level 1 and entry level', value: 5},
42
- {source: 'Wales', target: 'No qualifications', value: 5},
43
- // { source: 'Wales', target: 'Other', value: 3 },
44
- {source: 'Level 4', target: 'Wholesale & retail', value: 4},
45
- {source: 'Level 4', target: 'Health & social work', value: 3},
46
- {source: 'Level 4', target: 'Education', value: 2},
47
- {source: 'Level 4', target: 'Construction', value: 1},
48
- {source: 'Level 4', target: 'Manufacturing', value: 2},
49
- {source: 'Level 4', target: 'Other', value: 3},
50
- {source: 'Level 4', target: 'Transport & storage', value: 2},
51
- {source: 'Level 4', target: 'Finance & insurance', value: 3},
52
- {source: 'Level 3', target: 'Wholesale & retail', value: 3},
53
- {source: 'Level 3', target: 'Health & social work', value: 2},
54
- {source: 'Level 3', target: 'Education', value: 1},
55
- {source: 'Level 3', target: 'Construction', value: 2},
56
- {source: 'Level 3', target: 'Manufacturing', value: 1},
57
- {source: 'Level 3', target: 'Other', value: 3},
58
- {source: 'Level 3', target: 'Transport & storage', value: 2},
59
- {source: 'Level 3', target: 'Finance & insurance', value: 2},
60
- {source: 'Level 2', target: 'Wholesale & retail', value: 2},
61
- {source: 'Level 2', target: 'Health & social work', value: 1},
62
- {source: 'Level 2', target: 'Education', value: 2},
63
- {source: 'Level 2', target: 'Construction', value: 1},
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
- const graphOptions = {
95
- nodeWidth: 20,
96
- fontFamily: 'Quicksand, sans-serif',
97
- fontWeight: '600',
98
- edgeOpacity: 0.2,
99
- width: 800,
100
- height: 600,
101
- };
102
- const s = new ApexSankey(document.getElementById('svg-sankey'), graphOptions);
103
- s.render(data);
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>Document</title>
7
- <link href="https://fonts.googleapis.com/css2?family=Quicksand:wght@400;600&display=swap" rel="stylesheet" />
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
- <div id="svg-sankey" style="margin: 0 auto"></div>
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
- {id: 'Applications', title: 'Applications'},
16
- {id: 'Accepted', title: 'Accepted'},
17
- {id: 'Rejected', title: 'Rejected'},
18
- {id: 'In Progress', title: 'In Progress'},
19
- {id: 'Software Engineering', title: 'Software Engineering'},
20
- {id: 'Data Science', title: 'Data Science'},
21
- {id: 'Marketing', title: 'Marketing'},
22
- {id: 'Sales', title: 'Sales'},
23
- {id: 'HR', title: 'HR'},
24
- {id: 'Finance', title: 'Finance'},
25
- {id: 'Internship', title: 'Internship'},
26
- {id: 'Junior', title: 'Junior'},
27
- {id: 'Mid-level', title: 'Mid-level'},
28
- {id: 'Senior', title: 'Senior'},
29
- {id: 'Entry Level', title: 'Entry Level'},
30
- {id: 'Full-time', title: 'Full-time'},
31
- {id: 'Part-time', title: 'Part-time'},
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: 'Applications', target: 'Accepted', value: 10},
35
- {source: 'Applications', target: 'Rejected', value: 15},
36
- {source: 'Applications', target: 'In Progress', value: 10},
37
- {source: 'Accepted', target: 'Software Engineering', value: 4},
38
- {source: 'Accepted', target: 'Data Science', value: 2},
39
- {source: 'Accepted', target: 'Marketing', value: 1},
40
- {source: 'Accepted', target: 'Sales', value: 1},
41
- {source: 'Accepted', target: 'HR', value: 1},
42
- {source: 'Accepted', target: 'Finance', value: 1},
43
- {source: 'Rejected', target: 'Software Engineering', value: 5},
44
- {source: 'Rejected', target: 'Data Science', value: 3},
45
- {source: 'Rejected', target: 'Marketing', value: 2},
46
- {source: 'Rejected', target: 'Sales', value: 2},
47
- {source: 'Rejected', target: 'HR', value: 2},
48
- {source: 'Rejected', target: 'Finance', value: 1},
49
- {source: 'In Progress', target: 'Software Engineering', value: 3},
50
- {source: 'In Progress', target: 'Data Science', value: 2},
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
- const graphOptions = {
98
- width: 800,
99
- height: 700,
100
- fontFamily: 'Quicksand, sans-serif',
101
- fontWeight: '600',
102
- nodeWidth: 5,
82
+
83
+ const options = {
84
+ nodeWidth: 28,
103
85
  nodeBorderWidth: 2,
104
- nodeBorderColor: '#111',
105
- edgeGradientFill: false,
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
- const s = new ApexSankey(document.getElementById('svg-sankey'), graphOptions);
99
+
100
+ const s = new ApexSankey(document.getElementById('svg-sankey'), options);
108
101
  s.render(data);
109
102
  </script>
110
103
  </body>