@dpuse/dpuse-tool-highcharts-visualiser 0.0.76
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/LICENSE +21 -0
- package/README.md +329 -0
- package/dist/AnimationUtilities-Bby2idBR.js +1176 -0
- package/dist/AnimationUtilities-Bby2idBR.js.map +1 -0
- package/dist/BorderRadius-2zMZW_aK.js +1445 -0
- package/dist/BorderRadius-2zMZW_aK.js.map +1 -0
- package/dist/SVGElement-BmvC_qu3.js +394 -0
- package/dist/SVGElement-BmvC_qu3.js.map +1 -0
- package/dist/SeriesRegistry-0cj0ZJqn.js +374 -0
- package/dist/SeriesRegistry-0cj0ZJqn.js.map +1 -0
- package/dist/TextPath-DK4Jkzd7.js +133 -0
- package/dist/TextPath-DK4Jkzd7.js.map +1 -0
- package/dist/dependency-wheel.src-BHmwx9rW.js +194 -0
- package/dist/dependency-wheel.src-BHmwx9rW.js.map +1 -0
- package/dist/dpuse-tool-highcharts-visualiser.es.js +10154 -0
- package/dist/dpuse-tool-highcharts-visualiser.es.js.map +1 -0
- package/dist/highchartsMoreCustom-CcpfmVny.js +1110 -0
- package/dist/highchartsMoreCustom-CcpfmVny.js.map +1 -0
- package/dist/pattern-fill.src-BPmr3DQg.js +169 -0
- package/dist/pattern-fill.src-BPmr3DQg.js.map +1 -0
- package/dist/sankey.src-DocCurOx.js +524 -0
- package/dist/sankey.src-DocCurOx.js.map +1 -0
- package/dist/streamgraph.src-Bn6PY8Fd.js +19 -0
- package/dist/streamgraph.src-Bn6PY8Fd.js.map +1 -0
- package/dist/types/eslint.config.d.ts +3 -0
- package/dist/types/src/highchartsMoreCustom.d.ts +2 -0
- package/dist/types/src/index.d.ts +18 -0
- package/dist/types/tests/highchartsMoreCustom.test.d.ts +1 -0
- package/dist/types/tests/importIndex.test.d.ts +1 -0
- package/dist/types/vite.config.d.ts +2 -0
- package/dist/types/vitest.config.d.ts +2 -0
- package/package.json +75 -0
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
import { B as e, D as t, E as n, G as r, H as i, I as a, N as o, Q as s, T as c, U as l, V as u, Y as d, _ as f, a as p, b as m, et as h, f as g, h as _, k as v, n as y, ot as b, rt as x, s as S, u as C, v as w, y as T, z as E } from "./AnimationUtilities-Bby2idBR.js";
|
|
2
|
+
//#region node_modules/highcharts/es-modules/Core/Renderer/HTML/AST.js
|
|
3
|
+
var { SVG_NS: D, win: O } = b, { trustedTypes: k } = O, A = k && E(k.createPolicy) && k.createPolicy("highcharts", { createHTML: (e) => e }), j = A ? A.createHTML("") : "", M = class e {
|
|
4
|
+
static filterUserAttributes(t) {
|
|
5
|
+
return r(t, (n, r) => {
|
|
6
|
+
let a = !0;
|
|
7
|
+
e.allowedAttributes.indexOf(r) === -1 && (a = !1), [
|
|
8
|
+
"background",
|
|
9
|
+
"dynsrc",
|
|
10
|
+
"href",
|
|
11
|
+
"lowsrc",
|
|
12
|
+
"src"
|
|
13
|
+
].indexOf(r) !== -1 && (a = i(n) && e.allowedReferences.some((e) => n.indexOf(e) === 0)), a || (S(33, !1, void 0, { "Invalid attribute in config": `${r}` }), delete t[r]), i(n) && t[r] && (t[r] = n.replace(/</g, "<"));
|
|
14
|
+
}), t;
|
|
15
|
+
}
|
|
16
|
+
static parseStyle(e) {
|
|
17
|
+
return e.split(";").reduce((e, t) => {
|
|
18
|
+
let n = t.split(":").map((e) => e.trim()), r = n.shift();
|
|
19
|
+
return r && n.length && (e[r.replace(/-([a-z])/g, (e) => e[1].toUpperCase())] = n.join(":")), e;
|
|
20
|
+
}, {});
|
|
21
|
+
}
|
|
22
|
+
static setElementHTML(t, n) {
|
|
23
|
+
t.innerHTML = e.emptyHTML, n && new e(n).addToDOM(t);
|
|
24
|
+
}
|
|
25
|
+
constructor(e) {
|
|
26
|
+
this.nodes = typeof e == "string" ? this.parseMarkup(e) : e;
|
|
27
|
+
}
|
|
28
|
+
addToDOM(t) {
|
|
29
|
+
function n(t, i) {
|
|
30
|
+
let a;
|
|
31
|
+
return h(t).forEach(function(t) {
|
|
32
|
+
let o = t.tagName, s = t.textContent ? b.doc.createTextNode(t.textContent) : void 0, c = e.bypassHTMLFiltering, l;
|
|
33
|
+
if (o) if (o === "#text") l = s;
|
|
34
|
+
else if (e.allowedTags.indexOf(o) !== -1 || c) {
|
|
35
|
+
let a = o === "svg" ? D : i.namespaceURI || D, u = b.doc.createElementNS(a, o), d = t.attributes || {};
|
|
36
|
+
r(t, function(e, t) {
|
|
37
|
+
t !== "tagName" && t !== "attributes" && t !== "children" && t !== "style" && t !== "textContent" && (d[t] = e);
|
|
38
|
+
}), _(u, c ? d : e.filterUserAttributes(d)), t.style && m(u, t.style), s && u.appendChild(s), n(t.children || [], u), l = u;
|
|
39
|
+
} else S(33, !1, void 0, { "Invalid tagName in config": o });
|
|
40
|
+
l && i.appendChild(l), a = l;
|
|
41
|
+
}), a;
|
|
42
|
+
}
|
|
43
|
+
return n(this.nodes, t);
|
|
44
|
+
}
|
|
45
|
+
parseMarkup(t) {
|
|
46
|
+
let n = [];
|
|
47
|
+
t = t.trim().replace(/ style=(["'])/g, " data-style=$1");
|
|
48
|
+
let r;
|
|
49
|
+
try {
|
|
50
|
+
r = new DOMParser().parseFromString(A ? A.createHTML(t) : t, "text/html");
|
|
51
|
+
} catch {}
|
|
52
|
+
if (!r) {
|
|
53
|
+
let e = w("div");
|
|
54
|
+
e.innerHTML = t, r = { body: e };
|
|
55
|
+
}
|
|
56
|
+
let i = (t, n) => {
|
|
57
|
+
let r = t.nodeName.toLowerCase(), a = { tagName: r };
|
|
58
|
+
r === "#text" && (a.textContent = t.textContent || "");
|
|
59
|
+
let o = t.attributes;
|
|
60
|
+
if (o) {
|
|
61
|
+
let t = {};
|
|
62
|
+
[].forEach.call(o, (n) => {
|
|
63
|
+
n.name === "data-style" ? a.style = e.parseStyle(n.value) : t[n.name] = n.value;
|
|
64
|
+
}), a.attributes = t;
|
|
65
|
+
}
|
|
66
|
+
if (t.childNodes.length) {
|
|
67
|
+
let e = [];
|
|
68
|
+
[].forEach.call(t.childNodes, (t) => {
|
|
69
|
+
i(t, e);
|
|
70
|
+
}), e.length && (a.children = e);
|
|
71
|
+
}
|
|
72
|
+
n.push(a);
|
|
73
|
+
};
|
|
74
|
+
return [].forEach.call(r.body.childNodes, (e) => i(e, n)), n;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
M.allowedAttributes = /* @__PURE__ */ "alt.aria-controls.aria-describedby.aria-expanded.aria-haspopup.aria-hidden.aria-label.aria-labelledby.aria-live.aria-pressed.aria-readonly.aria-roledescription.aria-selected.aria-sort.class.clip-path.color.colspan.cx.cy.d.disabled.dx.dy.fill.filterUnits.flood-color.flood-opacity.height.href.id.in.in2.markerHeight.markerWidth.offset.opacity.operator.orient.padding.paddingLeft.paddingRight.patternUnits.r.radius.refX.refY.result.role.rowspan.scope.slope.src.startOffset.stdDeviation.stroke-linecap.stroke-width.stroke.style.summary.tabindex.tableValues.target.text-align.text-anchor.textAnchor.textLength.title.type.valign.width.x.x1.x2.xlink:href.y.y1.y2.zIndex".split("."), M.allowedReferences = [
|
|
78
|
+
"https://",
|
|
79
|
+
"http://",
|
|
80
|
+
"mailto:",
|
|
81
|
+
"/",
|
|
82
|
+
"../",
|
|
83
|
+
"./",
|
|
84
|
+
"#"
|
|
85
|
+
], M.allowedTags = /* @__PURE__ */ "#text.a.abbr.b.br.button.caption.circle.clipPath.code.dd.defs.div.dl.dt.em.feComponentTransfer.feComposite.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feMerge.feMergeNode.feMorphology.feOffset.filter.h1.h2.h3.h4.h5.h6.hr.i.img.li.linearGradient.marker.ol.p.path.pattern.pre.rect.small.span.stop.strong.style.sub.sup.svg.table.tbody.td.text.textPath.th.thead.title.tr.tspan.u.ul".split("."), M.emptyHTML = j, M.bypassHTMLFiltering = !1;
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region node_modules/highcharts/es-modules/Core/Templating.js
|
|
88
|
+
var { defaultOptions: N, defaultTime: P } = p, { pageLang: F } = b, I = {
|
|
89
|
+
add: (e, t) => e + t,
|
|
90
|
+
divide: (e, t) => t === 0 ? "" : f(e / t),
|
|
91
|
+
eq: (e, t) => e == t,
|
|
92
|
+
each: function(e) {
|
|
93
|
+
let t = arguments[arguments.length - 1];
|
|
94
|
+
return a(e) ? e.map((r, i) => B(t.body, n(u(r) ? r : { "@this": r }, {
|
|
95
|
+
"@index": i,
|
|
96
|
+
"@first": i === 0,
|
|
97
|
+
"@last": i === e.length - 1
|
|
98
|
+
}))).join("") : !1;
|
|
99
|
+
},
|
|
100
|
+
ge: (e, t) => e >= t,
|
|
101
|
+
gt: (e, t) => e > t,
|
|
102
|
+
if: (e) => !!e,
|
|
103
|
+
le: (e, t) => e <= t,
|
|
104
|
+
lt: (e, t) => e < t,
|
|
105
|
+
multiply: (e, t) => f(e * t, 15),
|
|
106
|
+
ne: (e, t) => e != t,
|
|
107
|
+
subtract: (e, t) => e - t,
|
|
108
|
+
ucfirst: x,
|
|
109
|
+
unless: (e) => !e
|
|
110
|
+
}, L = {}, R = (e) => /^["'].+["']$/.test(e);
|
|
111
|
+
function z(e, t, n) {
|
|
112
|
+
return P.dateFormat(e, t, n);
|
|
113
|
+
}
|
|
114
|
+
function B(e = "", t, n) {
|
|
115
|
+
let r = /\{([^{}]+)\}/g, a = /\(([^()]+)\)/g, s = [], c = /f$/, l = /\.(\d)/, u = n?.options?.lang || N.lang, f = n?.time || P, p = n?.numberFormatter || V.bind(n), m = (e = "") => {
|
|
116
|
+
let n;
|
|
117
|
+
return e === "true" ? !0 : e === "false" ? !1 : (n = Number(e)).toString() === e ? n : R(e) ? e.slice(1, -1) : o(e, t);
|
|
118
|
+
}, h, g, _ = 0, v;
|
|
119
|
+
for (; (h = r.exec(e)) !== null;) {
|
|
120
|
+
let n = h, r = a.exec(h[1]);
|
|
121
|
+
r && (h = r, v = !0), g?.isBlock || (g = {
|
|
122
|
+
ctx: t,
|
|
123
|
+
expression: h[1],
|
|
124
|
+
find: h[0],
|
|
125
|
+
isBlock: h[1].charAt(0) === "#",
|
|
126
|
+
start: h.index,
|
|
127
|
+
startInner: h.index + h[0].length,
|
|
128
|
+
length: h[0].length
|
|
129
|
+
});
|
|
130
|
+
let i = (g.isBlock ? n : h)[1].split(" ")[0].replace("#", "");
|
|
131
|
+
I[i] && (g.isBlock && i === g.fn && _++, g.fn || (g.fn = i));
|
|
132
|
+
let o = h[1] === "else";
|
|
133
|
+
if (g.isBlock && g.fn && (h[1] === `/${g.fn}` || o)) if (_) o || _--;
|
|
134
|
+
else {
|
|
135
|
+
let t = g.startInner, n = e.substr(t, h.index - t);
|
|
136
|
+
g.body === void 0 ? (g.body = n, g.startInner = h.index + h[0].length) : g.elseBody = n, g.find += n + h[0], o || (s.push(g), g = void 0);
|
|
137
|
+
}
|
|
138
|
+
else g.isBlock || s.push(g);
|
|
139
|
+
if (r && !g?.isBlock) break;
|
|
140
|
+
}
|
|
141
|
+
return s.forEach((r) => {
|
|
142
|
+
let { body: o, elseBody: s, expression: h, fn: g } = r, _, v;
|
|
143
|
+
if (g) {
|
|
144
|
+
let e = [r], i = [], a = h.length, c = 0, l;
|
|
145
|
+
for (v = 0; v <= a; v++) {
|
|
146
|
+
let e = h.charAt(v);
|
|
147
|
+
!l && (e === "\"" || e === "'") ? l = e : l === e && (l = ""), !l && (e === " " || v === a) && (i.push(h.substr(c, v - c)), c = v + 1);
|
|
148
|
+
}
|
|
149
|
+
for (v = I[g].length; v--;) e.unshift(m(i[v + 1]));
|
|
150
|
+
_ = I[g].apply(t, e), r.isBlock && typeof _ == "boolean" && (_ = B(_ ? o : s, t, n));
|
|
151
|
+
} else {
|
|
152
|
+
let e = R(h) ? [h] : h.split(":");
|
|
153
|
+
if (_ = m(e.shift() || ""), e.length && typeof _ == "number") {
|
|
154
|
+
let t = e.join(":");
|
|
155
|
+
if (c.test(t)) {
|
|
156
|
+
let e = parseInt((t.match(l) || ["", "-1"])[1], 10);
|
|
157
|
+
_ !== null && (_ = p(_, e, u.decimalPoint, t.indexOf(",") > -1 ? u.thousandsSep : ""));
|
|
158
|
+
} else _ = f.dateFormat(t, _);
|
|
159
|
+
}
|
|
160
|
+
a.lastIndex = 0, a.test(r.find) && i(_) && (_ = `"${_}"`);
|
|
161
|
+
}
|
|
162
|
+
e = e.replace(r.find, d(_, ""));
|
|
163
|
+
}), v ? B(e, t, n) : e;
|
|
164
|
+
}
|
|
165
|
+
function V(t, n, r, i) {
|
|
166
|
+
t = +t || 0, n = +n;
|
|
167
|
+
let a, o, [s, c] = t.toString().split("e").map(Number), l = this?.options?.lang || N.lang, u = (t.toString().split(".")[1] || "").split("e")[0].length, d = n, f = {};
|
|
168
|
+
r ??= l.decimalPoint, i ??= l.thousandsSep, n === -1 ? n = Math.min(u, 20) : e(n) ? n && c < 0 && (o = n + c, o >= 0 ? (s = +s.toExponential(o).split("e")[0], n = o) : (s = Math.floor(s), t = n < 20 ? +(s * 10 ** c).toFixed(n) : 0, c = 0)) : n = 2, c && (n ??= 2, t = s), e(n) && n >= 0 && (f.minimumFractionDigits = n, f.maximumFractionDigits = n), i === "" && (f.useGrouping = !1);
|
|
169
|
+
let p = i || r, m = p ? "en" : this?.locale || l.locale || F, h = JSON.stringify(f) + m;
|
|
170
|
+
return a = (L[h] ?? (L[h] = new Intl.NumberFormat(m, f))).format(t), p && (a = a.replace(/([,\.])/g, "_$1").replace(/_\,/g, i ?? ",").replace("_.", r ?? ".")), (!n && +a == 0 || c < 0 && !d) && (a = "0"), c && +a != 0 && (a += "e" + (c < 0 ? "" : "+") + c), a;
|
|
171
|
+
}
|
|
172
|
+
var H = {
|
|
173
|
+
dateFormat: z,
|
|
174
|
+
format: B,
|
|
175
|
+
helpers: I,
|
|
176
|
+
numberFormat: V
|
|
177
|
+
}, { animObject: U } = y, { defaultOptions: W } = p, { format: G } = H, K = class t {
|
|
178
|
+
constructor(e, t, n) {
|
|
179
|
+
this.formatPrefix = "point", this.visible = !0, this.point = this, this.series = e, this.applyOptions(t, n), this.id ??= C(), this.resolveColor(), this.dataLabelOnNull ??= e.options.nullInteraction, e.chart.pointCount++, this.category = e.xAxis?.categories?.[this.x] ?? this.x, this.key = this.name ?? this.category, v(this, "afterInit");
|
|
180
|
+
}
|
|
181
|
+
applyOptions(r, i, a) {
|
|
182
|
+
let o = this, s = o.series, c = s.options.pointValKey || s.pointValKey;
|
|
183
|
+
return r = t.prototype.optionsToObject.call(this, r), n(o, r), o.options = o.options ? s.chart.options.chart.allowMutatingData ? n(o.options, r) : l(o.options, r) : r, c && (o.y = t.prototype.getNestedProperty.call(o, c)), e(i) && (o.x = i), a || (o.selected && (o.state = "select"), r.group && delete o.group, r.dataLabels && delete o.dataLabels, o.isNull = o.isValid && !o.isValid(), o.formatPrefix = o.isNull ? "null" : "point"), o;
|
|
184
|
+
}
|
|
185
|
+
getOrigin({ x: e = 0, y: t = 0 }, n = {}) {
|
|
186
|
+
let { graphic: r, series: i } = this;
|
|
187
|
+
if (i.chart.inverted && r?.parentGroup && !r?.parentGroup?.rotation) {
|
|
188
|
+
let n = this.pos(!1, e, t);
|
|
189
|
+
n && (e = n[0], t = n[1]);
|
|
190
|
+
}
|
|
191
|
+
e -= (n.width || 0) / 2, t -= (n.height || 0) / 2;
|
|
192
|
+
let a = { x: e };
|
|
193
|
+
return !i.is("column") && !this.plotHigh && (a.y = t), a;
|
|
194
|
+
}
|
|
195
|
+
destroy() {
|
|
196
|
+
if (!this.condemned) {
|
|
197
|
+
let e = this, t = e.series, n = t.chart, r = n.hoverPoints, i = e.series.chart.renderer.globalAnimation, { duration: a } = U(i), o = () => {
|
|
198
|
+
(e.graphic || e.graphics || e.dataLabel || e.dataLabels) && (s(e), e.destroyElements());
|
|
199
|
+
for (let t in e) delete e[t];
|
|
200
|
+
};
|
|
201
|
+
e.legendItem && n.legend.destroyItem(e), r && (e.setState(), c(r, e), r.length || (n.hoverPoints = void 0)), e === n.hoverPoint && e.onMouseOut(), a && t.condemnedPoints ? (t.condemnedPoints.push(this), this.graphic?.addClass("highcharts-point-condemned"), setTimeout(o, a)) : o(), n.pointCount--;
|
|
202
|
+
}
|
|
203
|
+
this.condemned = !0;
|
|
204
|
+
}
|
|
205
|
+
destroyElements(e = {
|
|
206
|
+
graphic: 1,
|
|
207
|
+
dataLabel: 1
|
|
208
|
+
}) {
|
|
209
|
+
let t = this, n = [], r, i;
|
|
210
|
+
for (e.graphic && n.push("graphic", "connector"), e.dataLabel && n.push("dataLabel", "dataLabelPath", "dataLabelUpper"), i = n.length; i--;) r = n[i], t[r] && (t[r] = t[r].destroy());
|
|
211
|
+
["graphic", "dataLabel"].forEach((n) => {
|
|
212
|
+
let r = `${n}s`;
|
|
213
|
+
e[n] && t[r] && (t[r].forEach((e) => {
|
|
214
|
+
e?.element && e.destroy();
|
|
215
|
+
}), delete t[r]);
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
firePointEvent(e, t, n) {
|
|
219
|
+
let r = this, i = this.series.options;
|
|
220
|
+
r.manageEvent(e), e === "click" && i.allowPointSelect && (n = function(e) {
|
|
221
|
+
!r.condemned && r.select && r.select(null, e.ctrlKey || e.metaKey || e.shiftKey);
|
|
222
|
+
}), v(r, e, t, n);
|
|
223
|
+
}
|
|
224
|
+
getClassName() {
|
|
225
|
+
let e = this;
|
|
226
|
+
return "highcharts-point" + (e.selected ? " highcharts-point-select" : "") + (e.negative && e.series.options.negativeColor !== !1 ? " highcharts-negative" : "") + (e.isNull ? " highcharts-null-point" : "") + (e.colorIndex === void 0 ? "" : " highcharts-color-" + e.colorIndex) + (e.options.className ? " " + e.options.className : "") + (e.zone?.className ? " " + e.zone.className.replace("highcharts-negative", "") : "");
|
|
227
|
+
}
|
|
228
|
+
getNestedProperty(e) {
|
|
229
|
+
if (e) return e.indexOf("custom.") === 0 ? o(e, this.options) : this[e];
|
|
230
|
+
}
|
|
231
|
+
getZone() {
|
|
232
|
+
let e = this.series, t = e.zones, n = e.zoneAxis || "y", r, i = 0;
|
|
233
|
+
for (r = t[i]; this[n] >= r.value;) r = t[++i];
|
|
234
|
+
return this.nonZonedColor ||= this.color, this.color = r?.color && !this.options.color ? r.color : this.nonZonedColor, r;
|
|
235
|
+
}
|
|
236
|
+
hasNewShapeType() {
|
|
237
|
+
let e = this;
|
|
238
|
+
return (e.graphic && (e.graphic.symbolName || e.graphic.element.nodeName)) !== this.shapeType;
|
|
239
|
+
}
|
|
240
|
+
isValid() {
|
|
241
|
+
return (e(this.x) || this.x instanceof Date) && e(this.y);
|
|
242
|
+
}
|
|
243
|
+
optionsToObject(n) {
|
|
244
|
+
let r = this.series, i = r.options.keys, o = i || r.pointArrayMap || ["y"], s = o.length, c = {}, l, u = 0, d = 0;
|
|
245
|
+
if (e(n) || n === null) c[o[0]] = n;
|
|
246
|
+
else if (a(n)) for (!i && n.length > s && (l = typeof n[0], l === "string" ? r.xAxis?.dateTime ? c.x = r.chart.time.parse(n[0]) : c[r.tupleKey || "name"] = n[0] : l === "number" && (c.x = n[0]), u++); d < s;) (!i || n[u] !== void 0) && (c[o[d]] = n[u]), u++, d++;
|
|
247
|
+
else typeof n == "object" && (c = n, n.dataLabels && (r.hasDataLabels = () => !0), n.marker && (r._hasPointMarkers = !0));
|
|
248
|
+
return (i || !r.options.data) && Object.keys(c).forEach((e) => {
|
|
249
|
+
e.indexOf(".") > 0 && (t.prototype.setNestedProperty(c, c[e], e), delete c[e]);
|
|
250
|
+
}), c;
|
|
251
|
+
}
|
|
252
|
+
pos(t, n = this.plotX, r = this.plotY) {
|
|
253
|
+
let { series: i } = this, { chart: a, xAxis: o, yAxis: s } = i || {}, c = 0, l = 0;
|
|
254
|
+
if (a && e(n) && e(r)) return t && (c = o ? o.pos : a.plotLeft, l = s ? s.pos : a.plotTop), a.inverted && o && s ? [s.len - r + l, o.len - n + c] : [n + c, r + l];
|
|
255
|
+
}
|
|
256
|
+
resolveColor() {
|
|
257
|
+
let { options: e, series: t } = this, n = t.chart, r = n.options.chart, i = n.styledMode, a, o = r.colorCount, s;
|
|
258
|
+
if (delete this.nonZonedColor, t.options.colorByPoint) {
|
|
259
|
+
if (!i) {
|
|
260
|
+
let e = t.options.colors || n.options.colors;
|
|
261
|
+
a = e?.[t.colorCounter], o = e?.length;
|
|
262
|
+
}
|
|
263
|
+
s = t.colorCounter, t.colorCounter++, t.colorCounter === o && (t.colorCounter = 0);
|
|
264
|
+
} else i || (a = t.color), s = t.colorIndex;
|
|
265
|
+
this.colorIndex = e.colorIndex ?? s, this.color = e.color ?? a;
|
|
266
|
+
}
|
|
267
|
+
setNestedProperty(e, t, n) {
|
|
268
|
+
return n.split(".").reduce(function(e, n, r, i) {
|
|
269
|
+
return e[n] = i.length - 1 === r ? t : u(e[n], !0) ? e[n] : {}, e[n];
|
|
270
|
+
}, e), e;
|
|
271
|
+
}
|
|
272
|
+
shouldDraw() {
|
|
273
|
+
return !this.isNull;
|
|
274
|
+
}
|
|
275
|
+
tooltipFormatter(e) {
|
|
276
|
+
let { chart: t, pointArrayMap: n = ["y"], tooltipOptions: r } = this.series, { valueDecimals: i = "", valuePrefix: a = "", valueSuffix: o = "" } = r;
|
|
277
|
+
return t.styledMode && (e = t.tooltip?.styledModeFormat(e) || e), n.forEach((t) => {
|
|
278
|
+
t = "{point." + t, (a || o) && (e = e.replace(RegExp(t + "}", "g"), a + t + "}" + o)), e = e.replace(RegExp(t + "}", "g"), t + ":,." + i + "f}");
|
|
279
|
+
}), G(e, this, t);
|
|
280
|
+
}
|
|
281
|
+
update(e, t = !0, n, r) {
|
|
282
|
+
let a = this, o = a.series, s = a.graphic, c = o.chart, l = o.options, d = l.data;
|
|
283
|
+
function f() {
|
|
284
|
+
a.applyOptions(e);
|
|
285
|
+
let r = s && a.hasMockGraphic, f = a.index, p = a.y === null ? !r : r;
|
|
286
|
+
s && p && (a.graphic = s.destroy(), delete a.hasMockGraphic), u(e, !0) && (s?.element && e?.marker && e.marker.symbol !== void 0 && (a.graphic = s.destroy()), e?.dataLabels && a.dataLabel && (a.dataLabel = a.dataLabel.destroy()));
|
|
287
|
+
let m = a.optionsToObject(e);
|
|
288
|
+
o.hasProcessedDataTable || (o.dataTable.setRow(m, f), d && (d[f] = u(d[f], !0) || u(e, !0) ? a.options : e ?? d[f])), o.isDirty = o.isDirtyData = !0, "x" in m && (i(m.x) && (o.xColumnIsNumbers = void 0), a.x = o.getX(m.x), a.isNull = a.isValid && !a.isValid(), o.xColumn && (o.xColumn[f] = a.x)), !o.fixedBox && o.hasCartesianSeries && (c.isDirtyBox = !0), l.legendType === "point" && (c.isDirtyLegend = !0), t && c.redraw(n);
|
|
289
|
+
}
|
|
290
|
+
r === !1 ? f() : a.firePointEvent("update", { options: e }, f);
|
|
291
|
+
}
|
|
292
|
+
remove(e, t) {
|
|
293
|
+
this.series.removePoint(this.series.data.indexOf(this), e, t);
|
|
294
|
+
}
|
|
295
|
+
select(e, t) {
|
|
296
|
+
let n = this, r = n.series, i = r.chart;
|
|
297
|
+
e = d(e, !n.selected), this.selectedStaging = e, n.firePointEvent(e ? "select" : "unselect", { accumulate: t }, function() {
|
|
298
|
+
n.selected = n.options.selected = e, r.options.data && (r.options.data[r.data.indexOf(n)] = n.options), n.setState(e && "select"), t || i.getSelectedPoints().forEach(function(e) {
|
|
299
|
+
let t = e.series, r = t.options;
|
|
300
|
+
e.selected && e !== n && (e.selected = e.options.selected = !1, r.data && (r.data[t.data.indexOf(e)] = e.options), e.setState(i.hoverPoints && r.inactiveOtherPoints ? "inactive" : ""), e.firePointEvent("unselect"));
|
|
301
|
+
});
|
|
302
|
+
}), delete this.selectedStaging;
|
|
303
|
+
}
|
|
304
|
+
onMouseOver(e) {
|
|
305
|
+
let t = this, { inverted: n, pointer: r } = t.series.chart;
|
|
306
|
+
r && (e = e ? r.normalize(e) : r.getChartCoordinatesFromPoint(t, n), r.runPointActions(e, t));
|
|
307
|
+
}
|
|
308
|
+
onMouseOut() {
|
|
309
|
+
let e = this;
|
|
310
|
+
if (!e.series) return;
|
|
311
|
+
let t = e.series.chart;
|
|
312
|
+
e.firePointEvent("mouseOut"), e.series.options.inactiveOtherPoints || (t.hoverPoints || []).forEach(function(e) {
|
|
313
|
+
e.setState();
|
|
314
|
+
}), t.hoverPoints = t.hoverPoint = null;
|
|
315
|
+
}
|
|
316
|
+
manageEvent(e) {
|
|
317
|
+
let t = this, n = l(t.series.options.point, t.options).events?.[e];
|
|
318
|
+
E(n) && (!t.hcEvents?.[e] || t.hcEvents?.[e]?.map((e) => e.fn).indexOf(n) === -1) ? (t.importedUserEvent?.(), t.importedUserEvent = g(t, e, n), t.hcEvents && (t.hcEvents[e].userEvent = !0)) : t.importedUserEvent && !n && t.hcEvents?.[e] && t.hcEvents?.[e].userEvent && (s(t, e), delete t.hcEvents[e], Object.keys(t.hcEvents) || delete t.importedUserEvent);
|
|
319
|
+
}
|
|
320
|
+
setState(t, r) {
|
|
321
|
+
let i = this, a = i.series, o = i.state, s = a.options.states[t || "normal"] || {}, c = W.plotOptions[a.type].marker && a.options.marker, u = c && c.enabled === !1, f = c?.states?.[t || "normal"] || {}, p = f.enabled === !1, m = i.marker || {}, h = a.chart, g = c && a.markerAttribs, _ = a.halo, y, b, x, S = a.stateMarkerGraphic, C;
|
|
322
|
+
if (t ||= "", t === i.state && !r || i.selected && t !== "select" || s.enabled === !1 || t && (p || u && f.enabled === !1) || t && m.states && m.states[t] && m.states[t].enabled === !1) return;
|
|
323
|
+
if (i.state = t, g && (y = a.markerAttribs(i, t)), i.graphic && !i.hasMockGraphic) {
|
|
324
|
+
if (o && i.graphic.removeClass("highcharts-point-" + o), t && i.graphic.addClass("highcharts-point-" + t), !h.styledMode) {
|
|
325
|
+
b = a.pointAttribs(i, t), x = d(h.options.chart.animation, s.animation);
|
|
326
|
+
let n = b.opacity;
|
|
327
|
+
a.options.inactiveOtherPoints && e(n) && (i.dataLabels || []).forEach(function(e) {
|
|
328
|
+
e && !e.hasClass("highcharts-data-label-hidden") && (e.animate({ opacity: n }, x), e.connector && e.connector.animate({ opacity: n }, x));
|
|
329
|
+
}), i.graphic.animate(b, x);
|
|
330
|
+
}
|
|
331
|
+
y && i.graphic.animate(y, d(h.options.chart.animation, f.animation, c.animation)), S && S.hide();
|
|
332
|
+
} else t && f && (C = m.symbol || a.symbol, S && S.currentSymbol !== C && (S = S.destroy()), y && (S ? S[r ? "animate" : "attr"]({
|
|
333
|
+
x: y.x,
|
|
334
|
+
y: y.y
|
|
335
|
+
}) : C && (a.stateMarkerGraphic = S = h.renderer.symbol(C, y.x, y.y, y.width, y.height, l(c, f)).add(a.markerGroup), S.currentSymbol = C)), !h.styledMode && S && i.state !== "inactive" && S.attr(a.pointAttribs(i, t))), S && (S[t && i.isInside ? "show" : "hide"](), S.element.point = i, S.addClass(i.getClassName(), !0));
|
|
336
|
+
let w = s.halo, T = i.graphic || S, E = T?.visibility || "inherit";
|
|
337
|
+
w?.size && T && E !== "hidden" && !i.isCluster ? (_ || (a.halo = _ = h.renderer.path().add(T.parentGroup)), _.show()[r ? "animate" : "attr"]({ d: i.haloPath(w.size) }), _.attr({
|
|
338
|
+
class: "highcharts-halo highcharts-color-" + d(i.colorIndex, a.colorIndex) + (i.className ? " " + i.className : ""),
|
|
339
|
+
visibility: E,
|
|
340
|
+
zIndex: -1
|
|
341
|
+
}), _.point = i, h.styledMode || _.attr(n({
|
|
342
|
+
fill: i.color || a.color,
|
|
343
|
+
"fill-opacity": w.opacity
|
|
344
|
+
}, M.filterUserAttributes(w.attributes || {})))) : _?.point?.haloPath && !_.point.destroyed && _.animate({ d: _.point.haloPath(0) }, null, _.hide), v(i, "afterSetState", { state: t });
|
|
345
|
+
}
|
|
346
|
+
haloPath(e) {
|
|
347
|
+
let t = this.pos();
|
|
348
|
+
return t ? this.series.chart.renderer.symbols.circle(T(t[0], 1) - e, t[1] - e, e * 2, e * 2) : [];
|
|
349
|
+
}
|
|
350
|
+
}, { defaultOptions: q } = p, J;
|
|
351
|
+
(function(e) {
|
|
352
|
+
e.seriesTypes = b.seriesTypes;
|
|
353
|
+
function r(t, n) {
|
|
354
|
+
let r = q.plotOptions || {}, i = n.defaultOptions, a = n.prototype;
|
|
355
|
+
return a.type = t, a.pointClass ||= K, !e.seriesTypes[t] && (i && (r[t] = i), e.seriesTypes[t] = n, !0);
|
|
356
|
+
}
|
|
357
|
+
e.registerSeriesType = r;
|
|
358
|
+
function i(i, a, o, s, c) {
|
|
359
|
+
let u = q.plotOptions || {};
|
|
360
|
+
a ||= "", u[i] = l(u[a], o), delete e.seriesTypes[i];
|
|
361
|
+
let d = e.seriesTypes[a] || b.Series;
|
|
362
|
+
if (r(i, t(d, s)), e.seriesTypes[i].prototype.type = i, c) {
|
|
363
|
+
class t extends K {}
|
|
364
|
+
n(t.prototype, c), e.seriesTypes[i].prototype.pointClass = t;
|
|
365
|
+
}
|
|
366
|
+
return e.seriesTypes[i];
|
|
367
|
+
}
|
|
368
|
+
e.seriesType = i;
|
|
369
|
+
})(J ||= {});
|
|
370
|
+
var Y = J;
|
|
371
|
+
//#endregion
|
|
372
|
+
export { M as i, K as n, H as r, Y as t };
|
|
373
|
+
|
|
374
|
+
//# sourceMappingURL=SeriesRegistry-0cj0ZJqn.js.map
|