@dpuse/dpuse-tool-highcharts-visualiser 0.0.82 → 0.0.84
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/README.md +34 -30
- package/dist/{AnimationUtilities-CJw-tdb_.js → AnimationUtilities-eb22eIjK.js} +84 -84
- package/dist/AnimationUtilities-eb22eIjK.js.map +1 -0
- package/dist/{BorderRadius-CqHYi9va.js → BorderRadius-Cois3N8q.js} +2 -2
- package/dist/{BorderRadius-CqHYi9va.js.map → BorderRadius-Cois3N8q.js.map} +1 -1
- package/dist/{CenteredUtilities-BTUT7_Ld.js → CenteredUtilities-WO6ukK5m.js} +305 -309
- package/dist/CenteredUtilities-WO6ukK5m.js.map +1 -0
- package/dist/{SVGElement-uTuGcjav.js → SVGElement-z7ENyQ6Y.js} +73 -73
- package/dist/SVGElement-z7ENyQ6Y.js.map +1 -0
- package/dist/{SeriesRegistry-CXsAINSj.js → SeriesRegistry-CDI1sm9L.js} +127 -126
- package/dist/SeriesRegistry-CDI1sm9L.js.map +1 -0
- package/dist/{TextPath-Coabnrz0.js → TextPath-CiV8mQgF.js} +1 -1
- package/dist/{TextPath-Coabnrz0.js.map → TextPath-CiV8mQgF.js.map} +1 -1
- package/dist/{dependency-wheel.src-ByNiAiZS.js → dependency-wheel.src-m4DwYrP7.js} +5 -5
- package/dist/{dependency-wheel.src-ByNiAiZS.js.map → dependency-wheel.src-m4DwYrP7.js.map} +1 -1
- package/dist/dpuse-tool-highcharts-visualiser.es.js +1423 -1413
- package/dist/dpuse-tool-highcharts-visualiser.es.js.map +1 -1
- package/dist/{highchartsMoreCustom-Cm6MkFMu.js → highchartsMoreCustom-C7_1r-Ql.js} +328 -300
- package/dist/highchartsMoreCustom-C7_1r-Ql.js.map +1 -0
- package/dist/{pattern-fill.src-CGZp553r.js → pattern-fill.src-kXG__4iS.js} +43 -43
- package/dist/pattern-fill.src-kXG__4iS.js.map +1 -0
- package/dist/sankey.src-B-54oc-3.js +522 -0
- package/dist/sankey.src-B-54oc-3.js.map +1 -0
- package/dist/{streamgraph.src-DjMW1U2g.js → streamgraph.src-DLpEiTz6.js} +2 -2
- package/dist/streamgraph.src-DLpEiTz6.js.map +1 -0
- package/dist/types/eslint.config.d.ts +1 -1
- package/package.json +28 -17
- package/dist/AnimationUtilities-CJw-tdb_.js.map +0 -1
- package/dist/CenteredUtilities-BTUT7_Ld.js.map +0 -1
- package/dist/SVGElement-uTuGcjav.js.map +0 -1
- package/dist/SeriesRegistry-CXsAINSj.js.map +0 -1
- package/dist/highchartsMoreCustom-Cm6MkFMu.js.map +0 -1
- package/dist/pattern-fill.src-CGZp553r.js.map +0 -1
- package/dist/sankey.src-Buj1zAlU.js +0 -522
- package/dist/sankey.src-Buj1zAlU.js.map +0 -1
- package/dist/streamgraph.src-DjMW1U2g.js.map +0 -1
|
@@ -0,0 +1,522 @@
|
|
|
1
|
+
import { K as e, S as t, U as n, W as r, et as i, h as a, it as o, j as s, k as c, lt as l, s as u, w as d, y as f, z as p } from "./AnimationUtilities-eb22eIjK.js";
|
|
2
|
+
import { n as m, t as h } from "./SeriesRegistry-CDI1sm9L.js";
|
|
3
|
+
import { t as g } from "./SVGElement-z7ENyQ6Y.js";
|
|
4
|
+
import { n as _, t as v } from "./TextPath-CiV8mQgF.js";
|
|
5
|
+
//#region node_modules/highcharts/es-modules/Series/NodesComposition.js
|
|
6
|
+
var { series: { prototype: y, prototype: { pointClass: { prototype: b } } } } = h, x;
|
|
7
|
+
(function(t) {
|
|
8
|
+
function n(e, t) {
|
|
9
|
+
let n = e.prototype, i = t.prototype;
|
|
10
|
+
return n.setNodeState = f, n.setState = f, n.update = p, i.destroy = o, i.setData = u, a(t, "afterUpdate", r), t;
|
|
11
|
+
}
|
|
12
|
+
t.compose = n;
|
|
13
|
+
function r() {
|
|
14
|
+
if (!this.hasDataLabels?.() && this.nodes) for (let e of this.nodes) e.destroyElements({ dataLabel: 1 });
|
|
15
|
+
}
|
|
16
|
+
function i(e) {
|
|
17
|
+
let t = this.pointClass, n = (e, t) => s(e, (e) => e.id === t), r = n(this.nodes, e), i;
|
|
18
|
+
if (!r) {
|
|
19
|
+
i = this.options.nodes && n(this.options.nodes, e);
|
|
20
|
+
let a = new t(this, c({
|
|
21
|
+
className: "highcharts-node",
|
|
22
|
+
isNode: !0,
|
|
23
|
+
id: e,
|
|
24
|
+
y: 1
|
|
25
|
+
}, i));
|
|
26
|
+
a.linksTo = [], a.linksFrom = [], a.getSum = function() {
|
|
27
|
+
let e = 0, t = 0;
|
|
28
|
+
return a.linksTo.forEach((t) => {
|
|
29
|
+
e += t.weight || 0;
|
|
30
|
+
}), a.linksFrom.forEach((e) => {
|
|
31
|
+
t += e.weight || 0;
|
|
32
|
+
}), Math.max(e, t);
|
|
33
|
+
}, a.offset = function(e, t) {
|
|
34
|
+
let n = 0;
|
|
35
|
+
for (let r = 0; r < a[t].length; r++) {
|
|
36
|
+
if (a[t][r] === e) return n;
|
|
37
|
+
n += a[t][r].weight;
|
|
38
|
+
}
|
|
39
|
+
}, a.hasShape = function() {
|
|
40
|
+
let e = 0;
|
|
41
|
+
return a.linksTo.forEach((t) => {
|
|
42
|
+
t.outgoing && e++;
|
|
43
|
+
}), !a.linksTo.length || e !== a.linksTo.length;
|
|
44
|
+
}, a.index = this.nodes.push(a) - 1, r = a;
|
|
45
|
+
}
|
|
46
|
+
return r.formatPrefix = "node", r.name = r.name || r.options.id || "", r.mass = r.options.mass ?? (r.options.marker && r.options.marker.radius) ?? (this.options.marker && this.options.marker.radius) ?? 4, r;
|
|
47
|
+
}
|
|
48
|
+
t.createNode = i;
|
|
49
|
+
function o() {
|
|
50
|
+
return this.data = [].concat(this.points || [], this.nodes), y.destroy.apply(this, arguments);
|
|
51
|
+
}
|
|
52
|
+
t.destroy = o;
|
|
53
|
+
function l() {
|
|
54
|
+
let e = this.chart, t = {};
|
|
55
|
+
y.generatePoints.call(this), this.nodes ||= [], this.colorCounter = 0, this.nodes.forEach((e) => {
|
|
56
|
+
e.linksFrom.length = 0, e.linksTo.length = 0, e.level = e.options.level;
|
|
57
|
+
}), this.points.forEach((n) => {
|
|
58
|
+
d(n.from) && (t[n.from] || (t[n.from] = this.createNode(n.from)), t[n.from].linksFrom.push(n), n.fromNode = t[n.from], e.styledMode ? n.colorIndex = n.options.colorIndex ?? t[n.from].colorIndex : n.color = n.options.color || t[n.from].color), d(n.to) && (t[n.to] || (t[n.to] = this.createNode(n.to)), t[n.to].linksTo.push(n), n.toNode = t[n.to]), n.name = n.name || n.id;
|
|
59
|
+
}, this), this.nodeLookup = t;
|
|
60
|
+
}
|
|
61
|
+
t.generatePoints = l;
|
|
62
|
+
function u() {
|
|
63
|
+
this.nodes && (this.nodes.forEach((e) => {
|
|
64
|
+
e.destroy();
|
|
65
|
+
}), this.nodes.length = 0), y.setData.apply(this, arguments);
|
|
66
|
+
}
|
|
67
|
+
function f(e) {
|
|
68
|
+
let t = arguments, n = this.isNode ? this.linksTo.concat(this.linksFrom) : [this.fromNode, this.toNode];
|
|
69
|
+
e !== "select" && n.forEach((e) => {
|
|
70
|
+
e && e.series && (b.setState.apply(e, t), e.isNode || (e.fromNode.graphic && b.setState.apply(e.fromNode, t), e.toNode && e.toNode.graphic && b.setState.apply(e.toNode, t)));
|
|
71
|
+
}), b.setState.apply(this, t);
|
|
72
|
+
}
|
|
73
|
+
t.setNodeState = f;
|
|
74
|
+
function p(t, n, r, i) {
|
|
75
|
+
let a = this.series.options.nodes, o = this.series.options.data, s = o?.length || 0, c = o?.[this.index];
|
|
76
|
+
if (b.update.call(this, t, !this.isNode && n, r, i), this.isNode) {
|
|
77
|
+
let t = (a || []).reduce((e, t, n) => this.id === t.id ? n : e, -1), i = e(a && a[t] || {}, o?.[this.index] || {});
|
|
78
|
+
o && (c ? o[this.index] = c : o.length = s), a ? t >= 0 ? a[t] = i : a.push(i) : this.series.options.nodes = [i], (n ?? !0) && this.series.chart.redraw(r);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
t.updateNode = p;
|
|
82
|
+
})(x ||= {});
|
|
83
|
+
var S = x, { column: C } = h.seriesTypes, w = class extends C.prototype.pointClass {
|
|
84
|
+
applyOptions(e, t) {
|
|
85
|
+
return m.prototype.applyOptions.call(this, e, t), d(this.options.level) && (this.options.column = this.column = this.options.level), this;
|
|
86
|
+
}
|
|
87
|
+
getClassName() {
|
|
88
|
+
return (this.isNode ? "highcharts-node " : "highcharts-link ") + m.prototype.getClassName.call(this);
|
|
89
|
+
}
|
|
90
|
+
getFromNode() {
|
|
91
|
+
let e = this, t = -1, n;
|
|
92
|
+
for (let r = 0; r < e.linksTo.length; r++) {
|
|
93
|
+
let i = e.linksTo[r];
|
|
94
|
+
i.fromNode.column > t && i.fromNode !== e && (n = i.fromNode, t = n.column);
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
fromNode: n,
|
|
98
|
+
fromColumn: t
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
setNodeColumn() {
|
|
102
|
+
let e = this;
|
|
103
|
+
d(e.options.column) || (e.column = e.linksTo.length === 0 ? 0 : e.getFromNode().fromColumn + 1);
|
|
104
|
+
}
|
|
105
|
+
isValid() {
|
|
106
|
+
return this.isNode || typeof this.weight == "number";
|
|
107
|
+
}
|
|
108
|
+
}, T = {
|
|
109
|
+
borderWidth: 0,
|
|
110
|
+
colorByPoint: !0,
|
|
111
|
+
curveFactor: .33,
|
|
112
|
+
dataLabels: {
|
|
113
|
+
enabled: !0,
|
|
114
|
+
backgroundColor: "none",
|
|
115
|
+
crop: !1,
|
|
116
|
+
nodeFormat: void 0,
|
|
117
|
+
nodeFormatter: function() {
|
|
118
|
+
return this.point.name;
|
|
119
|
+
},
|
|
120
|
+
format: void 0,
|
|
121
|
+
formatter: function() {},
|
|
122
|
+
inside: !0
|
|
123
|
+
},
|
|
124
|
+
inactiveOtherPoints: !0,
|
|
125
|
+
linkColorMode: "from",
|
|
126
|
+
linkOpacity: .5,
|
|
127
|
+
opacity: 1,
|
|
128
|
+
minLinkWidth: 0,
|
|
129
|
+
nodeAlignment: "center",
|
|
130
|
+
nodeWidth: 20,
|
|
131
|
+
nodePadding: 10,
|
|
132
|
+
nodeDistance: 30,
|
|
133
|
+
showInLegend: !1,
|
|
134
|
+
states: {
|
|
135
|
+
hover: {
|
|
136
|
+
linkOpacity: 1,
|
|
137
|
+
opacity: 1
|
|
138
|
+
},
|
|
139
|
+
inactive: {
|
|
140
|
+
linkOpacity: .1,
|
|
141
|
+
opacity: .1,
|
|
142
|
+
animation: { duration: 50 }
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
tooltip: {
|
|
146
|
+
followPointer: !0,
|
|
147
|
+
headerFormat: "<span style=\"font-size: 0.8em\">{series.name}</span><br/>",
|
|
148
|
+
pointFormat: "{point.fromNode.name} → {point.toNode.name}: <b>{point.weight}</b><br/>",
|
|
149
|
+
nodeFormat: "{point.name}: <b>{point.sum}</b><br/>"
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
//#endregion
|
|
153
|
+
//#region node_modules/highcharts/es-modules/Series/TreeUtilities.js
|
|
154
|
+
function E(e, t) {
|
|
155
|
+
let n = t.index, r = t.mapOptionsToLevel, i = t.parentColor, a = t.parentColorIndex, o = t.series, s = t.colors, c = t.siblings, l = o.points, d = o.chart.options.chart, f, p, m, h, g, _, v;
|
|
156
|
+
return e && (p = l[e.i], m = r[e.level] || {}, f = p && m.colorByPoint, f && (g = p.index % (s ? s.length : d.colorCount), h = s && s[g]), o.chart.styledMode || (_ = (p && p.options.color) ?? (m && m.color) ?? h ?? (i && ((e) => {
|
|
157
|
+
let t = m && m.colorVariation;
|
|
158
|
+
return t && t.key === "brightness" && n && c ? u.parse(e).brighten(t.to * (n / c)).get() : e;
|
|
159
|
+
})(i)) ?? o.color), v = (p && p.options.colorIndex) ?? (m && m.colorIndex) ?? g ?? a ?? t.colorIndex), {
|
|
160
|
+
color: _,
|
|
161
|
+
colorIndex: v
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
function D(t) {
|
|
165
|
+
let i = {}, a, o, s, c, l, u;
|
|
166
|
+
if (r(t)) for (c = n(t.from) ? t.from : 1, u = t.levels, o = {}, a = r(t.defaults) ? t.defaults : {}, p(u) && (o = u.reduce((t, i) => {
|
|
167
|
+
let o, s, l;
|
|
168
|
+
return r(i) && n(i.level) && (l = e({}, i), s = l.levelIsConstant ?? a.levelIsConstant, delete l.levelIsConstant, delete l.level, o = i.level + (s ? 0 : c - 1), r(t[o]) ? e(!0, t[o], l) : t[o] = l), t;
|
|
169
|
+
}, {})), l = n(t.to) ? t.to : 1, s = 0; s <= l; s++) i[s] = e({}, a, r(o[s]) ? o[s] : {});
|
|
170
|
+
return i;
|
|
171
|
+
}
|
|
172
|
+
function O(e, t) {
|
|
173
|
+
let n = t.before, r = t.idRoot, i = t.mapIdToNode[r], a = t.levelIsConstant !== !1, o = t.points[e.i], s = o && o.options || {}, l = [], u = 0;
|
|
174
|
+
e.levelDynamic = e.level - (a ? 0 : i.level), e.name = (o && o.name) ?? "", e.visible = r === e.id || t.visible === !0, typeof n == "function" && (e = n(e, t)), e.children.forEach((n, r) => {
|
|
175
|
+
let i = c({}, t);
|
|
176
|
+
c(i, {
|
|
177
|
+
index: r,
|
|
178
|
+
siblings: e.children.length,
|
|
179
|
+
visible: e.visible
|
|
180
|
+
}), n = O(n, i), l.push(n), n.visible && (u += n.val);
|
|
181
|
+
});
|
|
182
|
+
let d = s.value ?? u;
|
|
183
|
+
return e.visible = d >= 0 && (u > 0 || e.visible), e.children = l, e.childrenTotal = u, e.isLeaf = e.visible && !u, e.val = d, e;
|
|
184
|
+
}
|
|
185
|
+
function k(e) {
|
|
186
|
+
let t, n;
|
|
187
|
+
return r(e) && (n = r(e.options) ? e.options : {}, t = e.rootNode ?? n.rootId ?? "", r(e.userOptions) && (e.userOptions.rootId = t), e.rootNode = t), t;
|
|
188
|
+
}
|
|
189
|
+
function A(e, t) {
|
|
190
|
+
let { chart: n, options: r } = e, { nodeDistance: a = 0, nodeWidth: o = 0 } = r, { plotSizeX: s = 1 } = n;
|
|
191
|
+
if (o === "auto") {
|
|
192
|
+
if (typeof a == "string" && /%$/.test(a)) return s / (t + parseFloat(a) / 100 * (t - 1));
|
|
193
|
+
let e = Number(a);
|
|
194
|
+
return (s + e) / (t || 1) - e;
|
|
195
|
+
}
|
|
196
|
+
return i(o, s);
|
|
197
|
+
}
|
|
198
|
+
var j = {
|
|
199
|
+
getColor: E,
|
|
200
|
+
getLevelOptions: D,
|
|
201
|
+
getNodeWidth: A,
|
|
202
|
+
setTreeValues: O,
|
|
203
|
+
updateRootId: k
|
|
204
|
+
}, { column: M, line: N } = h.seriesTypes, { parse: P } = u, { getLevelOptions: F, getNodeWidth: I } = j;
|
|
205
|
+
v(g);
|
|
206
|
+
var L = class n extends M {
|
|
207
|
+
static getDLOptions(t) {
|
|
208
|
+
let n = r(t.optionsPoint) ? t.optionsPoint.dataLabels : {}, i = r(t.level) ? t.level.dataLabels : {};
|
|
209
|
+
return e({ style: {} }, i, n, { zIndex: i?.zIndex });
|
|
210
|
+
}
|
|
211
|
+
createNodeColumns() {
|
|
212
|
+
let e = [];
|
|
213
|
+
for (let t of this.nodes) t.setNodeColumn(), e[t.column] || (e[t.column] = _.compose([], this)), e[t.column].push(t);
|
|
214
|
+
for (let t = 0; t < e.length; t++) e[t] === void 0 && (e[t] = _.compose([], this));
|
|
215
|
+
return e;
|
|
216
|
+
}
|
|
217
|
+
order(e, t, n) {
|
|
218
|
+
let r = this;
|
|
219
|
+
if (n ||= /* @__PURE__ */ new Set(), e.level === void 0 || e.level < t) {
|
|
220
|
+
e.level = t, n.add(e);
|
|
221
|
+
for (let i of e.linksFrom) i.toNode && !n.has(i.toNode) && r.order(i.toNode, t + 1, n);
|
|
222
|
+
n.delete(e);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
generatePoints() {
|
|
226
|
+
if (S.generatePoints.apply(this, arguments), this.orderNodes) {
|
|
227
|
+
for (let e of this.nodes) e.linksTo.length === 0 && this.order(e, 0);
|
|
228
|
+
o(this.nodes, (e, t) => e.level - t.level);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
getNodePadding() {
|
|
232
|
+
let e = this.options.nodePadding || 0;
|
|
233
|
+
if (this.nodeColumns) {
|
|
234
|
+
let t = this.nodeColumns.reduce((e, t) => Math.max(e, t.length), 0);
|
|
235
|
+
t * e > this.chart.plotSizeY && (e = this.chart.plotSizeY / t);
|
|
236
|
+
}
|
|
237
|
+
return e;
|
|
238
|
+
}
|
|
239
|
+
hasData() {
|
|
240
|
+
return !!this.dataTable.rowCount;
|
|
241
|
+
}
|
|
242
|
+
pointAttribs(e, t) {
|
|
243
|
+
if (!e) return {};
|
|
244
|
+
let n = this, r = e.isNode ? e.level : e.fromNode.level, i = n.mapOptionsToLevel[r || 0] || {}, a = e.options, o = i.states && i.states[t || ""] || {}, s = [
|
|
245
|
+
"colorByPoint",
|
|
246
|
+
"borderColor",
|
|
247
|
+
"borderWidth",
|
|
248
|
+
"linkOpacity",
|
|
249
|
+
"opacity"
|
|
250
|
+
].reduce((e, t) => (e[t] = o[t] ?? a[t] ?? i[t] ?? n.options[t], e), {}), c = o.color ?? a.color ?? (s.colorByPoint ? e.color : i.color);
|
|
251
|
+
return e.isNode ? {
|
|
252
|
+
fill: c,
|
|
253
|
+
stroke: s.borderColor,
|
|
254
|
+
"stroke-width": s.borderWidth,
|
|
255
|
+
opacity: s.opacity
|
|
256
|
+
} : {
|
|
257
|
+
fill: c,
|
|
258
|
+
"fill-opacity": s.linkOpacity
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
drawTracker() {
|
|
262
|
+
M.prototype.drawTracker.call(this, this.points), M.prototype.drawTracker.call(this, this.nodes);
|
|
263
|
+
}
|
|
264
|
+
drawPoints() {
|
|
265
|
+
M.prototype.drawPoints.call(this, this.points), M.prototype.drawPoints.call(this, this.nodes);
|
|
266
|
+
}
|
|
267
|
+
drawDataLabels() {
|
|
268
|
+
M.prototype.drawDataLabels.call(this, this.points), M.prototype.drawDataLabels.call(this, this.nodes);
|
|
269
|
+
}
|
|
270
|
+
translate() {
|
|
271
|
+
this.generatePoints(), this.nodeColumns = this.createNodeColumns();
|
|
272
|
+
let e = this, t = this.chart, n = this.options, r = this.nodeColumns, i = r.length;
|
|
273
|
+
this.nodeWidth = I(this, i), this.nodePadding = this.getNodePadding(), this.translationFactor = r.reduce((t, n) => Math.min(t, n.sankeyColumn.getTranslationFactor(e)), Infinity), this.colDistance = (t.plotSizeX - this.nodeWidth - n.borderWidth) / Math.max(1, r.length - 1), e.mapOptionsToLevel = F({
|
|
274
|
+
from: 1,
|
|
275
|
+
levels: n.levels,
|
|
276
|
+
to: r.length - 1,
|
|
277
|
+
defaults: {
|
|
278
|
+
borderColor: n.borderColor,
|
|
279
|
+
borderRadius: n.borderRadius,
|
|
280
|
+
borderWidth: n.borderWidth,
|
|
281
|
+
color: e.color,
|
|
282
|
+
colorByPoint: n.colorByPoint,
|
|
283
|
+
levelIsConstant: !0,
|
|
284
|
+
linkColor: n.linkColor,
|
|
285
|
+
linkLineWidth: n.linkLineWidth,
|
|
286
|
+
linkOpacity: n.linkOpacity,
|
|
287
|
+
states: n.states
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
for (let t of r) for (let n of t) e.translateNode(n, t);
|
|
291
|
+
for (let t of this.nodes) for (let n of t.linksFrom) (n.weight || n.isNull) && n.to && (e.translateLink(n), n.allowShadow = !1);
|
|
292
|
+
}
|
|
293
|
+
getY(e, t, n, r) {
|
|
294
|
+
let i = (t.offset(e, n) || 0) * this.translationFactor;
|
|
295
|
+
return Math.min(t.nodeY + i, t.nodeY + (t.shapeArgs && t.shapeArgs.height || 0) - r);
|
|
296
|
+
}
|
|
297
|
+
translateLink(e, t) {
|
|
298
|
+
let n = e.fromNode, r = e.toNode, i = this.chart, { inverted: a } = i, o = this.translationFactor, s = this.options, c = e.linkColorMode ?? s.linkColorMode, l = (i.inverted ? -this.colDistance : this.colDistance) * s.curveFactor, u = n.nodeX, d = r.nodeX, f = e.outgoing, p = Math.max((e.weight || 0) * o, this.options.minLinkWidth || 0), m = this.getY(e, n, "linksFrom", p), h = t || this.getY(e, r, "linksTo", p), g = this.nodeWidth, _ = d > u + g;
|
|
299
|
+
if (i.inverted && (m = i.plotSizeY - m, h = (i.plotSizeY || 0) - h, g = -g, p = -p, _ = u > d), e.shapeType = "path", e.linkBase = [
|
|
300
|
+
m,
|
|
301
|
+
m + p,
|
|
302
|
+
h,
|
|
303
|
+
h + p
|
|
304
|
+
], _ && typeof h == "number") e.shapeArgs = { d: [
|
|
305
|
+
[
|
|
306
|
+
"M",
|
|
307
|
+
u + g,
|
|
308
|
+
m
|
|
309
|
+
],
|
|
310
|
+
[
|
|
311
|
+
"C",
|
|
312
|
+
u + g + l,
|
|
313
|
+
m,
|
|
314
|
+
d - l,
|
|
315
|
+
h,
|
|
316
|
+
d,
|
|
317
|
+
h
|
|
318
|
+
],
|
|
319
|
+
[
|
|
320
|
+
"L",
|
|
321
|
+
d + (f ? g : 0),
|
|
322
|
+
h + p / 2
|
|
323
|
+
],
|
|
324
|
+
[
|
|
325
|
+
"L",
|
|
326
|
+
d,
|
|
327
|
+
h + p
|
|
328
|
+
],
|
|
329
|
+
[
|
|
330
|
+
"C",
|
|
331
|
+
d - l,
|
|
332
|
+
h + p,
|
|
333
|
+
u + g + l,
|
|
334
|
+
m + p,
|
|
335
|
+
u + g,
|
|
336
|
+
m + p
|
|
337
|
+
],
|
|
338
|
+
["Z"]
|
|
339
|
+
] };
|
|
340
|
+
else if (typeof h == "number") {
|
|
341
|
+
let t = i.plotHeight - m - p, n = d - 20 - p, r = d - 20, a = d, o = u + g, s = o + 20, c = s + p, l = m, f = m + p, _ = f + 20, v = _ + t, y = v + 20, b = y + p, x = h, S = x + p, C = S + 20, w = f - p * .7, T = y + p * .7, E = S - p * .7, D = a - p * .7, O = o + p * .7;
|
|
342
|
+
e.shapeArgs = { d: [
|
|
343
|
+
[
|
|
344
|
+
"M",
|
|
345
|
+
o,
|
|
346
|
+
l
|
|
347
|
+
],
|
|
348
|
+
[
|
|
349
|
+
"C",
|
|
350
|
+
O,
|
|
351
|
+
l,
|
|
352
|
+
c,
|
|
353
|
+
w,
|
|
354
|
+
c,
|
|
355
|
+
_
|
|
356
|
+
],
|
|
357
|
+
[
|
|
358
|
+
"L",
|
|
359
|
+
c,
|
|
360
|
+
v
|
|
361
|
+
],
|
|
362
|
+
[
|
|
363
|
+
"C",
|
|
364
|
+
c,
|
|
365
|
+
T,
|
|
366
|
+
O,
|
|
367
|
+
b,
|
|
368
|
+
o,
|
|
369
|
+
b
|
|
370
|
+
],
|
|
371
|
+
[
|
|
372
|
+
"L",
|
|
373
|
+
a,
|
|
374
|
+
b
|
|
375
|
+
],
|
|
376
|
+
[
|
|
377
|
+
"C",
|
|
378
|
+
D,
|
|
379
|
+
b,
|
|
380
|
+
n,
|
|
381
|
+
T,
|
|
382
|
+
n,
|
|
383
|
+
v
|
|
384
|
+
],
|
|
385
|
+
[
|
|
386
|
+
"L",
|
|
387
|
+
n,
|
|
388
|
+
C
|
|
389
|
+
],
|
|
390
|
+
[
|
|
391
|
+
"C",
|
|
392
|
+
n,
|
|
393
|
+
E,
|
|
394
|
+
D,
|
|
395
|
+
x,
|
|
396
|
+
a,
|
|
397
|
+
x
|
|
398
|
+
],
|
|
399
|
+
[
|
|
400
|
+
"L",
|
|
401
|
+
a,
|
|
402
|
+
S
|
|
403
|
+
],
|
|
404
|
+
[
|
|
405
|
+
"C",
|
|
406
|
+
r,
|
|
407
|
+
S,
|
|
408
|
+
r,
|
|
409
|
+
S,
|
|
410
|
+
r,
|
|
411
|
+
C
|
|
412
|
+
],
|
|
413
|
+
[
|
|
414
|
+
"L",
|
|
415
|
+
r,
|
|
416
|
+
v
|
|
417
|
+
],
|
|
418
|
+
[
|
|
419
|
+
"C",
|
|
420
|
+
r,
|
|
421
|
+
y,
|
|
422
|
+
r,
|
|
423
|
+
y,
|
|
424
|
+
a,
|
|
425
|
+
y
|
|
426
|
+
],
|
|
427
|
+
[
|
|
428
|
+
"L",
|
|
429
|
+
o,
|
|
430
|
+
y
|
|
431
|
+
],
|
|
432
|
+
[
|
|
433
|
+
"C",
|
|
434
|
+
s,
|
|
435
|
+
y,
|
|
436
|
+
s,
|
|
437
|
+
y,
|
|
438
|
+
s,
|
|
439
|
+
v
|
|
440
|
+
],
|
|
441
|
+
[
|
|
442
|
+
"L",
|
|
443
|
+
s,
|
|
444
|
+
_
|
|
445
|
+
],
|
|
446
|
+
[
|
|
447
|
+
"C",
|
|
448
|
+
s,
|
|
449
|
+
f,
|
|
450
|
+
s,
|
|
451
|
+
f,
|
|
452
|
+
o,
|
|
453
|
+
f
|
|
454
|
+
],
|
|
455
|
+
["Z"]
|
|
456
|
+
] };
|
|
457
|
+
}
|
|
458
|
+
if (e.dlBox = {
|
|
459
|
+
x: u + (d - u + g) / 2,
|
|
460
|
+
y: m + (h - m) / 2,
|
|
461
|
+
height: p,
|
|
462
|
+
width: 0
|
|
463
|
+
}, e.tooltipPos = i.inverted ? [i.plotSizeY - e.dlBox.y - p / 2, i.plotSizeX - e.dlBox.x] : [e.dlBox.x, e.dlBox.y + p / 2], e.y = e.plotY = 1, e.x = e.plotX = 1, !e.options.color) {
|
|
464
|
+
if (c === "from") e.color = n.color;
|
|
465
|
+
else if (c === "to") e.color = r.color;
|
|
466
|
+
else if (c === "gradient") {
|
|
467
|
+
let t = P(n.color).get(), i = P(r.color).get();
|
|
468
|
+
e.color = {
|
|
469
|
+
linearGradient: {
|
|
470
|
+
x1: 1,
|
|
471
|
+
x2: 0,
|
|
472
|
+
y1: 0,
|
|
473
|
+
y2: 0
|
|
474
|
+
},
|
|
475
|
+
stops: [[0, a ? t : i], [1, a ? i : t]]
|
|
476
|
+
};
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
translateNode(e, a) {
|
|
481
|
+
let o = this.translationFactor, s = this.chart, c = this.options, { borderRadius: l, borderWidth: u = 0 } = c, d = e.getSum(), p = Math.max(Math.round(d * o), this.options.minLinkWidth), m = Math.round(this.nodeWidth), h = a.sankeyColumn.offset(e, o), g = t(h.absoluteTop ?? a.sankeyColumn.top(o) + h.relativeTop, u), _ = t(this.colDistance * e.column + u / 2, u) + i(e.options[s.inverted ? "offsetVertical" : "offsetHorizontal"] || 0, m), v = s.inverted ? s.plotSizeX - _ : _;
|
|
482
|
+
if (e.sum = d, d) {
|
|
483
|
+
e.shapeType = "roundedRect", e.nodeX = v, e.nodeY = g;
|
|
484
|
+
let t = v, a = g, o = e.options.width || c.width || m, u = e.options.height || c.height || p, d = f(i((r(l) ? l.radius : l) || 0, o), 0, p / 2);
|
|
485
|
+
s.inverted && (t = v - m, a = s.plotSizeY - g - p, o = e.options.height || c.height || m, u = e.options.width || c.width || p), e.dlOptions = {
|
|
486
|
+
...n.getDLOptions({
|
|
487
|
+
level: this.mapOptionsToLevel[e.level],
|
|
488
|
+
optionsPoint: e.options
|
|
489
|
+
}),
|
|
490
|
+
zIndex: void 0
|
|
491
|
+
}, delete e.dlOptions.zIndex, e.plotX = 1, e.plotY = 1, e.tooltipPos = s.inverted ? [s.plotSizeY - a - u / 2, s.plotSizeX - t - o / 2] : [t + o / 2, a + u / 2], e.shapeArgs = {
|
|
492
|
+
x: t,
|
|
493
|
+
y: a,
|
|
494
|
+
width: o,
|
|
495
|
+
height: u,
|
|
496
|
+
r: d,
|
|
497
|
+
display: e.hasShape() ? "" : "none"
|
|
498
|
+
};
|
|
499
|
+
} else e.dlOptions = { enabled: !1 };
|
|
500
|
+
}
|
|
501
|
+
};
|
|
502
|
+
L.defaultOptions = e(M.defaultOptions, T), S.compose(w, L), c(L.prototype, {
|
|
503
|
+
animate: N.prototype.animate,
|
|
504
|
+
createNode: S.createNode,
|
|
505
|
+
forceDL: !0,
|
|
506
|
+
invertible: !0,
|
|
507
|
+
isCartesian: !1,
|
|
508
|
+
orderNodes: !0,
|
|
509
|
+
noSharedTooltip: !0,
|
|
510
|
+
pointArrayMap: [
|
|
511
|
+
"from",
|
|
512
|
+
"to",
|
|
513
|
+
"weight"
|
|
514
|
+
],
|
|
515
|
+
pointClass: w,
|
|
516
|
+
searchPoint: l.noop
|
|
517
|
+
}), h.registerSeriesType("sankey", L);
|
|
518
|
+
//#endregion
|
|
519
|
+
//#region node_modules/highcharts/es-modules/masters/modules/sankey.src.js
|
|
520
|
+
var R = l;
|
|
521
|
+
//#endregion
|
|
522
|
+
export { R as default };
|