@dpuse/dpuse-tool-highcharts-visualiser 0.0.80 → 0.0.82
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/dist/{AnimationUtilities-Bby2idBR.js → AnimationUtilities-CJw-tdb_.js} +74 -83
- package/dist/AnimationUtilities-CJw-tdb_.js.map +1 -0
- package/dist/BorderRadius-CqHYi9va.js +135 -0
- package/dist/BorderRadius-CqHYi9va.js.map +1 -0
- package/dist/CenteredUtilities-BTUT7_Ld.js +1316 -0
- package/dist/CenteredUtilities-BTUT7_Ld.js.map +1 -0
- package/dist/{SVGElement-BmvC_qu3.js → SVGElement-uTuGcjav.js} +101 -103
- package/dist/SVGElement-uTuGcjav.js.map +1 -0
- package/dist/SeriesRegistry-CXsAINSj.js +376 -0
- package/dist/SeriesRegistry-CXsAINSj.js.map +1 -0
- package/dist/{TextPath-DK4Jkzd7.js → TextPath-Coabnrz0.js} +32 -34
- package/dist/{TextPath-DK4Jkzd7.js.map → TextPath-Coabnrz0.js.map} +1 -1
- package/dist/{dependency-wheel.src-BHmwx9rW.js → dependency-wheel.src-ByNiAiZS.js} +26 -27
- package/dist/dependency-wheel.src-ByNiAiZS.js.map +1 -0
- package/dist/dpuse-tool-highcharts-visualiser.es.js +2437 -2415
- package/dist/dpuse-tool-highcharts-visualiser.es.js.map +1 -1
- package/dist/highchartsMoreCustom-Cm6MkFMu.js +1178 -0
- package/dist/highchartsMoreCustom-Cm6MkFMu.js.map +1 -0
- package/dist/{pattern-fill.src-BPmr3DQg.js → pattern-fill.src-CGZp553r.js} +30 -32
- package/dist/{pattern-fill.src-BPmr3DQg.js.map → pattern-fill.src-CGZp553r.js.map} +1 -1
- package/dist/{sankey.src-DocCurOx.js → sankey.src-Buj1zAlU.js} +115 -117
- package/dist/sankey.src-Buj1zAlU.js.map +1 -0
- package/dist/{streamgraph.src-Bn6PY8Fd.js → streamgraph.src-DjMW1U2g.js} +4 -6
- package/dist/{streamgraph.src-Bn6PY8Fd.js.map → streamgraph.src-DjMW1U2g.js.map} +1 -1
- package/package.json +12 -12
- package/dist/AnimationUtilities-Bby2idBR.js.map +0 -1
- package/dist/BorderRadius-2zMZW_aK.js +0 -1445
- package/dist/BorderRadius-2zMZW_aK.js.map +0 -1
- package/dist/SVGElement-BmvC_qu3.js.map +0 -1
- package/dist/SeriesRegistry-0cj0ZJqn.js +0 -374
- package/dist/SeriesRegistry-0cj0ZJqn.js.map +0 -1
- package/dist/dependency-wheel.src-BHmwx9rW.js.map +0 -1
- package/dist/highchartsMoreCustom-CcpfmVny.js +0 -1110
- package/dist/highchartsMoreCustom-CcpfmVny.js.map +0 -1
- package/dist/sankey.src-DocCurOx.js.map +0 -1
|
@@ -0,0 +1,1316 @@
|
|
|
1
|
+
import { $ as e, E as t, G as n, H as r, J as i, K as a, M as o, N as s, O as c, P as l, Q as u, R as d, S as f, T as p, U as m, _ as h, at as g, b as _, c as v, d as y, et as b, g as x, h as S, i as C, k as w, lt as T, p as E, s as D, t as O, tt as k, u as A, w as j, y as M, z as N } from "./AnimationUtilities-CJw-tdb_.js";
|
|
2
|
+
import { n as P, r as F, t as I } from "./SeriesRegistry-CXsAINSj.js";
|
|
3
|
+
import { t as L } from "./SVGElement-uTuGcjav.js";
|
|
4
|
+
//#region node_modules/highcharts/es-modules/Core/Foundation.js
|
|
5
|
+
var R;
|
|
6
|
+
(function(e) {
|
|
7
|
+
function t(e, t) {
|
|
8
|
+
e.eventOptions = e.eventOptions || {}, i(t.events, function(t, n) {
|
|
9
|
+
e.eventOptions[n] !== t && (e.eventOptions[n] && (k(e, n, e.eventOptions[n]), delete e.eventOptions[n]), r(t) && (e.eventOptions[n] = t, S(e, n, t, { order: 0 })));
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
e.registerEventOptions = t;
|
|
13
|
+
})(R ||= {});
|
|
14
|
+
var z = R;
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region node_modules/highcharts/es-modules/Data/ColumnUtils.js
|
|
17
|
+
function ee(e, t, n) {
|
|
18
|
+
return Array.isArray(e) ? (e.length = t, e) : e[n ? "subarray" : "slice"](0, t);
|
|
19
|
+
}
|
|
20
|
+
function B(e, t, n, r, i = []) {
|
|
21
|
+
if (Array.isArray(e)) return Array.isArray(i) || (i = Array.from(i)), {
|
|
22
|
+
removed: e.splice(t, n, ...i),
|
|
23
|
+
array: e
|
|
24
|
+
};
|
|
25
|
+
let a = Object.getPrototypeOf(e).constructor, o = e[r ? "subarray" : "slice"](t, t + n), s = new a(e.length - n + i.length);
|
|
26
|
+
return s.set(e.subarray(0, t), 0), s.set(i, t), s.set(e.subarray(t + n), t + i.length), {
|
|
27
|
+
removed: o,
|
|
28
|
+
array: s
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function V(e, t) {
|
|
32
|
+
switch (typeof e) {
|
|
33
|
+
case "boolean": return +!!e;
|
|
34
|
+
case "number": return isNaN(e) && !t ? null : e;
|
|
35
|
+
default: return e = parseFloat(`${e ?? ""}`), isNaN(e) && !t ? null : e;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region node_modules/highcharts/es-modules/Data/DataTableCore.js
|
|
40
|
+
var { setLength: H, splice: U } = {
|
|
41
|
+
convertToNumber: V,
|
|
42
|
+
setLength: ee,
|
|
43
|
+
splice: B
|
|
44
|
+
}, W = class {
|
|
45
|
+
constructor(e = {}) {
|
|
46
|
+
this.isDataTable = !0, this.autoId = !e.id, this.columns = {}, this.id = e.id || E(), this.rowCount = 0, this.versionTag = E();
|
|
47
|
+
let t = 0;
|
|
48
|
+
i(e.columns || {}, (e, n) => {
|
|
49
|
+
this.columns[n] = e.slice(), t = Math.max(t, e.length);
|
|
50
|
+
}), this.applyRowCount(t);
|
|
51
|
+
}
|
|
52
|
+
applyRowCount(e) {
|
|
53
|
+
this.rowCount = e, i(this.columns, (t, n) => {
|
|
54
|
+
t.length !== e && (this.columns[n] = H(t, e));
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
deleteRows(e, t = 1) {
|
|
58
|
+
if (t > 0 && e < this.rowCount) {
|
|
59
|
+
let n = 0;
|
|
60
|
+
i(this.columns, (r, i) => {
|
|
61
|
+
this.columns[i] = U(r, e, t).array, n = r.length;
|
|
62
|
+
}), this.rowCount = n;
|
|
63
|
+
}
|
|
64
|
+
o(this, "afterDeleteRows", {
|
|
65
|
+
rowIndex: e,
|
|
66
|
+
rowCount: t
|
|
67
|
+
}), this.versionTag = E();
|
|
68
|
+
}
|
|
69
|
+
getColumn(e, t) {
|
|
70
|
+
return this.columns[e];
|
|
71
|
+
}
|
|
72
|
+
getColumns(e, t) {
|
|
73
|
+
return (e || Object.keys(this.columns)).reduce((e, t) => (e[t] = this.columns[t], e), {});
|
|
74
|
+
}
|
|
75
|
+
getRowObject(e, t) {
|
|
76
|
+
let n = {}, r = this.columns;
|
|
77
|
+
t ??= Object.keys(this.columns);
|
|
78
|
+
for (let i of t) n[i] = r[i]?.[e];
|
|
79
|
+
return n;
|
|
80
|
+
}
|
|
81
|
+
setColumn(e, t = [], n = 0, r) {
|
|
82
|
+
this.setColumns({ [e]: t }, n, r);
|
|
83
|
+
}
|
|
84
|
+
setColumns(e, t, n) {
|
|
85
|
+
let r = this.rowCount;
|
|
86
|
+
i(e, (e, t) => {
|
|
87
|
+
this.columns[t] = e.slice(), r = e.length;
|
|
88
|
+
}), this.applyRowCount(r), n?.silent || (o(this, "afterSetColumns"), this.versionTag = E());
|
|
89
|
+
}
|
|
90
|
+
setRow(e, t = this.rowCount, n, r) {
|
|
91
|
+
var a;
|
|
92
|
+
let { columns: s } = this, c = n ? this.rowCount + 1 : t + 1, l = Object.keys(e);
|
|
93
|
+
if (r?.addColumns !== !1) for (let e = 0, t = l.length; e < t; e++) s[a = l[e]] || (s[a] = Array(this.rowCount));
|
|
94
|
+
i(s, (r, i) => {
|
|
95
|
+
r && (n ? r = U(r, t, 0, !0, [e[i]]).array : r[t] = i in e ? e[i] : r[t], s[i] = r);
|
|
96
|
+
}), this.applyRowCount(Math.max(c, this.rowCount)), r?.silent || (o(this, "afterSetRows", { rowIndex: t }), this.versionTag = E());
|
|
97
|
+
}
|
|
98
|
+
getModified() {
|
|
99
|
+
return this.modified || this;
|
|
100
|
+
}
|
|
101
|
+
}, G;
|
|
102
|
+
(function(e) {
|
|
103
|
+
function t(e, t) {
|
|
104
|
+
n.call(this, e, t, !0);
|
|
105
|
+
}
|
|
106
|
+
e.areaMarker = t;
|
|
107
|
+
function n(e, t, n) {
|
|
108
|
+
let r = this.legendItem = this.legendItem || {}, { chart: i, options: o } = this, { baseline: s = 0, symbolWidth: c, symbolHeight: l } = e, d = this.symbol || "circle", f = l / 2, p = i.renderer, m = r.group, h = s - Math.round((e.fontMetrics?.b || l) * (n ? .4 : .3)), g = {}, _, v = o.marker, y = 0;
|
|
109
|
+
if (i.styledMode || (g["stroke-width"] = Math.min(o.lineWidth || 0, 24), o.dashStyle ? g.dashstyle = o.dashStyle : o.linecap !== "square" && (g["stroke-linecap"] = "round")), r.line = p.path().addClass("highcharts-graph").attr(g).add(m), n && (r.area = p.path().addClass("highcharts-area").add(m)), g["stroke-linecap"] && (y = Math.min(r.line.strokeWidth(), c) / 2), c) {
|
|
110
|
+
let e = [[
|
|
111
|
+
"M",
|
|
112
|
+
y,
|
|
113
|
+
h
|
|
114
|
+
], [
|
|
115
|
+
"L",
|
|
116
|
+
c - y,
|
|
117
|
+
h
|
|
118
|
+
]];
|
|
119
|
+
r.line.attr({ d: e }), r.area?.attr({ d: [
|
|
120
|
+
...e,
|
|
121
|
+
[
|
|
122
|
+
"L",
|
|
123
|
+
c - y,
|
|
124
|
+
s
|
|
125
|
+
],
|
|
126
|
+
[
|
|
127
|
+
"L",
|
|
128
|
+
y,
|
|
129
|
+
s
|
|
130
|
+
]
|
|
131
|
+
] });
|
|
132
|
+
}
|
|
133
|
+
if (v && v.enabled !== !1 && c) {
|
|
134
|
+
let e = Math.min(u(v.radius, f), f);
|
|
135
|
+
d.indexOf("url") === 0 && (v = a(v, {
|
|
136
|
+
width: l,
|
|
137
|
+
height: l
|
|
138
|
+
}), e = 0), r.symbol = _ = p.symbol(d, c / 2 - e, h - e, 2 * e, 2 * e, w({ context: "legend" }, v)).addClass("highcharts-point").add(m), _.isMarker = !0;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
e.lineMarker = n;
|
|
142
|
+
})(G ||= {});
|
|
143
|
+
var K = G, q = {
|
|
144
|
+
lineWidth: 2,
|
|
145
|
+
allowPointSelect: !1,
|
|
146
|
+
crisp: !0,
|
|
147
|
+
showCheckbox: !1,
|
|
148
|
+
animation: { duration: 1e3 },
|
|
149
|
+
enableMouseTracking: !0,
|
|
150
|
+
events: {},
|
|
151
|
+
marker: {
|
|
152
|
+
enabledThreshold: 2,
|
|
153
|
+
lineColor: "var(--highcharts-background-color)",
|
|
154
|
+
lineWidth: 0,
|
|
155
|
+
radius: 4,
|
|
156
|
+
states: {
|
|
157
|
+
normal: { animation: !0 },
|
|
158
|
+
hover: {
|
|
159
|
+
animation: { duration: 150 },
|
|
160
|
+
enabled: !0,
|
|
161
|
+
radiusPlus: 2,
|
|
162
|
+
lineWidthPlus: 1
|
|
163
|
+
},
|
|
164
|
+
select: {
|
|
165
|
+
fillColor: "var(--highcharts-neutral-color-20)",
|
|
166
|
+
lineColor: "var(--highcharts-neutral-color-100)",
|
|
167
|
+
lineWidth: 2
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
point: { events: {} },
|
|
172
|
+
dataLabels: {
|
|
173
|
+
animation: {},
|
|
174
|
+
align: "center",
|
|
175
|
+
borderWidth: 0,
|
|
176
|
+
defer: !0,
|
|
177
|
+
distance: 4,
|
|
178
|
+
formatter: function() {
|
|
179
|
+
let { numberFormatter: e } = this.series.chart;
|
|
180
|
+
return typeof this.y == "number" ? e(this.y, -1) : "";
|
|
181
|
+
},
|
|
182
|
+
padding: [1, 3],
|
|
183
|
+
style: {
|
|
184
|
+
fontSize: "0.7em",
|
|
185
|
+
fontWeight: "bold",
|
|
186
|
+
color: "contrast",
|
|
187
|
+
textOutline: "1px contrast"
|
|
188
|
+
},
|
|
189
|
+
verticalAlign: "bottom",
|
|
190
|
+
x: 0,
|
|
191
|
+
y: 0
|
|
192
|
+
},
|
|
193
|
+
cropThreshold: 300,
|
|
194
|
+
opacity: 1,
|
|
195
|
+
pointRange: 0,
|
|
196
|
+
softThreshold: !0,
|
|
197
|
+
states: {
|
|
198
|
+
normal: { animation: !0 },
|
|
199
|
+
hover: {
|
|
200
|
+
animation: { duration: 150 },
|
|
201
|
+
lineWidthPlus: 1,
|
|
202
|
+
marker: {},
|
|
203
|
+
halo: {
|
|
204
|
+
size: 10,
|
|
205
|
+
opacity: .25
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
select: { animation: { duration: 0 } },
|
|
209
|
+
inactive: {
|
|
210
|
+
animation: { duration: 150 },
|
|
211
|
+
opacity: .2
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
stickyTracking: !0,
|
|
215
|
+
turboThreshold: 1e3,
|
|
216
|
+
findNearestPointBy: "x"
|
|
217
|
+
}, { defaultOptions: J } = v, { registerEventOptions: te } = z, { svg: ne, win: re } = T, { seriesTypes: Y } = I, { format: ie } = F, X = class r {
|
|
218
|
+
constructor() {
|
|
219
|
+
this.zoneAxis = "y";
|
|
220
|
+
}
|
|
221
|
+
init(e, t) {
|
|
222
|
+
o(this, "init", { options: t });
|
|
223
|
+
let n = this, r = e.series;
|
|
224
|
+
this.eventsToUnbind = [], this.condemnedPoints ||= [], n.chart = e, n.options = n.setOptions(t);
|
|
225
|
+
let i = n.options, a = i.visible !== !1;
|
|
226
|
+
this.dataTable ??= N(i.dataTable) ? new W() : i.dataTable?.isDataTable ? i.dataTable : new W(i.dataTable), n.linkedSeries = [], n.bindAxes(), w(n, {
|
|
227
|
+
name: i.name,
|
|
228
|
+
state: "",
|
|
229
|
+
visible: a,
|
|
230
|
+
selected: i.selected === !0
|
|
231
|
+
}), te(this, i), (i.events?.click || i.point?.events?.click || i.allowPointSelect) && (e.runTrackerClick = !0), n.getColor(), n.getSymbol(), n.isCartesian && (e.hasCartesianSeries = !0);
|
|
232
|
+
let s;
|
|
233
|
+
r.length && (s = r[r.length - 1]), n._i = u(s?._i, -1) + 1, n.opacity = n.options.opacity, e.orderItems("series", y(this, r)), !n.points && !n.data && n.setData(i.data, !1), o(this, "afterInit");
|
|
234
|
+
}
|
|
235
|
+
is(e) {
|
|
236
|
+
return Y[e] && this instanceof Y[e];
|
|
237
|
+
}
|
|
238
|
+
bindAxes() {
|
|
239
|
+
let e = this, t = e.options, n = e.chart, r;
|
|
240
|
+
o(this, "bindAxes", null, function() {
|
|
241
|
+
(e.axisTypes || []).forEach(function(i) {
|
|
242
|
+
(n[i] || []).forEach(function(n) {
|
|
243
|
+
r = n.options, (u(t[i], 0) === n.index || t[i] !== void 0 && t[i] === r.id) && (y(e, n.series), e[i] = n, n.isDirty = !0);
|
|
244
|
+
}), !e[i] && e.optionalAxis !== i && A(18, !0, n);
|
|
245
|
+
});
|
|
246
|
+
}), o(this, "afterBindAxes");
|
|
247
|
+
}
|
|
248
|
+
hasData() {
|
|
249
|
+
return this.visible && this.dataMax !== void 0 && this.dataMin !== void 0 || this.visible && this.dataTable.rowCount > 0;
|
|
250
|
+
}
|
|
251
|
+
hasMarkerChanged(e, t) {
|
|
252
|
+
let n = e.marker, r = t.marker || {};
|
|
253
|
+
return n && (r.enabled && !n.enabled || r.symbol !== n.symbol || r.height !== n.height || r.width !== n.width);
|
|
254
|
+
}
|
|
255
|
+
autoIncrement(e) {
|
|
256
|
+
let t = this.options, { pointIntervalUnit: n, relativeXValue: r } = this.options, i = this.chart.time, a = this.xIncrement ?? i.parse(t.pointStart) ?? 0, o;
|
|
257
|
+
if (this.pointInterval = o = u(this.pointInterval, t.pointInterval, 1), r && m(e) && (o *= e), n) {
|
|
258
|
+
let e = i.toParts(a);
|
|
259
|
+
n === "day" ? e[2] += o : n === "month" ? e[1] += o : n === "year" && (e[0] += o), o = i.makeTime.apply(i, e) - a;
|
|
260
|
+
}
|
|
261
|
+
return r && m(e) ? a + o : (this.xIncrement = a + o, a);
|
|
262
|
+
}
|
|
263
|
+
setOptions(e) {
|
|
264
|
+
let t = this.chart, n = t.options.plotOptions, r = t.userOptions || {}, i = a(e), s = t.styledMode, c = {
|
|
265
|
+
plotOptions: n,
|
|
266
|
+
userOptions: i
|
|
267
|
+
}, l;
|
|
268
|
+
o(this, "setOptions", c);
|
|
269
|
+
let d = c.plotOptions[this.type], f = r.plotOptions || {}, p = f.series || {}, m = J.plotOptions[this.type] || {}, h = f[this.type] || {};
|
|
270
|
+
d.dataLabels = this.mergeArrays(m.dataLabels, d.dataLabels), this.userOptions = c.userOptions;
|
|
271
|
+
let g = a(d, n.series, h, i), { negativeColor: _, negativeFillColor: v, zoneAxis: y = "y", zones: b } = g, x = (b || []).map((e) => ({ ...e }));
|
|
272
|
+
return this.tooltipOptions = a(J.tooltip, J.plotOptions.series?.tooltip, m?.tooltip, t.userOptions.tooltip, f.series?.tooltip, h.tooltip, i.tooltip), this.stickyTracking = u(i.stickyTracking, h.stickyTracking, p.stickyTracking, this.tooltipOptions.shared && !this.noSharedTooltip ? !0 : g.stickyTracking), d.marker === null && delete g.marker, this.zones ||= x, this.zoneAxis = y, (_ || v) && !b && (l = {
|
|
273
|
+
value: g[y + "Threshold"] || g.threshold || 0,
|
|
274
|
+
className: "highcharts-negative"
|
|
275
|
+
}, s || (typeof _ != "boolean" && (l.color = _), l.fillColor = v), x.push(l)), x.length && j(x[x.length - 1].value) && x.push(s ? {} : {
|
|
276
|
+
color: this.color,
|
|
277
|
+
fillColor: this.fillColor
|
|
278
|
+
}), o(this, "afterSetOptions", { options: g }), g;
|
|
279
|
+
}
|
|
280
|
+
getName() {
|
|
281
|
+
let { chart: e, options: t } = this, { dataMapping: r, name: i } = t, a = r?.y || r?.value, o = n(a) ? a : a?.column;
|
|
282
|
+
return i ?? (n(o) ? o : ie(e.options.lang.seriesName, this, e));
|
|
283
|
+
}
|
|
284
|
+
getCyclic(e, t, n) {
|
|
285
|
+
let r = this.chart, i = `${e}Index`, a = `${e}Counter`, o = n?.length || r.options.chart.colorCount, s, c;
|
|
286
|
+
t || (c = u(e === "color" ? this.options.colorIndex : void 0, this[i]), j(c) ? s = c : (r.series.length || (r[a] = 0), s = r[a] % o, r[a] += 1), n && (t = n[s])), s !== void 0 && (this[i] = s), this[e] = t;
|
|
287
|
+
}
|
|
288
|
+
getColor() {
|
|
289
|
+
let e = this.chart;
|
|
290
|
+
e.styledMode ? this.getCyclic("color") : this.options.colorByPoint ? this.color = "var(--highcharts-neutral-color-20)" : this.getCyclic("color", this.options.color || J.plotOptions[this.type]?.color, e.options.colors);
|
|
291
|
+
}
|
|
292
|
+
getPointsCollection() {
|
|
293
|
+
return (this.hasGroupedData ? this.points : this.data) || [];
|
|
294
|
+
}
|
|
295
|
+
getSymbol() {
|
|
296
|
+
let e = this.options.marker;
|
|
297
|
+
this.getCyclic("symbol", e?.symbol, this.chart.options.symbols);
|
|
298
|
+
}
|
|
299
|
+
getColumn(e, t, n) {
|
|
300
|
+
let r = t ? this.dataTable.getModified() : this.dataTable, i = r.rowCount, a = this.dataTable !== r, o = r.getColumn(e, !0);
|
|
301
|
+
if (e === "x" && !a) {
|
|
302
|
+
if (this.xColumn) return this.xColumn;
|
|
303
|
+
let e = r.getColumn("name", !0), t = this.options, n = (e) => {
|
|
304
|
+
if (this.xColumnIsNumbers !== void 0) return this.xColumnIsNumbers;
|
|
305
|
+
for (let t of e) if (typeof t != "number") return this.xColumnIsNumbers = !1;
|
|
306
|
+
return this.xColumnIsNumbers = !0;
|
|
307
|
+
};
|
|
308
|
+
if (this.xIncrement = null, !o || this.xAxis?.hasNames || t.relativeXValue || o.length < (t.turboThreshold || Infinity) && !this.boosted && !n(o)) {
|
|
309
|
+
let t = [];
|
|
310
|
+
for (let n = 0; n < i; n++) {
|
|
311
|
+
let r = o?.[n];
|
|
312
|
+
j(r) || (this.xIncrement ??= t[t.length - 1] ?? null), t.push(this.getX(r, e?.[n]));
|
|
313
|
+
}
|
|
314
|
+
return this.xColumn = t;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
return o || Array(n ? i : 0);
|
|
318
|
+
}
|
|
319
|
+
getX(e, t) {
|
|
320
|
+
return this.xAxis?.hasNames && this.dataTable.getColumn("name", !0) && j(t) ? this.xAxis.nameToX({
|
|
321
|
+
name: t,
|
|
322
|
+
series: this
|
|
323
|
+
}, e) : e === void 0 || m(e) && this.options.relativeXValue ? this.autoIncrement(e) : (typeof e == "string" && (e = this.chart.time.parse(e), m(e)), e);
|
|
324
|
+
}
|
|
325
|
+
matchPoints(e, t, n, r) {
|
|
326
|
+
let { dataTable: i, options: a, requireSorting: o } = this, s = a.dataSorting, c = this.data, l = [], u = [], d = i.rowCount === c.length, f, p, m, h = 0, g = !0;
|
|
327
|
+
this.xIncrement = null, delete this.xColumn;
|
|
328
|
+
let _ = i.getColumn("x"), v = i.getColumn("id"), y = s?.matchByName ? i.getColumn("name") : void 0, b = i.getColumn("index");
|
|
329
|
+
for (p = 0; p < i.rowCount; p++) {
|
|
330
|
+
let a = _?.[p], m = v?.[p], g = y?.[p], x = b?.[p], [S, C] = m && t ? [m, t] : g && n ? [g, n] : j(x) && r ? [x, r] : j(a) && e ? [a, e] : [], w = -1;
|
|
331
|
+
if (C) {
|
|
332
|
+
if (w = C.indexOf(S, h), w === -1) {
|
|
333
|
+
let t = _?.[p], n = e?.length ?? i.rowCount;
|
|
334
|
+
for (; n && e && typeof t == "number" && e[n - 1] > t;) n--;
|
|
335
|
+
l.push({
|
|
336
|
+
newIndex: n,
|
|
337
|
+
oldIndex: p
|
|
338
|
+
});
|
|
339
|
+
} else c[w] && (u.push({
|
|
340
|
+
newIndex: w,
|
|
341
|
+
oldIndex: p
|
|
342
|
+
}), c[w].touched = !0, o && (h = w + 1));
|
|
343
|
+
(!d || p !== w || s?.enabled || this.hasDerivedData) && (f = !0);
|
|
344
|
+
} else l.push({
|
|
345
|
+
newIndex: p,
|
|
346
|
+
oldIndex: p
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
if (f) {
|
|
350
|
+
for (u.forEach((e) => {
|
|
351
|
+
c[e.newIndex].applyOptions(i.getRowObject(e.oldIndex));
|
|
352
|
+
}), l.sort((e, t) => t.newIndex - e.newIndex), l.forEach((e) => {
|
|
353
|
+
c.splice(e.newIndex, 0, void 0);
|
|
354
|
+
}), p = c.length; p--;) m = c[p], m && !m.touched && (m.destroy(), c.splice(p, 1));
|
|
355
|
+
this.isDirtyData = this.isDirty = !0;
|
|
356
|
+
} else if (d && !s?.enabled) {
|
|
357
|
+
for (p = 0; p < i.rowCount; p++) if (!c[p].destroyed && !c[p].condemned) {
|
|
358
|
+
let e = i.getRowObject(p);
|
|
359
|
+
e && (Object.keys(e).forEach((t) => {
|
|
360
|
+
e[t] === void 0 && delete e[t];
|
|
361
|
+
}), Object.keys(e).length && c[p].update(e, !1, void 0, !1));
|
|
362
|
+
}
|
|
363
|
+
} else g = !1;
|
|
364
|
+
if (c.forEach((e) => {
|
|
365
|
+
e && (e.touched = !1);
|
|
366
|
+
}), !g) return !1;
|
|
367
|
+
let S = this.getColumn("x");
|
|
368
|
+
return this.xIncrement === null && S.length && (this.xIncrement = x(S), this.autoIncrement()), !0;
|
|
369
|
+
}
|
|
370
|
+
getDataColumnKeys() {
|
|
371
|
+
return this.dataColumnKeys || ["x", ...this.pointArrayMap || ["y"]];
|
|
372
|
+
}
|
|
373
|
+
setData(e, t = !0, r, i) {
|
|
374
|
+
let o = this, s = this.dataTable, c = o.options, l = o.points, u = l?.length || 0, d = s.getColumn("x"), f = s.getColumn("id"), p = c.dataSorting?.matchByName && l?.map((e) => e.name) || s.getColumn("name"), m = s.getColumn("index"), h = o.chart, g = o.xAxis, _, v, y;
|
|
375
|
+
if (h.options.chart.allowMutatingData || (c.data && delete o.options.data, o.userOptions.data && delete o.userOptions.data, y = a(!0, e)), e = y || e, o.xIncrement = null, delete o.xColumn, delete o.xColumnIsNumbers, s !== c.dataTable && delete s.columns.x, o.colorCounter = 0, N(e) ? this.setDataFromArray(e) : this.setDataFromTable(e), i !== !1 && u && !o.cropped && !o.hasGroupedData && o.visible && !o.boosted && (_ = this.matchPoints(d, f, p, m)), !_) {
|
|
376
|
+
for (n(this.getColumn("y")[0]) && A(14, !0, h), o.data = [], v = u; v--;) l[v]?.destroy();
|
|
377
|
+
g && (g.minRange = g.userMinRange), o.isDirty = h.isDirtyBox = !0, o.isDirtyData = !!l, r = !1;
|
|
378
|
+
}
|
|
379
|
+
N(e) && (o.options.data = o.userOptions.data = e), c.legendType === "point" && (this.processData(), this.generatePoints()), t && h.redraw(r);
|
|
380
|
+
}
|
|
381
|
+
setDataFromArray(e) {
|
|
382
|
+
let t = e.length, { keys: n, turboThreshold: r } = this.options, { pointValKey: i = "y", pointArrayMap: a = [] } = this, o = a.length, s = this.dataTable, c = this.getDataColumnKeys(), l = r && t > r, u = 0, d = 1;
|
|
383
|
+
if (l) {
|
|
384
|
+
let r = this.getFirstValidPoint(e), f = this.getFirstValidPoint(e, t - 1, -1), p = (e) => !!(N(e) && (n || m(e[0])));
|
|
385
|
+
if (m(r) && m(f)) s.setColumn(i, e);
|
|
386
|
+
else if (p(r) && p(f)) {
|
|
387
|
+
if (o) {
|
|
388
|
+
let t = r.length === o, n = Array(r.length).fill(0).map(() => []);
|
|
389
|
+
for (let t of e) for (let e = 0; e <= o; e++) n[e]?.push(t[e]);
|
|
390
|
+
s.setColumns((t ? a : c).reduce((e, t, r) => (e[t] = n[r], e), {}));
|
|
391
|
+
} else {
|
|
392
|
+
n && (u = n.indexOf("x"), d = n.indexOf("y"), u = u >= 0 ? u : 0, d = d >= 0 ? d : 1), r.length === 1 && (d = 0);
|
|
393
|
+
let t = [], a = [];
|
|
394
|
+
if (u === d) {
|
|
395
|
+
for (let t of e) a.push(t[d]);
|
|
396
|
+
s.setColumn(i, a);
|
|
397
|
+
} else {
|
|
398
|
+
for (let n of e) t.push(n[u]), a.push(n[d]);
|
|
399
|
+
s.setColumns({
|
|
400
|
+
x: t,
|
|
401
|
+
[i]: a
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
} else l = !1;
|
|
406
|
+
}
|
|
407
|
+
if (!l) {
|
|
408
|
+
let n = {};
|
|
409
|
+
for (let r = 0; r < t; r++) {
|
|
410
|
+
let i = this.pointClass.prototype.optionsToObject.call({ series: this }, e[r]);
|
|
411
|
+
for (let e of Object.keys(i)) n[e] || (n[e] = Array(t)), n[e][r] = i[e];
|
|
412
|
+
}
|
|
413
|
+
t ? s.setColumns(n) : s.deleteRows(0, s.rowCount);
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
setDataFromTable(t) {
|
|
417
|
+
let { chart: r, options: i, dataTable: a } = this, o = r.getDataTable(i), s = t ? [t] : o.length ? o : r.dataTable, c = this.getDataColumnKeys(), l = i.dataMapping, u = c.slice();
|
|
418
|
+
l && (Object.keys(l).forEach((t) => {
|
|
419
|
+
e(u, t);
|
|
420
|
+
}), this.dataColumnKeys = u), s.forEach((e, t) => {
|
|
421
|
+
let r = u.reduce((r, i) => {
|
|
422
|
+
let a = l?.[i], o = e.columns || {}, s = e.id, c = n(a) ? t === 0 && o[a] : ((a?.dataTable || 0) === t || s && a?.dataTable === s) && (m(a?.column) ? Object.values(o)[a.column] : o[a?.column || i]);
|
|
423
|
+
return c && (r[i] = c), r;
|
|
424
|
+
}, {});
|
|
425
|
+
(l || e) && a.setColumns(r), e.isDataTable && this.bindDataTableEvents(e, r);
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
bindDataTableEvents(e, t) {
|
|
429
|
+
if (this.hasBoundDataTableEvents) return;
|
|
430
|
+
let { chart: n, eventsToUnbind: r } = this, i = () => {
|
|
431
|
+
clearTimeout(n.redrawTimeout), n.redrawTimeout = setTimeout(() => n.renderer && n.redraw(), 0);
|
|
432
|
+
};
|
|
433
|
+
r.push(S(e, "afterSetRows", (e) => {
|
|
434
|
+
let n = e.rowIndex;
|
|
435
|
+
if (m(n)) {
|
|
436
|
+
let e = W.prototype.getRowObject.call({ columns: t }, n), r = this.data[n];
|
|
437
|
+
e && (this.currentDataGrouping ? this.setData() : (r ? r.update(e, !1) : this.addPoint(e, !1), i()));
|
|
438
|
+
}
|
|
439
|
+
})), r.push(S(e, "afterDeleteRows", (e) => {
|
|
440
|
+
let { rowCount: t, rowIndex: n } = e;
|
|
441
|
+
if (m(n)) {
|
|
442
|
+
for (let e = n + t - 1; e >= n; e--) this.removePoint(e, !1);
|
|
443
|
+
i();
|
|
444
|
+
}
|
|
445
|
+
})), r.push(S(e, "afterSetColumns", (e) => {
|
|
446
|
+
this.setData(e.target);
|
|
447
|
+
})), this.hasBoundDataTableEvents = !0;
|
|
448
|
+
}
|
|
449
|
+
getProcessedData(e) {
|
|
450
|
+
let t = this, { dataTable: n, isCartesian: r, options: i, xAxis: a } = t, o = i.cropThreshold, s = e || t.getExtremesFromAll, c = a?.logarithmic, u = n.rowCount, d, f, p = 0, m, h, g, _ = t.getColumn("x"), v = n, y = !1;
|
|
451
|
+
a && (m = a.getExtremes(), h = m.min, g = m.max, y = !!(a.categories && !a.names.length), r && t.sorted && !s && (!o || u > o || t.forceCrop) && (_[u - 1] < h || _[0] > g ? v = new W() : t.getColumn(t.pointValKey || "y").length && (_[0] < h || _[u - 1] > g) && (d = this.cropData(n, h, g), v = d.modified, p = d.start, f = !0))), v !== n && (_ = v.getColumn("x", !0) || []);
|
|
452
|
+
let b = l([c ? _.map(c.log2lin) : _], () => t.requireSorting && !y && A(15, !1, t.chart));
|
|
453
|
+
return {
|
|
454
|
+
modified: v,
|
|
455
|
+
cropped: f,
|
|
456
|
+
cropStart: p,
|
|
457
|
+
closestPointRange: b
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
processData(e) {
|
|
461
|
+
let t = this, n = t.xAxis, r = t.dataTable;
|
|
462
|
+
if (t.isCartesian && !t.isDirty && !n.isDirty && !t.yAxis.isDirty && !e) return !1;
|
|
463
|
+
let i = t.getProcessedData();
|
|
464
|
+
r.modified = i.modified, t.cropped = i.cropped, t.cropStart = i.cropStart, t.closestPointRange = t.basePointRange = i.closestPointRange, o(t, "afterProcessData");
|
|
465
|
+
}
|
|
466
|
+
cropData(e, t, n) {
|
|
467
|
+
let r = e === this.dataTable ? this.getColumn("x") : e.getColumn("x", !0), i = r.length, a, o, s = 0, c = i;
|
|
468
|
+
for (a = 0; a < i; a++) if (r[a] >= t) {
|
|
469
|
+
s = Math.max(0, a - 1);
|
|
470
|
+
break;
|
|
471
|
+
}
|
|
472
|
+
for (o = a; o < i; o++) if (r[o] > n) {
|
|
473
|
+
c = o + 1;
|
|
474
|
+
break;
|
|
475
|
+
}
|
|
476
|
+
let l = Object.keys(e.columns).reduce((t, n) => (t[n] = (e.getColumn(n, !0) || []).slice(s, c), t), {});
|
|
477
|
+
return l.x = r.slice(s, c), {
|
|
478
|
+
modified: new W({ columns: l }),
|
|
479
|
+
start: s,
|
|
480
|
+
end: c
|
|
481
|
+
};
|
|
482
|
+
}
|
|
483
|
+
generatePoints() {
|
|
484
|
+
let e = this, t = e.options, n = e.hasProcessedDataTable ? void 0 : t.data, r = e.dataTable.getModified(), i = e.getColumn("x", !0), a = e.pointClass, s = r.rowCount, c = e.cropStart || 0, l = e.hasGroupedData, u = t.keys, d = [], f = t.dataGrouping?.groupAll ? c : 0, p = this.getDataColumnKeys(), m, h, g, _, v = e.data, y;
|
|
485
|
+
if (!v && !l) {
|
|
486
|
+
let t = [];
|
|
487
|
+
t.length = n?.length || 0, v = e.data = t;
|
|
488
|
+
}
|
|
489
|
+
for (u && l && (e.options.keys = !1), _ = 0; _ < s; _++) h = c + _, l ? (g = new a(e, r.getRowObject(_, p)), g.dataGroup = e.groupMap?.[f + _], g.dataGroup?.options && (g.options = g.dataGroup.options, w(g, g.dataGroup.options), delete g.dataLabels, g.key = g.name ?? g.category)) : (g = v[h], y = n ? n[h] : r.getRowObject(_), !g && y !== void 0 ? v[h] = g = new a(e, y, i[_]) : g && (g.category = e.xAxis?.categories?.[g.x] ?? g.x, g.key = g.name ?? g.category)), g && (g.index = l ? f + _ : h, d[_] = g);
|
|
490
|
+
if (e.options.keys = u, v && (s !== (m = v.length) || l)) for (_ = 0; _ < m; _++) _ === c && !l && (_ += s), v[_] && (v[_].destroyElements(), v[_].plotX = void 0);
|
|
491
|
+
e.data = v, e.points = d, o(this, "afterGeneratePoints");
|
|
492
|
+
}
|
|
493
|
+
getXExtremes(e) {
|
|
494
|
+
return {
|
|
495
|
+
min: h(e),
|
|
496
|
+
max: x(e)
|
|
497
|
+
};
|
|
498
|
+
}
|
|
499
|
+
getExtremes(e, t) {
|
|
500
|
+
let { options: n, xAxis: r, yAxis: i } = this, a = t || this.getExtremesFromAll || n.getExtremesFromAll, s = a && this.cropped ? this.dataTable : this.dataTable.getModified(), c = s.rowCount, l = e || this.stackedYData, u = l ? [l] : (this.keysAffectYAxis || this.pointArrayMap || ["y"])?.map((e) => s.getColumn(e, !0) || []) || [], d = this.getColumn("x", !0), f = [], p = this.requireSorting && !this.is("column") ? 1 : 0, g = n.cumulative && n.cumulativeStart && p && !a, _ = i ? i.positiveValuesOnly : !1, v = a || this.cropped || !r, y, b, S, C = 0, w = 0;
|
|
501
|
+
for (r && (y = r.getExtremes(), C = y.min, w = y.max), S = 0; S < c; S++) if (b = d[S], (v || (d[S + p] || b) >= C && (d[S - p] || b) <= w) && (!g || b >= C)) for (let e of u) {
|
|
502
|
+
let t = e[S];
|
|
503
|
+
m(t) && (t > 0 || !_) && f.push(t);
|
|
504
|
+
}
|
|
505
|
+
let T = {
|
|
506
|
+
activeYData: f,
|
|
507
|
+
dataMin: h(f),
|
|
508
|
+
dataMax: x(f)
|
|
509
|
+
};
|
|
510
|
+
return o(this, "afterGetExtremes", { dataExtremes: T }), T;
|
|
511
|
+
}
|
|
512
|
+
applyExtremes() {
|
|
513
|
+
let e = this.getExtremes();
|
|
514
|
+
return this.dataMin = e.dataMin, this.dataMax = e.dataMax, e;
|
|
515
|
+
}
|
|
516
|
+
getFirstValidPoint(e, t = 0, n = 1) {
|
|
517
|
+
let r = e.length, i = t;
|
|
518
|
+
for (; i >= 0 && i < r;) {
|
|
519
|
+
if (j(e[i])) return e[i];
|
|
520
|
+
i += n;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
translate() {
|
|
524
|
+
this.generatePoints();
|
|
525
|
+
let e = this, { hasRendered: t, options: n, xAxis: r, yAxis: i } = e, { stacking: a, threshold: s } = n, { polar: c } = e.chart, l = e.points.concat(e.condemnedPoints), d = l.length, f = e.pointPlacementToXValue(), p = !!f, h = n.startFromThreshold ? s : 0, g = n?.nullInteraction && i.len, v, y, b, x, S = Number.MAX_VALUE;
|
|
526
|
+
function C(e) {
|
|
527
|
+
return M(e, -1e9, 1e9);
|
|
528
|
+
}
|
|
529
|
+
let w = (e, t) => {
|
|
530
|
+
let n = r.translate(e, !1, !1, t, !0, f);
|
|
531
|
+
return m(n) ? _(C(n)) : void 0;
|
|
532
|
+
}, T = (e, t, n) => {
|
|
533
|
+
if (m(e) && t.plotX !== void 0) {
|
|
534
|
+
let t = i.translate(e, !1, !0, n, !0);
|
|
535
|
+
return m(t) ? C(t) : void 0;
|
|
536
|
+
}
|
|
537
|
+
if (!m(e) && g) return g;
|
|
538
|
+
};
|
|
539
|
+
for (v = 0; v < d; v++) {
|
|
540
|
+
let n = l[v], o = n.x, d, g, E = n.y, D = n.low, O = a && i.stacking?.stacks[(e.negStacks && E < (h ? 0 : s) ? "-" : "") + e.stackKey];
|
|
541
|
+
n.plotX = y = w(o), a && e.visible && O && O[o] && (x = e.getStackIndicator(x, o, e.index), !n.isNull && x.key && (d = O[o], g = d.points[x.key]), d && N(g) && (D = g[0], E = g[1], D === h && x.key === O[o].base && (D = u(m(s) ? s : i.min)), i.positiveValuesOnly && j(D) && D <= 0 && (D = void 0), n.total = n.stackTotal = u(d.total), n.percentage = j(n.y) && d.total ? n.y / d.total * 100 : void 0, n.stackY = E, e.irregularWidths || d.setOffset(e.pointXOffset || 0, e.barW || 0, void 0, void 0, void 0, e.xAxis))), n.yBottom = j(D) ? C(i.translate(D, !1, !0, !1, !0)) : void 0, e.dataModify && (E = e.dataModify.modifyValue(E, v)), n.plotY = T(E, n), n.origin = t && !n.graphic && !c ? {
|
|
542
|
+
x: w(o, !0),
|
|
543
|
+
y: T(E, n, !0)
|
|
544
|
+
} : void 0, n.isInside = this.isPointInside(n), n.clientX = p ? _(r.translate(o, !1, !1, !1, !0, f)) : y, n.negative = (n.y || 0) < (s || 0), !n.isNull && n.visible !== !1 && m(y) && (m(b) && (S = Math.min(S, Math.abs(y - b))), b = y), n.zone = this.zones.length ? n.getZone() : void 0;
|
|
545
|
+
}
|
|
546
|
+
e.closestPointRangePx = S, o(this, "afterTranslate");
|
|
547
|
+
}
|
|
548
|
+
getValidPoints(e, t, n) {
|
|
549
|
+
let r = this.chart;
|
|
550
|
+
return (e || this.points || []).filter(function(e) {
|
|
551
|
+
let { plotX: i, plotY: a } = e;
|
|
552
|
+
return !n && (e.isNull || !m(a)) || t && !r.isInsidePlot(i, a, { inverted: r.inverted }) ? !1 : e.visible !== !1;
|
|
553
|
+
});
|
|
554
|
+
}
|
|
555
|
+
getSharedClipKey() {
|
|
556
|
+
return this.sharedClipKey = (this.options.xAxis || 0) + "," + (this.options.yAxis || 0), this.sharedClipKey;
|
|
557
|
+
}
|
|
558
|
+
setClip() {
|
|
559
|
+
let { chart: e, group: t, markerGroup: n, options: r, plotClipGroup: i } = this, a = e.sharedClips, o = e.renderer, s = e.getClipBox(this), c = r.clip ?? !0, l = this.getSharedClipKey(), u = a[l];
|
|
560
|
+
u ? u.animate(s) : a[l] = u = o.clipRect(s), t?.clip(c ? u : void 0), n?.clip(), i?.clip(c && this.yAxis.clippable ? e.plotClipInner : void 0);
|
|
561
|
+
}
|
|
562
|
+
animate(e) {
|
|
563
|
+
let { chart: t, group: n, markerGroup: r } = this, i = t.inverted, a = O(this.options.animation), o = [
|
|
564
|
+
this.getSharedClipKey(),
|
|
565
|
+
a.duration,
|
|
566
|
+
a.easing,
|
|
567
|
+
a.defer
|
|
568
|
+
].join(","), s = t.sharedClips[o], c = t.sharedClips[o + "m"];
|
|
569
|
+
if (e && n) {
|
|
570
|
+
let e = t.getClipBox(this);
|
|
571
|
+
if (s) s.attr("height", e.height);
|
|
572
|
+
else {
|
|
573
|
+
e.width = 0, i && (e.x = t.plotHeight), s = t.renderer.clipRect(e), t.sharedClips[o] = s;
|
|
574
|
+
let n = {
|
|
575
|
+
x: -99,
|
|
576
|
+
y: -99,
|
|
577
|
+
width: i ? t.plotWidth + 199 : 99,
|
|
578
|
+
height: i ? 99 : t.plotHeight + 199
|
|
579
|
+
};
|
|
580
|
+
c = t.renderer.clipRect(n), t.sharedClips[o + "m"] = c;
|
|
581
|
+
}
|
|
582
|
+
n.clip(s), r?.clip(c);
|
|
583
|
+
} else if (s && !s.hasClass("highcharts-animating")) {
|
|
584
|
+
let e = t.getClipBox(this), n = a.step;
|
|
585
|
+
(r?.element.childNodes.length || t.series.length > 1) && (a.step = function(e, t) {
|
|
586
|
+
n && n.apply(t, arguments), t.prop === "width" && c?.element && c.attr(i ? "height" : "width", e + 99);
|
|
587
|
+
}), s.addClass("highcharts-animating").animate(e, a);
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
afterAnimate() {
|
|
591
|
+
this.setClip(), i(this.chart.sharedClips, (e, t, n) => {
|
|
592
|
+
e && !this.chart.container.querySelector(`[clip-path="url(#${e.id})"]`) && (e.destroy(), delete n[t]);
|
|
593
|
+
}), this.finishedAnimating = !0, o(this, "afterAnimate");
|
|
594
|
+
}
|
|
595
|
+
drawPoints(e) {
|
|
596
|
+
e ||= this.points.concat(this.condemnedPoints);
|
|
597
|
+
let t = this, n = t.chart, r = n.styledMode, { colorAxis: i, options: a } = t, o = a.marker || {}, s = a.nullInteraction, c = t[t.specialGroup || "markerGroup"], l = t.xAxis, d = o.enabled ?? (!l || l.isRadial ? !0 : null) ?? (t.closestPointRangePx ?? -Infinity) >= (o.enabledThreshold ?? 2) * o.radius, f, p, m, h, g, _, v;
|
|
598
|
+
if (o.enabled !== !1 || t._hasPointMarkers) for (f = 0; f < e.length; f++) {
|
|
599
|
+
p = e[f], m = p.graphic, h = m ? "animate" : "attr", g = p.marker || {}, _ = !!p.marker;
|
|
600
|
+
let a = p.isNull;
|
|
601
|
+
if ((d && !j(g.enabled) || g.enabled) && (!a || s) && p.visible !== !1) {
|
|
602
|
+
let e = u(g.symbol, t.symbol, "rect");
|
|
603
|
+
v = t.markerAttribs(p, p.selected ? "select" : "");
|
|
604
|
+
let a = p.isInside !== !1;
|
|
605
|
+
if (!m && a && ((v.width || 0) > 0 || p.hasImage) && (p.graphic = m = n.renderer.symbol(e, v.x, v.y, v.width, v.height, _ ? g : o).add(c), p.origin)) {
|
|
606
|
+
let e = p.getOrigin(p.origin, v);
|
|
607
|
+
r || (e.opacity = 0), m.attr(e), h = "animate";
|
|
608
|
+
}
|
|
609
|
+
if (m) {
|
|
610
|
+
h === "animate" && m?.animate(v);
|
|
611
|
+
let e = t.pointAttribs(p, r || !p.selected ? void 0 : "select");
|
|
612
|
+
r ? i && m.css({ fill: e.fill }) : m[h](e), m.addClass(p.getClassName(), !0);
|
|
613
|
+
}
|
|
614
|
+
} else m && (p.graphic = m.destroy());
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
markerAttribs(e, t) {
|
|
618
|
+
let n = this.options, r = n.marker ?? {}, i = e.marker || {}, a = i.symbol || r.symbol, o = {}, s, c, l = i.radius ?? r.radius;
|
|
619
|
+
t && (s = r.states?.[t], c = i.states?.[t], l = c?.radius ?? s?.radius ?? (l && l + (s?.radiusPlus || 0))), e.hasImage = a && a.indexOf("url") === 0, e.hasImage && (l = 0);
|
|
620
|
+
let u = e.pos();
|
|
621
|
+
return m(l) && u && (n.crisp && (u[0] = f(u[0], e.hasImage ? 0 : a === "rect" ? r.lineWidth || 0 : 1)), o.x = u[0] - l, o.y = u[1] - l), l && (o.width = o.height = 2 * l), o;
|
|
622
|
+
}
|
|
623
|
+
pointAttribs(e, t) {
|
|
624
|
+
let n = this.options, r = n.marker ?? {}, i = e?.options, a = i?.marker || {}, o = i?.color, s = e?.color, c = e?.zone?.color, l = this.color, u, d, f = a.lineWidth ?? r.lineWidth, p = e?.isNull && n.nullInteraction ? 0 : 1;
|
|
625
|
+
l = o || c || s || l, u = a.fillColor || r.fillColor || l, d = a.lineColor || r.lineColor || l, t ||= "normal";
|
|
626
|
+
let m = r.states?.[t] || {}, h = a.states?.[t] || {};
|
|
627
|
+
return f = h.lineWidth ?? m.lineWidth ?? (f || 0) + (h.lineWidthPlus ?? m.lineWidthPlus ?? 0), u = h.fillColor || m.fillColor || u, d = h.lineColor || m.lineColor || d, p = h.opacity ?? m.opacity ?? p, {
|
|
628
|
+
stroke: d,
|
|
629
|
+
"stroke-width": f,
|
|
630
|
+
fill: u,
|
|
631
|
+
opacity: e?.condemned || e?.isInside === !1 ? 0 : p
|
|
632
|
+
};
|
|
633
|
+
}
|
|
634
|
+
destroy(e) {
|
|
635
|
+
let t = this, n = t.chart, r = /AppleWebKit\/533/.test(re.navigator.userAgent), a = t.data || [], s, l, u;
|
|
636
|
+
for (o(t, "destroy", { keepEventsForUpdate: e }), this.removeEvents(e), (t.axisTypes || []).forEach(function(e) {
|
|
637
|
+
u = t[e], u?.series && (c(u.series, t), u.isDirty = u.forceRedraw = !0);
|
|
638
|
+
}), t.legendItem && t.chart.legend.destroyItem(t), l = a.length; l--;) a[l]?.destroy?.(!0);
|
|
639
|
+
for (let e of t.zones || []) p(e, void 0, !0);
|
|
640
|
+
d(t.animationTimeout), i(t, function(e, t) {
|
|
641
|
+
e instanceof L && !e.survive && (s = r && t === "group" ? "hide" : "destroy", e[s]());
|
|
642
|
+
}), n.hoverSeries === t && (n.hoverSeries = void 0), c(n.series, t), n.orderItems("series"), i(t, function(n, r) {
|
|
643
|
+
(!e || r !== "hcEvents") && delete t[r];
|
|
644
|
+
});
|
|
645
|
+
}
|
|
646
|
+
applyZones() {
|
|
647
|
+
let e = this, { area: t, chart: n, graph: r, zones: i, points: a, xAxis: o, yAxis: s, zoneAxis: c } = e, { inverted: l, renderer: d } = n, f = this[`${c}Axis`], { isXAxis: p, len: h = 0, minPointOffset: g = 0 } = f || {}, _ = (r?.strokeWidth() || 0) / 2 + 1, v = (e, t = 0, n = 0) => {
|
|
648
|
+
l && (n = h - n);
|
|
649
|
+
let { translated: r = 0, lineClip: i, value: a } = e, o = n - r;
|
|
650
|
+
i?.push([
|
|
651
|
+
"L",
|
|
652
|
+
t,
|
|
653
|
+
Math.abs(o) < _ ? n - _ * (o < 0 || o === 0 && j(a) ? -1 : 1) : r
|
|
654
|
+
]);
|
|
655
|
+
};
|
|
656
|
+
if (i.length && (r || t) && f && m(f.min)) {
|
|
657
|
+
let e = f.getExtremes().max + g, n = (e) => {
|
|
658
|
+
e.forEach((t, n) => {
|
|
659
|
+
(t[0] === "M" || t[0] === "L") && (e[n] = [
|
|
660
|
+
t[0],
|
|
661
|
+
p ? h - t[1] : t[1],
|
|
662
|
+
p ? t[2] : h - t[2]
|
|
663
|
+
]);
|
|
664
|
+
});
|
|
665
|
+
};
|
|
666
|
+
if (i.forEach((t) => {
|
|
667
|
+
t.lineClip = [], t.translated = M(f.toPixels(u(t.value, e), !0) || 0, 0, h);
|
|
668
|
+
}), r && !this.showLine && r.hide(), t && t.hide(), c === "y" && a.length < o.len) for (let e of a) {
|
|
669
|
+
let { plotX: t, plotY: n, zone: r } = e, a = r && i[i.indexOf(r) - 1];
|
|
670
|
+
r && v(r, t, n), a && v(a, t, n);
|
|
671
|
+
}
|
|
672
|
+
let m = [], _ = f.toPixels(f.getExtremes().min - g, !0);
|
|
673
|
+
i.forEach((e) => {
|
|
674
|
+
let i = e.lineClip || [], a = Math.round(e.translated || 0);
|
|
675
|
+
o.reversed && i.reverse();
|
|
676
|
+
let { clip: c, simpleClip: u } = e, f = 0, h = 0, g = o.len, v = s.len;
|
|
677
|
+
p ? (f = a, g = _) : (h = a, v = _);
|
|
678
|
+
let y = [
|
|
679
|
+
[
|
|
680
|
+
"M",
|
|
681
|
+
f,
|
|
682
|
+
h
|
|
683
|
+
],
|
|
684
|
+
[
|
|
685
|
+
"L",
|
|
686
|
+
g,
|
|
687
|
+
h
|
|
688
|
+
],
|
|
689
|
+
[
|
|
690
|
+
"L",
|
|
691
|
+
g,
|
|
692
|
+
v
|
|
693
|
+
],
|
|
694
|
+
[
|
|
695
|
+
"L",
|
|
696
|
+
f,
|
|
697
|
+
v
|
|
698
|
+
],
|
|
699
|
+
["Z"]
|
|
700
|
+
], b = [
|
|
701
|
+
y[0],
|
|
702
|
+
...i,
|
|
703
|
+
y[1],
|
|
704
|
+
y[2],
|
|
705
|
+
...m,
|
|
706
|
+
y[3],
|
|
707
|
+
y[4]
|
|
708
|
+
];
|
|
709
|
+
m = i.reverse(), _ = a, l && (n(b), t && n(y)), c ? (c.animate({ d: b }), u?.animate({ d: y })) : (c = e.clip = d.path(b), t && (u = e.simpleClip = d.path(y))), r && e.graph?.clip(c), t && e.area?.clip(u);
|
|
710
|
+
});
|
|
711
|
+
} else e.visible && (r && r.show(), t && t.show());
|
|
712
|
+
}
|
|
713
|
+
plotGroup(e, t, n, r, i) {
|
|
714
|
+
let a = this[e], o = !a, s = {
|
|
715
|
+
visibility: n,
|
|
716
|
+
zIndex: r || .1
|
|
717
|
+
};
|
|
718
|
+
return j(this.opacity) && !this.chart.styledMode && this.state !== "inactive" && (s.opacity = this.opacity), a || (this[e] = a = this.chart.renderer.g().add(i)), a.addClass("highcharts-" + t + " highcharts-series-" + this.index + " highcharts-" + this.type + "-series " + (j(this.colorIndex) ? "highcharts-color-" + this.colorIndex + " " : "") + (this.options.className || "") + (a.hasClass("highcharts-tracker") ? " highcharts-tracker" : ""), !0), a.attr(s)[o ? "attr" : "animate"](this.getPlotBox(t)), a;
|
|
719
|
+
}
|
|
720
|
+
getPlotBox(e) {
|
|
721
|
+
let t = this.xAxis, n = this.yAxis, r = this.chart, i = r.inverted && !r.polar && t && this.invertible && e === "series";
|
|
722
|
+
r.inverted && (t = n, n = this.xAxis);
|
|
723
|
+
let a = {
|
|
724
|
+
scale: 1,
|
|
725
|
+
translateX: t ? t.left : r.plotLeft,
|
|
726
|
+
translateY: n ? n.top : r.plotTop,
|
|
727
|
+
name: e
|
|
728
|
+
};
|
|
729
|
+
o(this, "getPlotBox", a);
|
|
730
|
+
let { scale: s, translateX: c, translateY: l } = a;
|
|
731
|
+
return {
|
|
732
|
+
translateX: c,
|
|
733
|
+
translateY: l,
|
|
734
|
+
rotation: i ? 90 : 0,
|
|
735
|
+
rotationOriginX: i ? s * (t.len - n.len) / 2 : 0,
|
|
736
|
+
rotationOriginY: i ? s * (t.len + n.len) / 2 : 0,
|
|
737
|
+
scaleX: i ? -s : s,
|
|
738
|
+
scaleY: s
|
|
739
|
+
};
|
|
740
|
+
}
|
|
741
|
+
removeEvents(e) {
|
|
742
|
+
let { eventsToUnbind: t } = this;
|
|
743
|
+
e || k(this), t.length &&= (t.forEach((e) => {
|
|
744
|
+
e();
|
|
745
|
+
}), 0);
|
|
746
|
+
}
|
|
747
|
+
render() {
|
|
748
|
+
let e = this, { chart: t, options: n, hasRendered: r } = e, i = O(n.animation), a = e.visible ? "inherit" : "hidden", s = n.zIndex, c = t.seriesGroup, l = e.finishedAnimating ? 0 : i.duration;
|
|
749
|
+
o(this, "render"), t.plotClipInner && (e.plotClipGroup ||= t.renderer.g().add(c)), e.plotGroup("group", "series", a, s, e.plotClipGroup || c), e.markerGroup = e.plotGroup("markerGroup", "markers", a, s, c), n.clip !== !1 && e.setClip(), l && e.animate?.(!0), e.drawGraph && (e.drawGraph(), e.applyZones()), e.visible && e.drawPoints(), e.drawDataLabels?.(), e.redrawPoints?.(), n.enableMouseTracking && e.drawTracker?.(), l && e.animate?.(), r || (l && i.defer && (l += i.defer), e.animationTimeout = g(() => {
|
|
750
|
+
e.afterAnimate();
|
|
751
|
+
}, l || 0)), e.isDirty = !1, e.hasRendered = !0, o(e, "afterRender");
|
|
752
|
+
}
|
|
753
|
+
redraw() {
|
|
754
|
+
let e = this.isDirty || this.isDirtyData;
|
|
755
|
+
this.translate(), this.render(), e && delete this.kdTree, this.condemnedPoints.length = 0;
|
|
756
|
+
}
|
|
757
|
+
reserveSpace() {
|
|
758
|
+
return this.visible || !this.chart.options.chart.ignoreHiddenSeries;
|
|
759
|
+
}
|
|
760
|
+
searchPoint(e, t) {
|
|
761
|
+
let { xAxis: n, yAxis: r } = this, i = this.chart.inverted;
|
|
762
|
+
return this.searchKDTree({
|
|
763
|
+
clientX: i ? n.len - e.chartY + n.pos : e.chartX - n.pos,
|
|
764
|
+
plotY: i ? r.len - e.chartX + r.pos : e.chartY - r.pos
|
|
765
|
+
}, t, e);
|
|
766
|
+
}
|
|
767
|
+
buildKDTree(e) {
|
|
768
|
+
this.buildingKdTree = !0;
|
|
769
|
+
let t = this, n = t.options, r = (n.findNearestPointBy ?? "").indexOf("y") > -1 ? 2 : 1;
|
|
770
|
+
function i(e, n, r) {
|
|
771
|
+
let a = e?.length, o, s;
|
|
772
|
+
if (a) return o = t.kdAxisArray[n % r], e.sort((e, t) => (e[o] || 0) - (t[o] || 0)), s = Math.floor(a / 2), {
|
|
773
|
+
point: e[s],
|
|
774
|
+
left: i(e.slice(0, s), n + 1, r),
|
|
775
|
+
right: i(e.slice(s + 1), n + 1, r)
|
|
776
|
+
};
|
|
777
|
+
}
|
|
778
|
+
function a() {
|
|
779
|
+
t.kdTree = i(t.getValidPoints(void 0, !t.directTouch, n?.nullInteraction), r, r), t.buildingKdTree = !1;
|
|
780
|
+
}
|
|
781
|
+
delete t.kdTree, g(a, n.kdNow || e?.type === "touchstart" ? 0 : 1);
|
|
782
|
+
}
|
|
783
|
+
searchKDTree(e, t, n, r, i) {
|
|
784
|
+
let a = this, [o, s] = this.kdAxisArray, c = t ? "distX" : "dist", l = (a.options.findNearestPointBy || "").indexOf("y") > -1 ? 2 : 1, u = !!a.isBubble, d = r || ((e, t, n) => {
|
|
785
|
+
let r = e[n] || 0, i = t[n] || 0;
|
|
786
|
+
return [r === i && e.index > t.index || r < i ? e : t, !1];
|
|
787
|
+
}), f = i || ((e, t) => e < t);
|
|
788
|
+
function p(e, t) {
|
|
789
|
+
let n = e[o], r = t[o], i = j(n) && j(r) ? n - r : null, a = e[s], c = t[s], l = j(a) && j(c) ? a - c : 0, d = u && t.marker?.radius || 0;
|
|
790
|
+
t.dist = Math.sqrt((i && i * i || 0) + l * l) - d, t.distX = j(i) ? Math.abs(i) - d : Number.MAX_VALUE;
|
|
791
|
+
}
|
|
792
|
+
function m(e, t, n, r) {
|
|
793
|
+
let i = t.point, o = a.kdAxisArray[n % r], s = i, l = !1;
|
|
794
|
+
p(e, i);
|
|
795
|
+
let h = (e[o] || 0) - (i[o] || 0) + (u && i.marker?.radius || 0), g = h < 0 ? "left" : "right", _ = h < 0 ? "right" : "left";
|
|
796
|
+
if (t[g] && ([s, l] = d(i, m(e, t[g], n + 1, r), c)), t[_]) {
|
|
797
|
+
let i = Math.sqrt(h * h), a = s[c];
|
|
798
|
+
f(i, a, l) && (s = d(s, m(e, t[_], n + 1, r), c)[0]);
|
|
799
|
+
}
|
|
800
|
+
return s;
|
|
801
|
+
}
|
|
802
|
+
if (!this.kdTree && !this.buildingKdTree && this.buildKDTree(n), this.kdTree) return m(e, this.kdTree, l, l);
|
|
803
|
+
}
|
|
804
|
+
pointPlacementToXValue() {
|
|
805
|
+
let { options: e, xAxis: t } = this, n = e.pointPlacement;
|
|
806
|
+
return n === "between" && (n = t.reversed ? -.5 : .5), m(n) ? n * (e.pointRange || t.pointRange) : 0;
|
|
807
|
+
}
|
|
808
|
+
isPointInside(e) {
|
|
809
|
+
let { chart: t, xAxis: n, yAxis: r } = this, { plotX: i = -1, plotY: a = -1 } = e;
|
|
810
|
+
return a >= 0 && a <= (r ? r.len : t.plotHeight) && i >= 0 && i <= (n ? n.len : t.plotWidth);
|
|
811
|
+
}
|
|
812
|
+
drawTracker() {
|
|
813
|
+
let e = this, t = e.options, n = t.trackByArea, r = [].concat((n ? e.areaPath : e.graphPath) || []), i = e.chart, a = i.pointer, s = i.renderer, c = i.options.tooltip?.snap || 0, l = () => {
|
|
814
|
+
t.enableMouseTracking && i.hoverSeries !== e && e.onMouseOver();
|
|
815
|
+
}, u = "rgba(192,192,192," + (ne ? 1e-4 : .002) + ")", d = e.tracker;
|
|
816
|
+
d ? d.attr({ d: r }) : e.graph && (e.tracker = d = s.path(r).attr({
|
|
817
|
+
visibility: e.visible ? "inherit" : "hidden",
|
|
818
|
+
zIndex: 2
|
|
819
|
+
}).addClass(n ? "highcharts-tracker-area" : "highcharts-tracker-line").add(e.group), i.styledMode || d.attr({
|
|
820
|
+
"stroke-linecap": "round",
|
|
821
|
+
"stroke-linejoin": "round",
|
|
822
|
+
stroke: u,
|
|
823
|
+
fill: n ? u : "none",
|
|
824
|
+
"stroke-width": e.graph.strokeWidth() + (n ? 0 : 2 * c)
|
|
825
|
+
}), [
|
|
826
|
+
e.tracker,
|
|
827
|
+
e.markerGroup,
|
|
828
|
+
...e.dataLabelsGroups || []
|
|
829
|
+
].forEach((e) => {
|
|
830
|
+
e && (e.addClass("highcharts-tracker").on("mouseover", l).on("mouseout", (e) => {
|
|
831
|
+
a?.onTrackerMouseOut(e);
|
|
832
|
+
}), t.cursor && !i.styledMode && e.css({ cursor: t.cursor }), e.on("touchstart", l));
|
|
833
|
+
})), o(this, "afterDrawTracker");
|
|
834
|
+
}
|
|
835
|
+
addPoint(e, t, n, r, i) {
|
|
836
|
+
let a = this, s = a.options, { chart: c, data: l, dataTable: d, xAxis: f } = a, p = f?.hasNames && f.names, m = s.data, h = a.getColumn("x"), g, _;
|
|
837
|
+
t = u(t, !0);
|
|
838
|
+
let { applyOptions: v, optionsToObject: y } = a.pointClass.prototype, b = { series: a }, x = y.call(b, e);
|
|
839
|
+
v.call(b, x, void 0, !1);
|
|
840
|
+
let S = b.x;
|
|
841
|
+
if (_ = h.length, a.requireSorting && S < h[_ - 1]) for (g = !0; _ && h[_ - 1] > S;) _--;
|
|
842
|
+
d.setRow(x, _, !0), this.xColumn?.splice(_, 0, this.getX(S)), p && b.name && (p[S] = b.name), m?.splice(_, 0, e), (g || a.hasProcessedDataTable) && (a.data.splice(_, 0, null), a.processData()), s.legendType === "point" && a.generatePoints(), n && (l[0] && l[0].remove ? l[0].remove(!1) : ([
|
|
843
|
+
l,
|
|
844
|
+
m,
|
|
845
|
+
this.xColumn
|
|
846
|
+
].filter(j).forEach((e) => {
|
|
847
|
+
e.shift();
|
|
848
|
+
}), d.deleteRows(0))), i !== !1 && o(a, "addPoint", { point: b }), a.isDirty = !0, a.isDirtyData = !0, t && c.redraw(r);
|
|
849
|
+
}
|
|
850
|
+
removePoint(e, t, n) {
|
|
851
|
+
let r = this, { chart: i, data: a, points: o, dataTable: s } = r, c = a[e], l = function() {
|
|
852
|
+
[
|
|
853
|
+
o?.length === a.length ? o : void 0,
|
|
854
|
+
a,
|
|
855
|
+
r.options.data,
|
|
856
|
+
r.xColumn
|
|
857
|
+
].filter(j).forEach((t) => {
|
|
858
|
+
t.splice(e, 1);
|
|
859
|
+
}), s.deleteRows(e), s.modified = s, c?.destroy(), r.isDirty = !0, r.isDirtyData = !0, t && i.redraw();
|
|
860
|
+
};
|
|
861
|
+
C(n, i), t = u(t, !0), c ? c.firePointEvent("remove", null, l) : l();
|
|
862
|
+
}
|
|
863
|
+
remove(e, t, n, r) {
|
|
864
|
+
let i = this, a = i.chart;
|
|
865
|
+
function s() {
|
|
866
|
+
i.destroy(r), a.isDirtyLegend = a.isDirtyBox = !0, a.linkSeries(r), u(e, !0) && a.redraw(t);
|
|
867
|
+
}
|
|
868
|
+
n === !1 ? s() : o(i, "remove", null, s);
|
|
869
|
+
}
|
|
870
|
+
update(e, n) {
|
|
871
|
+
e = t(e, this.userOptions), o(this, "update", { options: e });
|
|
872
|
+
let i = this, s = i.chart, c = i.userOptions, l = i.initialType || i.type, d = s.options.plotOptions, f = Y[l].prototype, p = [
|
|
873
|
+
"dataLabelsGroup",
|
|
874
|
+
"dataLabelsGroups",
|
|
875
|
+
"dataLabelsParentGroups",
|
|
876
|
+
"group",
|
|
877
|
+
"markerGroup",
|
|
878
|
+
"plotClipGroup",
|
|
879
|
+
"transformGroup"
|
|
880
|
+
], m = [
|
|
881
|
+
"dataGrouping",
|
|
882
|
+
"pointStart",
|
|
883
|
+
"pointInterval",
|
|
884
|
+
"pointIntervalUnit",
|
|
885
|
+
"keys"
|
|
886
|
+
], h = i.finishedAnimating && { animation: !1 }, g = {}, _ = e.data || e.dataTable, v, y, b = r.keepProps.slice(), x = e.type || c.type || s.options.chart.type, S = !(this.hasDerivedData || x && x !== this.type || e.keys !== void 0 || e.pointStart !== void 0 || e.pointInterval !== void 0 || e.relativeXValue !== void 0 || e.joinBy || e.mapData || m.some((e) => i.hasOptionChanged(e)));
|
|
887
|
+
x ||= l, S ? (b.push.apply(b, r.keepPropsForPoints), e.visible !== !1 && (b.push("area", "graph"), "zones" in e || b.push("zones")), i.parallelArrays.forEach(function(e) {
|
|
888
|
+
b.push(e + "Data");
|
|
889
|
+
}), _ && (e.dataSorting && w(i.options.dataSorting, e.dataSorting), this.setData(_, !1))) : this.dataTable.modified = this.dataTable, e.dataLabels && c.dataLabels && (e.dataLabels = this.mergeArrays(c.dataLabels, e.dataLabels)), e = a(c, {
|
|
890
|
+
index: c.index === void 0 ? i.index : c.index,
|
|
891
|
+
pointStart: d?.series?.pointStart ?? c.pointStart
|
|
892
|
+
}, !S && { data: i.options.data }, e, h), S && e.data && (e.data = i.options.data), b = p.concat(b), b.forEach(function(e) {
|
|
893
|
+
b[e] = i[e], delete i[e];
|
|
894
|
+
});
|
|
895
|
+
let C = !1;
|
|
896
|
+
if (Y[x]) {
|
|
897
|
+
if (C = x !== i.type, i.remove(!1, !1, !1, !0), C) {
|
|
898
|
+
if (s.propFromSeries(), Object.setPrototypeOf) Object.setPrototypeOf(i, Y[x].prototype);
|
|
899
|
+
else {
|
|
900
|
+
let e = Object.hasOwnProperty.call(i, "hcEvents") && i.hcEvents;
|
|
901
|
+
for (y in f) i[y] = void 0;
|
|
902
|
+
w(i, Y[x].prototype), e ? i.hcEvents = e : delete i.hcEvents;
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
} else A(17, !0, s, { missingModuleFor: x });
|
|
906
|
+
if (b.forEach(function(e) {
|
|
907
|
+
i[e] = b[e];
|
|
908
|
+
}), i.init(s, e), S && this.points) {
|
|
909
|
+
v = i.options, v.visible === !1 ? (g.graphic = 1, g.dataLabel = 1) : (this.hasMarkerChanged(v, c) && (g.graphic = 1), i.hasDataLabels?.() || (g.dataLabel = 1));
|
|
910
|
+
for (let e of this.points) e?.series && (e.resolveColor(), Object.keys(g).length && e.destroyElements(g), v.showInLegend === !1 && e.legendItem && s.legend.destroyItem(e));
|
|
911
|
+
}
|
|
912
|
+
i.initialType = l, s.linkSeries(), C && i.linkedSeries.length && (i.isDirtyData = !0), o(this, "afterUpdate"), u(n, !0) && s.redraw(S ? void 0 : !1);
|
|
913
|
+
}
|
|
914
|
+
setName(e) {
|
|
915
|
+
this.name = this.options.name = this.userOptions.name = e, this.chart.isDirtyLegend = !0;
|
|
916
|
+
}
|
|
917
|
+
hasOptionChanged(e) {
|
|
918
|
+
let t = this.chart, n = this.options[e], r = t.options.plotOptions, i = this.userOptions[e], a = u(r?.[this.type]?.[e], r?.series?.[e]);
|
|
919
|
+
return i && !j(a) ? n !== i : n !== u(a, n);
|
|
920
|
+
}
|
|
921
|
+
onMouseOver() {
|
|
922
|
+
let e = this, t = e.chart, n = t.hoverSeries;
|
|
923
|
+
t.pointer?.setHoverChartIndex(), n && n !== e && n.onMouseOut(), o(e, "mouseOver"), e.setState("hover"), t.hoverSeries = e;
|
|
924
|
+
}
|
|
925
|
+
onMouseOut() {
|
|
926
|
+
let e = this, t = e.chart, n = t.tooltip, r = t.hoverPoint;
|
|
927
|
+
t.hoverSeries = null, r && r.onMouseOut(), o(e, "mouseOut"), n && !e.stickyTracking && (!n.shared || e.noSharedTooltip) && n.hide(), t.series.forEach(function(e) {
|
|
928
|
+
e.setState("", !0);
|
|
929
|
+
});
|
|
930
|
+
}
|
|
931
|
+
setState(e, t) {
|
|
932
|
+
let n = this, { graph: r, options: i } = n, { inactiveOtherPoints: a, states: o = {} } = i, s = u(o[e || "normal"]?.animation, n.chart.options.chart.animation), { lineWidth: c, opacity: l } = i;
|
|
933
|
+
if (e ||= "", n.state !== e && ([
|
|
934
|
+
n.group,
|
|
935
|
+
n.markerGroup,
|
|
936
|
+
...n.dataLabelsGroups || []
|
|
937
|
+
].forEach(function(t) {
|
|
938
|
+
t && (n.state && t.removeClass("highcharts-series-" + n.state), e && t.addClass("highcharts-series-" + e));
|
|
939
|
+
}), n.state = e, !n.chart.styledMode)) {
|
|
940
|
+
if (o[e]?.enabled === !1) return;
|
|
941
|
+
if (e && (c = o[e]?.lineWidth ?? (m(c) ? c + (o?.[e]?.lineWidthPlus || 0) : void 0), l = o[e]?.opacity ?? l), r && !r.dashstyle && m(c)) for (let e of [r, ...this.zones.map((e) => e.graph)]) e?.animate({ "stroke-width": c }, s);
|
|
942
|
+
a || [
|
|
943
|
+
n.group,
|
|
944
|
+
n.markerGroup,
|
|
945
|
+
...n.dataLabelsGroups || [],
|
|
946
|
+
n.labelBySeries
|
|
947
|
+
].forEach(function(e) {
|
|
948
|
+
e?.animate({ opacity: l }, s);
|
|
949
|
+
});
|
|
950
|
+
}
|
|
951
|
+
t && a && n.points && n.setAllPointsToState(e || void 0);
|
|
952
|
+
}
|
|
953
|
+
setAllPointsToState(e) {
|
|
954
|
+
this.points.forEach((t) => t.setState?.(e));
|
|
955
|
+
}
|
|
956
|
+
setVisible(e, t) {
|
|
957
|
+
let n = this, r = n.chart, i = r.options.chart.ignoreHiddenSeries, a = n.visible;
|
|
958
|
+
n.visible = e = n.options.visible = n.userOptions.visible = e === void 0 ? !a : e;
|
|
959
|
+
let s = e ? "show" : "hide";
|
|
960
|
+
[
|
|
961
|
+
"group",
|
|
962
|
+
"markerGroup",
|
|
963
|
+
"tracker",
|
|
964
|
+
"tt"
|
|
965
|
+
].forEach((e) => {
|
|
966
|
+
n[e]?.[s]();
|
|
967
|
+
}), n.dataLabelsGroups?.forEach((e) => {
|
|
968
|
+
e?.[s]();
|
|
969
|
+
}), (r.hoverSeries === n || r.hoverPoint?.series === n) && n.onMouseOut(), n.legendItem && r.legend.colorizeItem(n, e), n.isDirty = !0, n.options.stacking && r.series.forEach((e) => {
|
|
970
|
+
e.options.stacking && e.visible && (e.isDirty = !0);
|
|
971
|
+
}), n.linkedSeries.forEach((t) => {
|
|
972
|
+
t.setVisible(e, !1);
|
|
973
|
+
}), i && (r.isDirtyBox = !0), o(n, s), t !== !1 && r.redraw();
|
|
974
|
+
}
|
|
975
|
+
show() {
|
|
976
|
+
this.setVisible(!0);
|
|
977
|
+
}
|
|
978
|
+
hide() {
|
|
979
|
+
this.setVisible(!1);
|
|
980
|
+
}
|
|
981
|
+
select(e) {
|
|
982
|
+
let t = this;
|
|
983
|
+
t.selected = e = this.options.selected = e === void 0 ? !t.selected : e, t.checkbox && (t.checkbox.checked = e), o(t, e ? "select" : "unselect");
|
|
984
|
+
}
|
|
985
|
+
shouldShowTooltip(e, t, n = {}) {
|
|
986
|
+
return n.series = this, n.visiblePlotOnly = !0, this.chart.isInsidePlot(e, t, n);
|
|
987
|
+
}
|
|
988
|
+
drawLegendSymbol(e, t) {
|
|
989
|
+
let n = this.chart.renderer, r = this.options.legendSymbol || "rectangle", i = t.legendItem || {}, { options: a, symbolHeight: o, symbolWidth: s } = e, c = a.squareSymbol, l = c ? o : s, u = c ? (s - o) / 2 : 0, d = (e.baseline || 0) - o + 1, f = l, p = o, m = a.symbolRadius ?? o, h = r === "rectangle" ? n.rect(u, d, f, p, m) : n.symbols[r] && n.symbol(r, u, d, f, p, { r: m });
|
|
990
|
+
h ? i.symbol = h.addClass("highcharts-point").attr({ zIndex: 3 }).add(i.group) : K[r]?.call(this, e, t);
|
|
991
|
+
}
|
|
992
|
+
};
|
|
993
|
+
X.defaultOptions = q, X.types = I.seriesTypes, X.registerType = I.registerSeriesType, X.keepProps = [
|
|
994
|
+
"colorIndex",
|
|
995
|
+
"eventOptions",
|
|
996
|
+
"navigatorSeries",
|
|
997
|
+
"symbolIndex",
|
|
998
|
+
"baseSeries"
|
|
999
|
+
], X.keepPropsForPoints = [
|
|
1000
|
+
"data",
|
|
1001
|
+
"isDirtyData",
|
|
1002
|
+
"isDirtyCanvas",
|
|
1003
|
+
"points",
|
|
1004
|
+
"condemnedPoints",
|
|
1005
|
+
"dataTable",
|
|
1006
|
+
"hasProcessedDataTable",
|
|
1007
|
+
"xIncrement",
|
|
1008
|
+
"cropped",
|
|
1009
|
+
"_hasPointMarkers",
|
|
1010
|
+
"hasDataLabels",
|
|
1011
|
+
"nodes",
|
|
1012
|
+
"layout",
|
|
1013
|
+
"level",
|
|
1014
|
+
"mapMap",
|
|
1015
|
+
"mapData",
|
|
1016
|
+
"minY",
|
|
1017
|
+
"maxY",
|
|
1018
|
+
"minX",
|
|
1019
|
+
"maxX",
|
|
1020
|
+
"transformGroups"
|
|
1021
|
+
], w(X.prototype, {
|
|
1022
|
+
axisTypes: ["xAxis", "yAxis"],
|
|
1023
|
+
coll: "series",
|
|
1024
|
+
colorCounter: 0,
|
|
1025
|
+
directTouch: !1,
|
|
1026
|
+
invertible: !0,
|
|
1027
|
+
isCartesian: !0,
|
|
1028
|
+
kdAxisArray: ["clientX", "plotY"],
|
|
1029
|
+
parallelArrays: ["x", "y"],
|
|
1030
|
+
pointClass: P,
|
|
1031
|
+
requireSorting: !0,
|
|
1032
|
+
sorted: !0
|
|
1033
|
+
}), I.series = X;
|
|
1034
|
+
//#endregion
|
|
1035
|
+
//#region node_modules/highcharts/es-modules/Core/Axis/Stacking/StackItem.js
|
|
1036
|
+
var { format: ae } = F, { series: oe } = I, se = class {
|
|
1037
|
+
constructor(e, t, n, r, i) {
|
|
1038
|
+
let a = e.chart.inverted, o = e.reversed;
|
|
1039
|
+
this.axis = e;
|
|
1040
|
+
let s = this.isNegative = !!n != !!o;
|
|
1041
|
+
this.options = t ||= {}, this.x = r, this.total = null, this.cumulative = null, this.points = {}, this.hasValidPoints = !1, this.stack = i, this.leftCliff = 0, this.rightCliff = 0, this.alignOptions = {
|
|
1042
|
+
align: t.align || (a ? s ? "left" : "right" : "center"),
|
|
1043
|
+
verticalAlign: t.verticalAlign || (a ? "middle" : s ? "bottom" : "top"),
|
|
1044
|
+
y: t.y,
|
|
1045
|
+
x: t.x
|
|
1046
|
+
}, this.textAlign = t.textAlign || (a ? s ? "right" : "left" : "center");
|
|
1047
|
+
}
|
|
1048
|
+
destroy() {
|
|
1049
|
+
p(this, this.axis);
|
|
1050
|
+
}
|
|
1051
|
+
render(e) {
|
|
1052
|
+
let t = this.axis.chart, n = this.options, r = n.format, i = (r ? ae(r, this, t) : n.formatter?.call(this, this)) || "";
|
|
1053
|
+
if (this.label) this.label.attr({
|
|
1054
|
+
text: i,
|
|
1055
|
+
visibility: "hidden"
|
|
1056
|
+
});
|
|
1057
|
+
else {
|
|
1058
|
+
this.label = t.renderer.label(i, null, void 0, n.shape, void 0, void 0, n.useHTML, !1, "stack-labels");
|
|
1059
|
+
let r = {
|
|
1060
|
+
r: n.borderRadius || 0,
|
|
1061
|
+
text: i,
|
|
1062
|
+
padding: u(n.padding, 5),
|
|
1063
|
+
visibility: "hidden"
|
|
1064
|
+
};
|
|
1065
|
+
t.styledMode || (r.fill = n.backgroundColor, r.stroke = n.borderColor, r["stroke-width"] = n.borderWidth, this.label.css(n.style || {})), this.label.attr(r), this.label.added || this.label.add(e);
|
|
1066
|
+
}
|
|
1067
|
+
this.label.labelrank = t.plotSizeY, o(this, "afterRender");
|
|
1068
|
+
}
|
|
1069
|
+
setOffset(e, t, n, r, i, a) {
|
|
1070
|
+
let { alignOptions: c, axis: l, label: d, options: f, textAlign: p } = this, h = l.chart, g = this.getStackBox({
|
|
1071
|
+
xOffset: e,
|
|
1072
|
+
width: t,
|
|
1073
|
+
boxBottom: n,
|
|
1074
|
+
boxTop: r,
|
|
1075
|
+
defaultX: i,
|
|
1076
|
+
xAxis: a
|
|
1077
|
+
}), { verticalAlign: _ } = c;
|
|
1078
|
+
if (d && g) {
|
|
1079
|
+
let e = d.getBBox(void 0, 0), t = d.padding, n = u(f.overflow, "justify") === "justify", r;
|
|
1080
|
+
c.x = f.x || 0, c.y = f.y || 0;
|
|
1081
|
+
let { x: i, y: a } = this.adjustStackPosition({
|
|
1082
|
+
labelBox: e,
|
|
1083
|
+
verticalAlign: _,
|
|
1084
|
+
textAlign: p
|
|
1085
|
+
});
|
|
1086
|
+
g.x -= i, g.y -= a, d.align(c, !1, g), r = h.isInsidePlot(d.alignAttr.x + c.x + i, d.alignAttr.y + c.y + a), r || (n = !1), n && oe.prototype.justifyDataLabel.call(l, d, c, d.alignAttr, e, g), d.attr({
|
|
1087
|
+
x: d.alignAttr.x,
|
|
1088
|
+
y: d.alignAttr.y,
|
|
1089
|
+
rotation: f.rotation,
|
|
1090
|
+
rotationOriginX: e.width * s(f.textAlign || "center"),
|
|
1091
|
+
rotationOriginY: e.height / 2
|
|
1092
|
+
}), u(!n && f.crop, !0) && (r = m(d.x) && m(d.y) && h.isInsidePlot(d.x - t + (d.width || 0), d.y) && h.isInsidePlot(d.x + t, d.y)), d[r ? "show" : "hide"]();
|
|
1093
|
+
}
|
|
1094
|
+
o(this, "afterSetOffset", {
|
|
1095
|
+
xOffset: e,
|
|
1096
|
+
width: t
|
|
1097
|
+
});
|
|
1098
|
+
}
|
|
1099
|
+
adjustStackPosition({ labelBox: e, verticalAlign: t, textAlign: n }) {
|
|
1100
|
+
return {
|
|
1101
|
+
x: e.width / 2 + e.width / 2 * (2 * s(n) - 1),
|
|
1102
|
+
y: e.height / 2 * 2 * (1 - s(t))
|
|
1103
|
+
};
|
|
1104
|
+
}
|
|
1105
|
+
getStackBox(e) {
|
|
1106
|
+
let t = this, n = this.axis, r = n.chart, { boxTop: i, defaultX: a, xOffset: o, width: s, boxBottom: c } = e, l = n.stacking.usePercentage ? 100 : u(i, this.total, 0), d = n.toPixels(l), f = e.xAxis || r.xAxis[0], p = u(a, f.translate(this.x)) + o, h = n.toPixels(c || m(n.min) && n.logarithmic && n.logarithmic.lin2log(n.min) || 0), g = Math.abs(d - h), _ = r.inverted, v = t.isNegative;
|
|
1107
|
+
return _ ? {
|
|
1108
|
+
x: (v ? d : d - g) - r.plotLeft,
|
|
1109
|
+
y: f.height - p - s + f.top - r.plotTop,
|
|
1110
|
+
width: g,
|
|
1111
|
+
height: s
|
|
1112
|
+
} : {
|
|
1113
|
+
x: p + f.transB - r.plotLeft,
|
|
1114
|
+
y: (v ? d - g : d) - r.plotTop,
|
|
1115
|
+
width: s,
|
|
1116
|
+
height: g
|
|
1117
|
+
};
|
|
1118
|
+
}
|
|
1119
|
+
}, ce = {
|
|
1120
|
+
borderRadius: 3,
|
|
1121
|
+
centerInCategory: !1,
|
|
1122
|
+
groupPadding: .2,
|
|
1123
|
+
marker: null,
|
|
1124
|
+
pointPadding: .1,
|
|
1125
|
+
minPointLength: 0,
|
|
1126
|
+
cropThreshold: 50,
|
|
1127
|
+
pointRange: null,
|
|
1128
|
+
states: {
|
|
1129
|
+
hover: {
|
|
1130
|
+
halo: !1,
|
|
1131
|
+
brightness: .2
|
|
1132
|
+
},
|
|
1133
|
+
select: {
|
|
1134
|
+
color: "var(--highcharts-neutral-color-20)",
|
|
1135
|
+
borderColor: "var(--highcharts-neutral-color-100)"
|
|
1136
|
+
}
|
|
1137
|
+
},
|
|
1138
|
+
dataLabels: {
|
|
1139
|
+
align: void 0,
|
|
1140
|
+
verticalAlign: void 0,
|
|
1141
|
+
y: void 0
|
|
1142
|
+
},
|
|
1143
|
+
startFromThreshold: !0,
|
|
1144
|
+
stickyTracking: !1,
|
|
1145
|
+
tooltip: { distance: 6 },
|
|
1146
|
+
threshold: 0,
|
|
1147
|
+
borderColor: "var(--highcharts-background-color)"
|
|
1148
|
+
}, { parse: le } = D, { noop: ue } = T, Z = class extends X {
|
|
1149
|
+
animate(e) {
|
|
1150
|
+
let t = this, n = this.yAxis, r = n.pos, i = n.reversed, a = t.options, { clipOffset: o, inverted: s } = this.chart, c = {}, l = s ? "translateX" : "translateY", u, d;
|
|
1151
|
+
e && o ? (c.scaleY = .001, d = M(n.toPixels(a.threshold || 0), r, r + n.len), s ? (d += i ? -Math.floor(o[+!!s]) : Math.ceil(o[s ? 3 : 2]), c.translateX = d - n.len) : (d += i ? Math.ceil(o[+!!s]) : -Math.floor(o[s ? 3 : 2]), c.translateY = d), t.clipBox && t.setClip(), t.group.attr(c)) : (u = Number(t.group.attr(l)), t.group.animate({ scaleY: 1 }, w(O(t.options.animation), { step: function(e, n) {
|
|
1152
|
+
t.group && (c[l] = u + n.pos * (r - u), t.group.attr(c));
|
|
1153
|
+
} })));
|
|
1154
|
+
}
|
|
1155
|
+
init(e, t) {
|
|
1156
|
+
super.init.apply(this, arguments);
|
|
1157
|
+
let n = this;
|
|
1158
|
+
e = n.chart, e.hasRendered && e.series.forEach(function(e) {
|
|
1159
|
+
e.type === n.type && (e.isDirty = !0);
|
|
1160
|
+
});
|
|
1161
|
+
}
|
|
1162
|
+
getColumnMetrics() {
|
|
1163
|
+
let e = this, t = e.options, n = e.xAxis, r = e.yAxis, i = n.options.reversedStacks, a = n.reversed && !i || !n.reversed && i, o = {}, s, c = 0;
|
|
1164
|
+
t.grouping === !1 ? c = 1 : e.chart.series.forEach(function(t) {
|
|
1165
|
+
let n = t.yAxis, i = t.options, a;
|
|
1166
|
+
t.type === e.type && t.reserveSpace() && r.len === n.len && r.pos === n.pos && (i.stacking && i.stacking !== "group" ? (s = t.stackKey, o[s] === void 0 && (o[s] = c++), a = o[s]) : i.grouping !== !1 && (a = c++), t.columnIndex = a);
|
|
1167
|
+
});
|
|
1168
|
+
let l = Math.min(Math.abs(n.transA) * (!n.brokenAxis?.hasBreaks && n.ordinal?.slope || t.pointRange || n.closestPointRange || n.tickInterval || 1), n.len), d = l * t.groupPadding, f = (l - 2 * d) / (c || 1), p = Math.min(t.maxPointWidth || n.len, u(t.pointWidth, f * (1 - 2 * t.pointPadding)));
|
|
1169
|
+
return e.columnMetrics = {
|
|
1170
|
+
width: p,
|
|
1171
|
+
offset: (f - p) / 2 + (d + ((e.columnIndex || 0) + +!!a) * f - l / 2) * (a ? -1 : 1),
|
|
1172
|
+
paddedWidth: f,
|
|
1173
|
+
columnCount: c
|
|
1174
|
+
}, e.columnMetrics;
|
|
1175
|
+
}
|
|
1176
|
+
crispCol(e, t, n, r) {
|
|
1177
|
+
let i = this.borderWidth, a = this.chart.inverted, o = f(t + r, i, a);
|
|
1178
|
+
if (t = f(t, i, a), r = o - t, this.options.crisp) {
|
|
1179
|
+
let t = f(e + n, i);
|
|
1180
|
+
e = f(e, i), n = t - e;
|
|
1181
|
+
}
|
|
1182
|
+
return {
|
|
1183
|
+
x: e,
|
|
1184
|
+
y: t,
|
|
1185
|
+
width: n,
|
|
1186
|
+
height: r
|
|
1187
|
+
};
|
|
1188
|
+
}
|
|
1189
|
+
adjustForMissingColumns(e, t, n, r) {
|
|
1190
|
+
if (!n.isNull && r.columnCount > 1) {
|
|
1191
|
+
let a = this.xAxis.series.filter((e) => e.visible).map((e) => e.index), o = 0, s = 0;
|
|
1192
|
+
i(this.xAxis.stacking?.stacks, (e) => {
|
|
1193
|
+
let t = typeof n.x == "number" ? e[n.x.toString()]?.points : void 0, r = t?.[this.index], i = {};
|
|
1194
|
+
if (t && N(r)) {
|
|
1195
|
+
let e = this.index, n = Object.keys(t).filter((e) => !e.match(",") && t[e] && t[e].length > 1).map(parseFloat).filter((e) => a.indexOf(e) !== -1).filter((t) => {
|
|
1196
|
+
let n = this.chart.series[t].options, r = n.stacking && n.stack;
|
|
1197
|
+
if (j(r)) {
|
|
1198
|
+
if (m(i[r])) return e === t && (e = i[r]), !1;
|
|
1199
|
+
i[r] = t;
|
|
1200
|
+
}
|
|
1201
|
+
return !0;
|
|
1202
|
+
}).sort((e, t) => t - e);
|
|
1203
|
+
o = n.indexOf(e), s = n.length;
|
|
1204
|
+
}
|
|
1205
|
+
}), o = this.xAxis.reversed ? s - 1 - o : o;
|
|
1206
|
+
let c = (s - 1) * r.paddedWidth + t;
|
|
1207
|
+
e = (n.plotX || 0) + c / 2 - t - o * r.paddedWidth;
|
|
1208
|
+
}
|
|
1209
|
+
return e;
|
|
1210
|
+
}
|
|
1211
|
+
translate() {
|
|
1212
|
+
let e = this, t = e.chart, n = e.options, r = e.dense = e.closestPointRange * e.xAxis.transA < 2, i = e.borderWidth = n.borderWidth ?? +!r, a = e.xAxis, s = e.yAxis, c = n.threshold, l = n.minPointLength ?? 5, u = e.getColumnMetrics(), d = u.width, f = e.pointXOffset = u.offset, p = e.dataMin, h = e.dataMax, g = e.translatedThreshold = s.getThreshold(c), _ = e.barW = Math.max(d, 1 + 2 * i);
|
|
1213
|
+
n.pointPadding && n.crisp && (_ = Math.ceil(_)), X.prototype.translate.apply(e), e.points.concat(e.condemnedPoints).forEach(function(r) {
|
|
1214
|
+
let i = r.yBottom ?? g, o = 999 + Math.abs(i), v = r.plotX || 0, y = M(r.plotY, -o, s.len + o), b, x = Math.min(y, i), S = Math.max(y, i) - x, C = d, w = v + f, T = _;
|
|
1215
|
+
l && Math.abs(S) < l && (S = l, b = !s.reversed && !r.negative || s.reversed && r.negative, m(c) && m(h) && r.y === c && h <= c && (s.min || 0) < c && (p !== h || (s.max || 0) <= c) && (b = !b, r.negative = !r.negative), x = Math.abs(x - g) > l ? i - (b ? l : 0) : g - (b ? l : 0)), j(r.options.pointWidth) && (C = T = Math.ceil(r.options.pointWidth), w -= Math.round((C - d) / 2)), n.centerInCategory && (w = e.adjustForMissingColumns(w, C, r, u)), r.barX = w, r.pointWidth = C, r.tooltipPos = t.inverted ? [
|
|
1216
|
+
M(s.len + s.pos - t.plotLeft - y, s.pos - t.plotLeft, s.len + s.pos - t.plotLeft),
|
|
1217
|
+
a.len + a.pos - t.plotTop - w - T / 2,
|
|
1218
|
+
S
|
|
1219
|
+
] : [
|
|
1220
|
+
a.left - t.plotLeft + w + T / 2,
|
|
1221
|
+
M(y + s.pos - t.plotTop, s.pos - t.plotTop, s.len + s.pos - t.plotTop),
|
|
1222
|
+
S
|
|
1223
|
+
], r.shapeType = e.pointClass.prototype.shapeType || "roundedRect", r.shapeArgs = e.crispCol(w, x, T, r.isNull ? 0 : S);
|
|
1224
|
+
}), o(this, "afterColumnTranslate");
|
|
1225
|
+
}
|
|
1226
|
+
drawGraph() {
|
|
1227
|
+
this.group[this.dense ? "addClass" : "removeClass"]("highcharts-dense-data");
|
|
1228
|
+
}
|
|
1229
|
+
pointAttribs(e, t) {
|
|
1230
|
+
let n = this.options, r = this.pointAttrToOptions || {}, i = r.stroke || "borderColor", o = r["stroke-width"] || "borderWidth", s, c, l, u = e?.color || this.color, d = e?.[i] || n[i] || u, f = e?.options.dashStyle || n.dashStyle, p = e?.[o] ?? n[o] ?? this[o] ?? 1, m = e?.isNull && n.nullInteraction ? 0 : e?.opacity ?? n.opacity ?? 1;
|
|
1231
|
+
e && this.zones.length && (c = e.getZone(), u = e.options.color || c && (c.color || e.nonZonedColor) || this.color, c && (d = c.borderColor || d, f = c.dashStyle || f, p = c.borderWidth || p)), t && e && (s = a(n.states?.[t], e.options.states?.[t] || {}), l = s.brightness, u = s.color || l !== void 0 && le(u).brighten(s.brightness).get() || u, d = s[i] || d, p = s[o] || p, f = s.dashStyle || f, m = s.opacity ?? m);
|
|
1232
|
+
let h = {
|
|
1233
|
+
fill: u,
|
|
1234
|
+
stroke: d,
|
|
1235
|
+
"stroke-width": p,
|
|
1236
|
+
opacity: e?.condemned ? 0 : m
|
|
1237
|
+
};
|
|
1238
|
+
return f && (h.dashstyle = f), h;
|
|
1239
|
+
}
|
|
1240
|
+
drawPoints(e) {
|
|
1241
|
+
e ||= this.points.concat(this.condemnedPoints);
|
|
1242
|
+
let t = this, n = this.chart, r = t.options, i = r.nullInteraction, { styledMode: o, renderer: s } = n, c = r.animationLimit || 250, l;
|
|
1243
|
+
e.forEach(function(e) {
|
|
1244
|
+
let u = e.plotY, d = e.graphic, f = !!d, p = d && n.pointCount < c ? "animate" : "attr";
|
|
1245
|
+
if (m(u) && (e.y !== null || i)) {
|
|
1246
|
+
if (l = e.shapeArgs, d && e.hasNewShapeType() && (d = d.destroy()), !d) {
|
|
1247
|
+
let r = l;
|
|
1248
|
+
e.origin && n.pointCount < c && (r = a(l, e.getOrigin(e.origin, l)), o || (r.opacity = 0, r["stroke-width"] = 0), f = !0, p = "animate"), e.graphic = d = s[e.shapeType](r).add(e.group || t.group);
|
|
1249
|
+
}
|
|
1250
|
+
f && d[p](a(l)), o || d[p](t.pointAttribs(e, e.selected ? "select" : "")).shadow(e.allowShadow !== !1 && r.shadow), d.addClass(e.getClassName(), !0).attr({ visibility: e.visible ? "inherit" : "hidden" });
|
|
1251
|
+
} else d && (e.graphic = d.destroy());
|
|
1252
|
+
});
|
|
1253
|
+
}
|
|
1254
|
+
drawTracker(e = this.points) {
|
|
1255
|
+
let t = this, n = t.chart, r = n.pointer, i = function(e) {
|
|
1256
|
+
r?.normalize(e);
|
|
1257
|
+
let i = r?.getPointFromEvent(e);
|
|
1258
|
+
r && i && t.options.enableMouseTracking && (n.isInsidePlot(e.chartX - n.plotLeft, e.chartY - n.plotTop, { visiblePlotOnly: !0 }) || t.allowOutsidePlotInteraction && r?.inClass(e.target, "highcharts-point") || r?.inClass(e.target, "highcharts-data-label")) && (r.isDirectTouch = !0, i.onMouseOver(e));
|
|
1259
|
+
}, a;
|
|
1260
|
+
e.forEach(function(e) {
|
|
1261
|
+
a = N(e.dataLabels) ? e.dataLabels : e.dataLabel ? [e.dataLabel] : [], e.graphic && (e.graphic.element.point = e), a.forEach(function(t) {
|
|
1262
|
+
(t.div || t.element).point = e;
|
|
1263
|
+
});
|
|
1264
|
+
}), t._hasTracking ||= (t.trackerGroups?.reduce((e, n) => (n === "dataLabelsGroup" ? e.push(...t.dataLabelsGroups || []) : e.push(t[n]), e), []).forEach((e) => {
|
|
1265
|
+
e && (e.addClass("highcharts-tracker").on("mouseover", i).on("mouseout", function(e) {
|
|
1266
|
+
r?.onTrackerMouseOut(e);
|
|
1267
|
+
}).on("touchstart", i), !n.styledMode && t.options.cursor && e.css({ cursor: t.options.cursor }));
|
|
1268
|
+
}), !0), o(this, "afterDrawTracker");
|
|
1269
|
+
}
|
|
1270
|
+
remove() {
|
|
1271
|
+
let e = this, t = e.chart;
|
|
1272
|
+
t.hasRendered && t.series.forEach(function(t) {
|
|
1273
|
+
t.type === e.type && (t.isDirty = !0);
|
|
1274
|
+
}), X.prototype.remove.apply(e, arguments);
|
|
1275
|
+
}
|
|
1276
|
+
};
|
|
1277
|
+
Z.defaultOptions = a(X.defaultOptions, ce), w(Z.prototype, {
|
|
1278
|
+
directTouch: !0,
|
|
1279
|
+
getSymbol: ue,
|
|
1280
|
+
negStacks: !0,
|
|
1281
|
+
trackerGroups: ["group", "dataLabelsGroup"]
|
|
1282
|
+
}), I.registerSeriesType("column", Z);
|
|
1283
|
+
//#endregion
|
|
1284
|
+
//#region node_modules/highcharts/es-modules/Series/CenteredUtilities.js
|
|
1285
|
+
var { deg2rad: Q } = T, $;
|
|
1286
|
+
(function(e) {
|
|
1287
|
+
function t() {
|
|
1288
|
+
let e = this.options, t = this.chart, n = 2 * (e.slicedOffset || 0), r = t.plotWidth - 2 * n, i = t.plotHeight - 2 * n, a = e.center, s = Math.min(r, i), c = e.thickness, l, d = e.size, f = e.innerSize || 0, p, h;
|
|
1289
|
+
typeof d == "string" && (d = parseFloat(d)), typeof f == "string" && (f = parseFloat(f));
|
|
1290
|
+
let g = [
|
|
1291
|
+
u(a?.[0], "50%"),
|
|
1292
|
+
u(a?.[1], "50%"),
|
|
1293
|
+
u(d && d < 0 ? void 0 : e.size, "100%"),
|
|
1294
|
+
u(f && f < 0 ? void 0 : e.innerSize || 0, "0%")
|
|
1295
|
+
];
|
|
1296
|
+
for (p = 0; p < 4; ++p) h = g[p], l = p < 2 || p === 2 && /%$/.test(h), g[p] = b(h, [
|
|
1297
|
+
r,
|
|
1298
|
+
i,
|
|
1299
|
+
s,
|
|
1300
|
+
g[2]
|
|
1301
|
+
][p]) + (l ? n : 0);
|
|
1302
|
+
return g[3] > g[2] && (g[3] = g[2]), m(c) && c * 2 < g[2] && c > 0 && (g[3] = g[2] - c * 2), o(this, "afterGetCenter", { positions: g }), g;
|
|
1303
|
+
}
|
|
1304
|
+
e.getCenter = t;
|
|
1305
|
+
function n(e, t) {
|
|
1306
|
+
let n = m(e) ? e : 0, r = m(t) && t > n && t - n < 360 ? t : n + 360;
|
|
1307
|
+
return {
|
|
1308
|
+
start: Q * (n + -90),
|
|
1309
|
+
end: Q * (r + -90)
|
|
1310
|
+
};
|
|
1311
|
+
}
|
|
1312
|
+
e.getStartAndEndRadians = n;
|
|
1313
|
+
})($ ||= {});
|
|
1314
|
+
var de = $;
|
|
1315
|
+
//#endregion
|
|
1316
|
+
export { K as a, X as i, Z as n, W as o, se as r, z as s, de as t };
|