@record-evolution/widget-linechart 1.7.3 → 1.7.4
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/widget-linechart.js
CHANGED
|
@@ -2,9 +2,9 @@ import * as nt from "echarts/core";
|
|
|
2
2
|
import { GridComponent as Pt, TitleComponent as Mt, ToolboxComponent as Nt, TooltipComponent as Ut, LegendComponent as zt, DataZoomComponent as Rt } from "echarts/components";
|
|
3
3
|
import { LineChart as It, BarChart as Ht, ScatterChart as jt } from "echarts/charts";
|
|
4
4
|
import { UniversalTransition as kt, LegacyGridContainLabel as Bt } from "echarts/features";
|
|
5
|
-
import { CanvasRenderer as
|
|
5
|
+
import { CanvasRenderer as Zt } from "echarts/renderers";
|
|
6
6
|
import ft from "tinycolor2";
|
|
7
|
-
const G = globalThis, at = G.ShadowRoot && (G.ShadyCSS === void 0 || G.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, rt = /* @__PURE__ */ Symbol(),
|
|
7
|
+
const G = globalThis, at = G.ShadowRoot && (G.ShadyCSS === void 0 || G.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, rt = /* @__PURE__ */ Symbol(), gt = /* @__PURE__ */ new WeakMap();
|
|
8
8
|
let Tt = class {
|
|
9
9
|
constructor(t, e, s) {
|
|
10
10
|
if (this._$cssResult$ = !0, s !== rt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
@@ -15,7 +15,7 @@ let Tt = class {
|
|
|
15
15
|
const e = this.t;
|
|
16
16
|
if (at && t === void 0) {
|
|
17
17
|
const s = e !== void 0 && e.length === 1;
|
|
18
|
-
s && (t =
|
|
18
|
+
s && (t = gt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && gt.set(e, t));
|
|
19
19
|
}
|
|
20
20
|
return t;
|
|
21
21
|
}
|
|
@@ -23,7 +23,7 @@ let Tt = class {
|
|
|
23
23
|
return this.cssText;
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
-
const
|
|
26
|
+
const Wt = (o) => new Tt(typeof o == "string" ? o : o + "", void 0, rt), Vt = (o, ...t) => {
|
|
27
27
|
const e = o.length === 1 ? o[0] : t.reduce((s, i, n) => s + ((a) => {
|
|
28
28
|
if (a._$cssResult$ === !0) return a.cssText;
|
|
29
29
|
if (typeof a == "number") return a;
|
|
@@ -36,10 +36,10 @@ const Zt = (o) => new Tt(typeof o == "string" ? o : o + "", void 0, rt), Vt = (o
|
|
|
36
36
|
const s = document.createElement("style"), i = G.litNonce;
|
|
37
37
|
i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, o.appendChild(s);
|
|
38
38
|
}
|
|
39
|
-
},
|
|
39
|
+
}, yt = at ? (o) => o : (o) => o instanceof CSSStyleSheet ? ((t) => {
|
|
40
40
|
let e = "";
|
|
41
41
|
for (const s of t.cssRules) e += s.cssText;
|
|
42
|
-
return
|
|
42
|
+
return Wt(e);
|
|
43
43
|
})(o) : o;
|
|
44
44
|
const { is: Xt, defineProperty: Yt, getOwnPropertyDescriptor: Gt, getOwnPropertyNames: Kt, getOwnPropertySymbols: Ft, getPrototypeOf: Jt } = Object, J = globalThis, xt = J.trustedTypes, Qt = xt ? xt.emptyScript : "", te = J.reactiveElementPolyfillSupport, j = (o, t) => o, K = { toAttribute(o, t) {
|
|
45
45
|
switch (t) {
|
|
@@ -125,8 +125,8 @@ let O = class extends HTMLElement {
|
|
|
125
125
|
const e = [];
|
|
126
126
|
if (Array.isArray(t)) {
|
|
127
127
|
const s = new Set(t.flat(1 / 0).reverse());
|
|
128
|
-
for (const i of s) e.unshift(
|
|
129
|
-
} else t !== void 0 && e.push(
|
|
128
|
+
for (const i of s) e.unshift(yt(i));
|
|
129
|
+
} else t !== void 0 && e.push(yt(t));
|
|
130
130
|
return e;
|
|
131
131
|
}
|
|
132
132
|
static _$Eu(t, e) {
|
|
@@ -253,7 +253,7 @@ let O = class extends HTMLElement {
|
|
|
253
253
|
}
|
|
254
254
|
};
|
|
255
255
|
O.elementStyles = [], O.shadowRootOptions = { mode: "open" }, O[j("elementProperties")] = /* @__PURE__ */ new Map(), O[j("finalized")] = /* @__PURE__ */ new Map(), te?.({ ReactiveElement: O }), (J.reactiveElementVersions ??= []).push("2.1.2");
|
|
256
|
-
const lt = globalThis, vt = (o) => o, F = lt.trustedTypes, At = F ? F.createPolicy("lit-html", { createHTML: (o) => o }) : void 0, Et = "$lit$", A = `lit$${Math.random().toFixed(9).slice(2)}$`, Lt = "?" + A, ee = `<${Lt}>`, L = document, B = () => L.createComment(""),
|
|
256
|
+
const lt = globalThis, vt = (o) => o, F = lt.trustedTypes, At = F ? F.createPolicy("lit-html", { createHTML: (o) => o }) : void 0, Et = "$lit$", A = `lit$${Math.random().toFixed(9).slice(2)}$`, Lt = "?" + A, ee = `<${Lt}>`, L = document, B = () => L.createComment(""), Z = (o) => o === null || typeof o != "object" && typeof o != "function", ct = Array.isArray, ie = (o) => ct(o) || typeof o?.[Symbol.iterator] == "function", ot = `[
|
|
257
257
|
\f\r]`, H = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, bt = /-->/g, _t = />/g, T = RegExp(`>|${ot}(?:([^\\s"'>=/]+)(${ot}*=${ot}*(?:[^
|
|
258
258
|
\f\r"'\`<>=]|("|')|))|$)`, "g"), wt = /'/g, St = /"/g, Dt = /^(?:script|style|textarea|title)$/i, se = (o) => (t, ...e) => ({ _$litType$: o, strings: t, values: e }), oe = se(1), P = /* @__PURE__ */ Symbol.for("lit-noChange"), f = /* @__PURE__ */ Symbol.for("lit-nothing"), Ct = /* @__PURE__ */ new WeakMap(), E = L.createTreeWalker(L, 129);
|
|
259
259
|
function Ot(o, t) {
|
|
@@ -267,32 +267,32 @@ const ne = (o, t) => {
|
|
|
267
267
|
const r = o[l];
|
|
268
268
|
let d, h, c = -1, p = 0;
|
|
269
269
|
for (; p < r.length && (a.lastIndex = p, h = a.exec(r), h !== null); ) p = a.lastIndex, a === H ? h[1] === "!--" ? a = bt : h[1] !== void 0 ? a = _t : h[2] !== void 0 ? (Dt.test(h[2]) && (i = RegExp("</" + h[2], "g")), a = T) : h[3] !== void 0 && (a = T) : a === T ? h[0] === ">" ? (a = i ?? H, c = -1) : h[1] === void 0 ? c = -2 : (c = a.lastIndex - h[2].length, d = h[1], a = h[3] === void 0 ? T : h[3] === '"' ? St : wt) : a === St || a === wt ? a = T : a === bt || a === _t ? a = H : (a = T, i = void 0);
|
|
270
|
-
const
|
|
271
|
-
n += a === H ? r + ee : c >= 0 ? (s.push(d), r.slice(0, c) + Et + r.slice(c) + A +
|
|
270
|
+
const g = a === T && o[l + 1].startsWith("/>") ? " " : "";
|
|
271
|
+
n += a === H ? r + ee : c >= 0 ? (s.push(d), r.slice(0, c) + Et + r.slice(c) + A + g) : r + A + (c === -2 ? l : g);
|
|
272
272
|
}
|
|
273
273
|
return [Ot(o, n + (o[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
|
|
274
274
|
};
|
|
275
|
-
class
|
|
275
|
+
class W {
|
|
276
276
|
constructor({ strings: t, _$litType$: e }, s) {
|
|
277
277
|
let i;
|
|
278
278
|
this.parts = [];
|
|
279
279
|
let n = 0, a = 0;
|
|
280
280
|
const l = t.length - 1, r = this.parts, [d, h] = ne(t, e);
|
|
281
|
-
if (this.el =
|
|
281
|
+
if (this.el = W.createElement(d, s), E.currentNode = this.el.content, e === 2 || e === 3) {
|
|
282
282
|
const c = this.el.content.firstChild;
|
|
283
283
|
c.replaceWith(...c.childNodes);
|
|
284
284
|
}
|
|
285
285
|
for (; (i = E.nextNode()) !== null && r.length < l; ) {
|
|
286
286
|
if (i.nodeType === 1) {
|
|
287
287
|
if (i.hasAttributes()) for (const c of i.getAttributeNames()) if (c.endsWith(Et)) {
|
|
288
|
-
const p = h[a++],
|
|
289
|
-
r.push({ type: 1, index: n, name: x[2], strings:
|
|
288
|
+
const p = h[a++], g = i.getAttribute(c).split(A), x = /([.?@])?(.*)/.exec(p);
|
|
289
|
+
r.push({ type: 1, index: n, name: x[2], strings: g, ctor: x[1] === "." ? re : x[1] === "?" ? he : x[1] === "@" ? le : Q }), i.removeAttribute(c);
|
|
290
290
|
} else c.startsWith(A) && (r.push({ type: 6, index: n }), i.removeAttribute(c));
|
|
291
291
|
if (Dt.test(i.tagName)) {
|
|
292
292
|
const c = i.textContent.split(A), p = c.length - 1;
|
|
293
293
|
if (p > 0) {
|
|
294
294
|
i.textContent = F ? F.emptyScript : "";
|
|
295
|
-
for (let
|
|
295
|
+
for (let g = 0; g < p; g++) i.append(c[g], B()), E.nextNode(), r.push({ type: 2, index: ++n });
|
|
296
296
|
i.append(c[p], B());
|
|
297
297
|
}
|
|
298
298
|
}
|
|
@@ -312,7 +312,7 @@ class Z {
|
|
|
312
312
|
function M(o, t, e = o, s) {
|
|
313
313
|
if (t === P) return t;
|
|
314
314
|
let i = s !== void 0 ? e._$Co?.[s] : e._$Cl;
|
|
315
|
-
const n =
|
|
315
|
+
const n = Z(t) ? void 0 : t._$litDirective$;
|
|
316
316
|
return i?.constructor !== n && (i?._$AO?.(!1), n === void 0 ? i = void 0 : (i = new n(o), i._$AT(o, e, s)), s !== void 0 ? (e._$Co ??= [])[s] = i : e._$Cl = i), i !== void 0 && (t = M(o, i._$AS(o, t.values), i, s)), t;
|
|
317
317
|
}
|
|
318
318
|
class ae {
|
|
@@ -362,7 +362,7 @@ class V {
|
|
|
362
362
|
return this._$AB;
|
|
363
363
|
}
|
|
364
364
|
_$AI(t, e = this) {
|
|
365
|
-
t = M(this, t, e),
|
|
365
|
+
t = M(this, t, e), Z(t) ? t === f || t == null || t === "" ? (this._$AH !== f && this._$AR(), this._$AH = f) : t !== this._$AH && t !== P && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : ie(t) ? this.k(t) : this._(t);
|
|
366
366
|
}
|
|
367
367
|
O(t) {
|
|
368
368
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -371,10 +371,10 @@ class V {
|
|
|
371
371
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
372
372
|
}
|
|
373
373
|
_(t) {
|
|
374
|
-
this._$AH !== f &&
|
|
374
|
+
this._$AH !== f && Z(this._$AH) ? this._$AA.nextSibling.data = t : this.T(L.createTextNode(t)), this._$AH = t;
|
|
375
375
|
}
|
|
376
376
|
$(t) {
|
|
377
|
-
const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el =
|
|
377
|
+
const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = W.createElement(Ot(s.h, s.h[0]), this.options)), s);
|
|
378
378
|
if (this._$AH?._$AD === i) this._$AH.p(e);
|
|
379
379
|
else {
|
|
380
380
|
const n = new ae(i, this), a = n.u(this.options);
|
|
@@ -383,7 +383,7 @@ class V {
|
|
|
383
383
|
}
|
|
384
384
|
_$AC(t) {
|
|
385
385
|
let e = Ct.get(t.strings);
|
|
386
|
-
return e === void 0 && Ct.set(t.strings, e = new
|
|
386
|
+
return e === void 0 && Ct.set(t.strings, e = new W(t)), e;
|
|
387
387
|
}
|
|
388
388
|
k(t) {
|
|
389
389
|
ct(this._$AH) || (this._$AH = [], this._$AR());
|
|
@@ -415,11 +415,11 @@ class Q {
|
|
|
415
415
|
_$AI(t, e = this, s, i) {
|
|
416
416
|
const n = this.strings;
|
|
417
417
|
let a = !1;
|
|
418
|
-
if (n === void 0) t = M(this, t, e, 0), a = !
|
|
418
|
+
if (n === void 0) t = M(this, t, e, 0), a = !Z(t) || t !== this._$AH && t !== P, a && (this._$AH = t);
|
|
419
419
|
else {
|
|
420
420
|
const l = t;
|
|
421
421
|
let r, d;
|
|
422
|
-
for (t = n[0], r = 0; r < n.length - 1; r++) d = M(this, l[s + r], e, r), d === P && (d = this._$AH[r]), a ||= !
|
|
422
|
+
for (t = n[0], r = 0; r < n.length - 1; r++) d = M(this, l[s + r], e, r), d === P && (d = this._$AH[r]), a ||= !Z(d) || d !== this._$AH[r], d === f ? t = f : t !== f && (t += (d ?? "") + n[r + 1]), this._$AH[r] = d;
|
|
423
423
|
}
|
|
424
424
|
a && !i && this.j(t);
|
|
425
425
|
}
|
|
@@ -468,7 +468,7 @@ class ce {
|
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
470
|
const de = lt.litHtmlPolyfillSupport;
|
|
471
|
-
de?.(
|
|
471
|
+
de?.(W, V), (lt.litHtmlVersions ??= []).push("3.3.2");
|
|
472
472
|
const pe = (o, t, e) => {
|
|
473
473
|
const s = e?.renderBefore ?? t;
|
|
474
474
|
let i = s._$litPart$;
|
|
@@ -510,7 +510,7 @@ const me = (o) => (t, e) => {
|
|
|
510
510
|
customElements.define(o, t);
|
|
511
511
|
}) : customElements.define(o, t);
|
|
512
512
|
};
|
|
513
|
-
const fe = { attribute: !0, type: String, converter: K, reflect: !1, hasChanged: ht },
|
|
513
|
+
const fe = { attribute: !0, type: String, converter: K, reflect: !1, hasChanged: ht }, ge = (o = fe, t, e) => {
|
|
514
514
|
const { kind: s, metadata: i } = e;
|
|
515
515
|
let n = globalThis.litPropertyMetadata.get(i);
|
|
516
516
|
if (n === void 0 && globalThis.litPropertyMetadata.set(i, n = /* @__PURE__ */ new Map()), s === "setter" && ((o = Object.create(o)).wrapped = !0), n.set(e.name, o), s === "accessor") {
|
|
@@ -532,7 +532,7 @@ const fe = { attribute: !0, type: String, converter: K, reflect: !1, hasChanged:
|
|
|
532
532
|
throw Error("Unsupported decorator location: " + s);
|
|
533
533
|
};
|
|
534
534
|
function tt(o) {
|
|
535
|
-
return (t, e) => typeof e == "object" ?
|
|
535
|
+
return (t, e) => typeof e == "object" ? ge(o, t, e) : ((s, i, n) => {
|
|
536
536
|
const a = i.hasOwnProperty(n);
|
|
537
537
|
return i.constructor.createProperty(n, s), a ? Object.getOwnPropertyDescriptor(i, n) : void 0;
|
|
538
538
|
})(o, t, e);
|
|
@@ -540,11 +540,11 @@ function tt(o) {
|
|
|
540
540
|
function et(o) {
|
|
541
541
|
return tt({ ...o, state: !0, attribute: !1 });
|
|
542
542
|
}
|
|
543
|
-
const
|
|
543
|
+
const ye = (o, t, e) => (e.configurable = !0, e.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(o, t, e), e);
|
|
544
544
|
function xe(o, t) {
|
|
545
545
|
return (e, s, i) => {
|
|
546
546
|
const n = (a) => a.renderRoot?.querySelector(o) ?? null;
|
|
547
|
-
return
|
|
547
|
+
return ye(e, s, { get() {
|
|
548
548
|
return n(this);
|
|
549
549
|
} });
|
|
550
550
|
};
|
|
@@ -564,13 +564,13 @@ nt.use([
|
|
|
564
564
|
It,
|
|
565
565
|
Ht,
|
|
566
566
|
jt,
|
|
567
|
-
|
|
567
|
+
Zt,
|
|
568
568
|
kt,
|
|
569
569
|
Bt
|
|
570
570
|
]);
|
|
571
|
-
let
|
|
571
|
+
let y = class extends k {
|
|
572
572
|
constructor() {
|
|
573
|
-
super(), this.canvasList = /* @__PURE__ */ new Map(), this.origWidth = 0, this.origHeight = 0, this.modifier = 1, this.version = "1.7.
|
|
573
|
+
super(), this.canvasList = /* @__PURE__ */ new Map(), this.origWidth = 0, this.origHeight = 0, this.modifier = 1, this.version = "1.7.4", this.updateThresholdMs = 300, this.maxIntervalSamples = 3, this.template = {
|
|
574
574
|
title: {
|
|
575
575
|
text: "Temperature Change in the Coming Week",
|
|
576
576
|
left: "center",
|
|
@@ -752,7 +752,7 @@ let g = class extends k {
|
|
|
752
752
|
i.advanced ??= {}, i.advanced.chartName ??= "", i.data ??= [];
|
|
753
753
|
const n = [...new Set(i.data.map((r) => r.pivot ?? ""))].sort(), a = ft(i.backgroundColor).monochromatic(n.length).map((r) => r.toHexString()), l = ft(i.borderColor).monochromatic(n.length).map((r) => r.toHexString());
|
|
754
754
|
n.forEach((r, d) => {
|
|
755
|
-
const h = r ?? "", c = i.label ?? "", p = h + (h && c ? " - " : "") + c,
|
|
755
|
+
const h = r ?? "", c = i.label ?? "", p = h + (h && c ? " - " : "") + c, g = i.borderColor ? i.advanced?.chartName?.includes("#split#") ? i.borderColor : l[d] : void 0, x = i.backgroundColor ? i.advanced?.chartName?.includes("#split#") ? i.backgroundColor : a[d] : void 0, q = n.length === 1 ? i.data : i.data?.filter((u) => u.pivot === r), b = (u, S, m) => o ? [S, u, m] : [u, S, m];
|
|
756
756
|
let v = this.inputData?.axis?.timeseries ? q?.map((u) => ({
|
|
757
757
|
name: u.x,
|
|
758
758
|
value: b(new Date(u.x ?? "").getTime(), u.y, u.r)
|
|
@@ -768,14 +768,14 @@ let g = class extends k {
|
|
|
768
768
|
maxDate: U,
|
|
769
769
|
type: i.type ?? "line",
|
|
770
770
|
lineStyle: {
|
|
771
|
-
color:
|
|
771
|
+
color: g,
|
|
772
772
|
width: i.styling?.borderWidth ?? 2,
|
|
773
773
|
type: i.styling?.borderDash ?? "solid"
|
|
774
774
|
},
|
|
775
775
|
smooth: !1,
|
|
776
776
|
itemStyle: {
|
|
777
777
|
color: x,
|
|
778
|
-
borderColor:
|
|
778
|
+
borderColor: g,
|
|
779
779
|
borderWidth: i.styling?.borderWidth ?? 2
|
|
780
780
|
},
|
|
781
781
|
areaStyle: i.styling?.fill ? { color: x } : void 0,
|
|
@@ -914,7 +914,7 @@ let g = class extends k {
|
|
|
914
914
|
const p = Array.isArray(h.yAxis) ? h.yAxis : [h.yAxis ?? {}];
|
|
915
915
|
for (; p.length < 2; ) p.push({});
|
|
916
916
|
h.yAxis = p;
|
|
917
|
-
const
|
|
917
|
+
const g = t.series.some((m) => !!m.label?.show), x = t.series.some((m) => (m.valueAxisIndex ?? 0) === 1), q = t.series.length === 0 || t.series.some((m) => (m.valueAxisIndex ?? 0) === 0), b = a && q, v = a && x, N = this.inputData?.axis?.yAxisLabel ?? "", U = this.inputData?.axis?.yAxisLabelRight ?? "", z = b && !!N, R = v && !!U, _ = this.yAxisType(), w = ["value", "log"].includes(_ ?? "") ? { fontSize: 14, formatter: (m) => Math.round(m * 100) / 100 } : void 0;
|
|
918
918
|
if (Object.assign(p[0], {
|
|
919
919
|
type: _,
|
|
920
920
|
name: N,
|
|
@@ -979,7 +979,7 @@ let g = class extends k {
|
|
|
979
979
|
// A horizontal chart grows towards the right edge, so the last
|
|
980
980
|
// axis tick and any value label printed past the end of a bar
|
|
981
981
|
// need room that `containLabel` does not reserve for them.
|
|
982
|
-
right: (o ?
|
|
982
|
+
right: (o ? g ? 45 : 15 : 0) + u,
|
|
983
983
|
containLabel: n || a
|
|
984
984
|
}, c && Object.assign(
|
|
985
985
|
h.dataZoom[0],
|
|
@@ -989,6 +989,20 @@ let g = class extends k {
|
|
|
989
989
|
h.animation = !0, h.animationEasing = "linear", h.animationDuration = S, h.animationDurationUpdate = S, t.echart?.on("finished", () => t.drawing = !1), t.drawing = !0, t.echart?.setOption(h, { notMerge: d, lazyUpdate: !0 });
|
|
990
990
|
});
|
|
991
991
|
}
|
|
992
|
+
// ECharts positions a slider dataZoom against the grid rect from *before*
|
|
993
|
+
// `containLabel` insets the plot to make room for the axis labels, so the
|
|
994
|
+
// slider comes out shifted towards the label side by exactly that inset and
|
|
995
|
+
// its window no longer lines up with the data above it. The real plot rect
|
|
996
|
+
// only exists after a render, so this runs on the chart's 'finished' event
|
|
997
|
+
// and pins the slider to it. The pin itself triggers another render and
|
|
998
|
+
// thus another 'finished'; the already-aligned check ends that recursion.
|
|
999
|
+
alignZoomSlider(o) {
|
|
1000
|
+
if (!(this.inputData?.axis?.xAxisZoom ?? !1)) return;
|
|
1001
|
+
const t = o.getModel?.(), e = t?.getComponent("grid")?.coordinateSystem?.getRect?.(), s = t?.getComponent("dataZoom", 0)?.option;
|
|
1002
|
+
if (!e || !s) return;
|
|
1003
|
+
const i = this.isHorizontal() ? { top: e.y, height: e.height } : { left: e.x, width: e.width };
|
|
1004
|
+
Object.keys(i).every((n) => Math.abs(i[n] - s[n]) < 0.5) || o.setOption({ dataZoom: [i] }, { lazyUpdate: !0 });
|
|
1005
|
+
}
|
|
992
1006
|
deleteCharts() {
|
|
993
1007
|
this.canvasList.forEach((o, t) => {
|
|
994
1008
|
o.echart?.dispose(), o.element?.remove(), this.canvasList.delete(t);
|
|
@@ -1002,8 +1016,10 @@ let g = class extends k {
|
|
|
1002
1016
|
return;
|
|
1003
1017
|
const e = document.createElement("div");
|
|
1004
1018
|
e.setAttribute("name", o), e.setAttribute("class", "sizer"), this.chartContainer.appendChild(e);
|
|
1019
|
+
const s = nt.init(e, this.theme?.theme_name);
|
|
1020
|
+
s.on("finished", () => this.alignZoomSlider(s));
|
|
1005
1021
|
const i = {
|
|
1006
|
-
echart:
|
|
1022
|
+
echart: s,
|
|
1007
1023
|
series: [],
|
|
1008
1024
|
element: e,
|
|
1009
1025
|
drawing: !1,
|
|
@@ -1040,7 +1056,7 @@ let g = class extends k {
|
|
|
1040
1056
|
`;
|
|
1041
1057
|
}
|
|
1042
1058
|
};
|
|
1043
|
-
|
|
1059
|
+
y.styles = Vt`
|
|
1044
1060
|
:host {
|
|
1045
1061
|
display: block;
|
|
1046
1062
|
font-family: sans-serif;
|
|
@@ -1119,32 +1135,32 @@ g.styles = Vt`
|
|
|
1119
1135
|
`;
|
|
1120
1136
|
$([
|
|
1121
1137
|
tt({ type: Object })
|
|
1122
|
-
],
|
|
1138
|
+
], y.prototype, "inputData", 2);
|
|
1123
1139
|
$([
|
|
1124
1140
|
tt({ type: Object })
|
|
1125
|
-
],
|
|
1141
|
+
], y.prototype, "theme", 2);
|
|
1126
1142
|
$([
|
|
1127
1143
|
tt({ type: Object })
|
|
1128
|
-
],
|
|
1144
|
+
], y.prototype, "timeRange", 2);
|
|
1129
1145
|
$([
|
|
1130
1146
|
et()
|
|
1131
|
-
],
|
|
1147
|
+
], y.prototype, "canvasList", 2);
|
|
1132
1148
|
$([
|
|
1133
1149
|
et()
|
|
1134
|
-
],
|
|
1150
|
+
], y.prototype, "themeBgColor", 2);
|
|
1135
1151
|
$([
|
|
1136
1152
|
et()
|
|
1137
|
-
],
|
|
1153
|
+
], y.prototype, "themeTitleColor", 2);
|
|
1138
1154
|
$([
|
|
1139
1155
|
et()
|
|
1140
|
-
],
|
|
1156
|
+
], y.prototype, "themeSubtitleColor", 2);
|
|
1141
1157
|
$([
|
|
1142
1158
|
xe(".chart-container")
|
|
1143
|
-
],
|
|
1144
|
-
|
|
1145
|
-
me("widget-linechart-1.7.
|
|
1146
|
-
],
|
|
1159
|
+
], y.prototype, "chartContainer", 2);
|
|
1160
|
+
y = $([
|
|
1161
|
+
me("widget-linechart-1.7.4")
|
|
1162
|
+
], y);
|
|
1147
1163
|
export {
|
|
1148
|
-
|
|
1164
|
+
y as WidgetLinechart
|
|
1149
1165
|
};
|
|
1150
1166
|
//# sourceMappingURL=widget-linechart.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widget-linechart.js","sources":["../node_modules/@lit/reactive-element/css-tag.js","../node_modules/@lit/reactive-element/reactive-element.js","../node_modules/lit-html/lit-html.js","../node_modules/lit-element/lit-element.js","../node_modules/@lit/reactive-element/decorators/custom-element.js","../node_modules/@lit/reactive-element/decorators/property.js","../node_modules/@lit/reactive-element/decorators/state.js","../node_modules/@lit/reactive-element/decorators/base.js","../node_modules/@lit/reactive-element/decorators/query.js","../src/widget-linechart.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(s)+t[o+1],t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const e of o){const o=document.createElement(\"style\"),n=t.litNonce;void 0!==n&&o.setAttribute(\"nonce\",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as s}from\"./css-tag.js\";export{CSSResult,css,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{is:i,defineProperty:e,getOwnPropertyDescriptor:h,getOwnPropertyNames:r,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:\"\",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),b={attribute:!0,type:String,converter:u,reflect:!1,useDefault:!1,hasChanged:f};Symbol.metadata??=Symbol(\"metadata\"),a.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e(this.prototype,t,h)}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d(\"elementProperties\")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d(\"finalized\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d(\"properties\"))){const t=this.properties,s=[...r(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(t(s))}else void 0!==s&&i.push(t(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null}}requestUpdate(t,s,i,e=!1,h){if(void 0!==t){const r=this.constructor;if(!1===e&&(h=this[t]),i??=r.getPropertyOptions(t),!((i.hasChanged??f)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,i))))return;this.C(t,s,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),!0!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),!0===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];!0!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e)}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(s)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:\"open\"},y[d(\"elementProperties\")]=new Map,y[d(\"finalized\")]=new Map,p?.({ReactiveElement:y}),(a.reactiveElementVersions??=[]).push(\"2.1.2\");export{y as ReactiveElement,s as adoptStyles,u as defaultConverter,t as getCompatibleStyle,f as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,i=t=>t,s=t.trustedTypes,e=s?s.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,h=\"$lit$\",o=`lit$${Math.random().toFixed(9).slice(2)}$`,n=\"?\"+o,r=`<${n}>`,l=document,c=()=>l.createComment(\"\"),a=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,u=Array.isArray,d=t=>u(t)||\"function\"==typeof t?.[Symbol.iterator],f=\"[ \\t\\n\\f\\r]\",v=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,_=/-->/g,m=/>/g,p=RegExp(`>|${f}(?:([^\\\\s\"'>=/]+)(${f}*=${f}*(?:[^ \\t\\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,\"g\"),g=/'/g,$=/\"/g,y=/^(?:script|style|textarea|title)$/i,x=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),b=x(1),w=x(2),T=x(3),E=Symbol.for(\"lit-noChange\"),A=Symbol.for(\"lit-nothing\"),C=new WeakMap,P=l.createTreeWalker(l,129);function V(t,i){if(!u(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return void 0!==e?e.createHTML(i):i}const N=(t,i)=>{const s=t.length-1,e=[];let n,l=2===i?\"<svg>\":3===i?\"<math>\":\"\",c=v;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,f=0;for(;f<s.length&&(c.lastIndex=f,u=c.exec(s),null!==u);)f=c.lastIndex,c===v?\"!--\"===u[1]?c=_:void 0!==u[1]?c=m:void 0!==u[2]?(y.test(u[2])&&(n=RegExp(\"</\"+u[2],\"g\")),c=p):void 0!==u[3]&&(c=p):c===p?\">\"===u[0]?(c=n??v,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?p:'\"'===u[3]?$:g):c===$||c===g?c=p:c===_||c===m?c=v:(c=p,n=void 0);const x=c===p&&t[i+1].startsWith(\"/>\")?\" \":\"\";l+=c===v?s+r:d>=0?(e.push(a),s.slice(0,d)+h+s.slice(d)+o+x):s+o+(-2===d?i:x)}return[V(t,l+(t[s]||\"<?>\")+(2===i?\"</svg>\":3===i?\"</math>\":\"\")),e]};class S{constructor({strings:t,_$litType$:i},e){let r;this.parts=[];let l=0,a=0;const u=t.length-1,d=this.parts,[f,v]=N(t,i);if(this.el=S.createElement(f,e),P.currentNode=this.el.content,2===i||3===i){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=P.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(h)){const i=v[a++],s=r.getAttribute(t).split(o),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:l,name:e[2],strings:s,ctor:\".\"===e[1]?I:\"?\"===e[1]?L:\"@\"===e[1]?z:H}),r.removeAttribute(t)}else t.startsWith(o)&&(d.push({type:6,index:l}),r.removeAttribute(t));if(y.test(r.tagName)){const t=r.textContent.split(o),i=t.length-1;if(i>0){r.textContent=s?s.emptyScript:\"\";for(let s=0;s<i;s++)r.append(t[s],c()),P.nextNode(),d.push({type:2,index:++l});r.append(t[i],c())}}}else if(8===r.nodeType)if(r.data===n)d.push({type:2,index:l});else{let t=-1;for(;-1!==(t=r.data.indexOf(o,t+1));)d.push({type:7,index:l}),t+=o.length-1}l++}}static createElement(t,i){const s=l.createElement(\"template\");return s.innerHTML=t,s}}function M(t,i,s=t,e){if(i===E)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=a(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=M(t,h._$AS(t,i.values),h,e)),i}class R{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??l).importNode(i,!0);P.currentNode=e;let h=P.nextNode(),o=0,n=0,r=s[0];for(;void 0!==r;){if(o===r.index){let i;2===r.type?i=new k(h,h.nextSibling,this,t):1===r.type?i=new r.ctor(h,r.name,r.strings,this,t):6===r.type&&(i=new Z(h,this,t)),this._$AV.push(i),r=s[++n]}o!==r?.index&&(h=P.nextNode(),o++)}return P.currentNode=l,e}p(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class k{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=M(this,t,i),a(t)?t===A||null==t||\"\"===t?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==E&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):d(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==A&&a(this._$AH)?this._$AA.nextSibling.data=t:this.T(l.createTextNode(t)),this._$AH=t}$(t){const{values:i,_$litType$:s}=t,e=\"number\"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=S.createElement(V(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else{const t=new R(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t}}_$AC(t){let i=C.get(t.strings);return void 0===i&&C.set(t.strings,i=new S(t)),i}k(t){u(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new k(this.O(c()),this.O(c()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);t!==this._$AB;){const s=i(t).nextSibling;i(t).remove(),t=s}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class H{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=A,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=A}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=M(this,t,i,0),o=!a(t)||t!==this._$AH&&t!==E,o&&(this._$AH=t);else{const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=M(this,e[s+n],i,n),r===E&&(r=this._$AH[n]),o||=!a(r)||r!==this._$AH[n],r===A?t=A:t!==A&&(t+=(r??\"\")+h[n+1]),this._$AH[n]=r}o&&!e&&this.j(t)}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??\"\")}}class I extends H{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===A?void 0:t}}class L extends H{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==A)}}class z extends H{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5}_$AI(t,i=this){if((t=M(this,t,i,0)??A)===E)return;const s=this._$AH,e=t===A&&s!==A||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==A&&(s===A||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){\"function\"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){M(this,t)}}const j={M:h,P:o,A:n,C:1,L:N,R,D:d,V:M,I:k,H,N:L,U:z,B:I,F:Z},B=t.litHtmlPolyfillSupport;B?.(S,k),(t.litHtmlVersions??=[]).push(\"3.3.2\");const D=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new k(i.insertBefore(c(),t),t,void 0,s??{})}return h._$AI(t),h};export{j as _$LH,b as html,T as mathml,E as noChange,A as nothing,D as render,w as svg};\n//# sourceMappingURL=lit-html.js.map\n","import{ReactiveElement as t}from\"@lit/reactive-element\";export*from\"@lit/reactive-element\";import{render as e,noChange as r}from\"lit-html\";export*from\"lit-html\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const s=globalThis;class i extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=e(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return r}}i._$litElement$=!0,i[\"finalized\"]=!0,s.litElementHydrateSupport?.({LitElement:i});const o=s.litElementPolyfillSupport;o?.({LitElement:i});const n={_$AK:(t,e,r)=>{t._$AK(e,r)},_$AL:t=>t._$AL};(s.litElementVersions??=[]).push(\"4.2.2\");export{i as LitElement,n as _$LE};\n//# sourceMappingURL=lit-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=t=>(e,o)=>{void 0!==o?o.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)};export{t as customElement};\n//# sourceMappingURL=custom-element.js.map\n","import{notEqual as t,defaultConverter as e}from\"../reactive-element.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o={attribute:!0,type:String,converter:e,reflect:!1,hasChanged:t},r=(t=o,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),\"setter\"===n&&((t=Object.create(t)).wrapped=!0),s.set(r.name,t),\"accessor\"===n){const{name:o}=r;return{set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t,!0,r)},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if(\"setter\"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t,!0,r)}}throw Error(\"Unsupported decorator location: \"+n)};function n(t){return(e,o)=>\"object\"==typeof o?r(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}export{n as property,r as standardProperty};\n//# sourceMappingURL=property.js.map\n","import{property as t}from\"./property.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function r(r){return t({...r,state:!0,attribute:!1})}export{r as state};\n//# sourceMappingURL=state.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst e=(e,t,c)=>(c.configurable=!0,c.enumerable=!0,Reflect.decorate&&\"object\"!=typeof t&&Object.defineProperty(e,t,c),c);export{e as desc};\n//# sourceMappingURL=base.js.map\n","import{desc as t}from\"./base.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function e(e,r){return(n,s,i)=>{const o=t=>t.renderRoot?.querySelector(e)??null;if(r){const{get:e,set:r}=\"object\"==typeof s?n:i??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return t(n,s,{get(){let t=e.call(this);return void 0===t&&(t=o(this),(null!==t||this.hasUpdated)&&r.call(this,t)),t}})}return t(n,s,{get(){return o(this)}})}}export{e as query};\n//# sourceMappingURL=query.js.map\n","import { html, css, LitElement, PropertyValueMap } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\n\nimport * as echarts from 'echarts/core'\nimport {\n TitleComponent,\n ToolboxComponent,\n TooltipComponent,\n LegendComponent,\n DataZoomComponent,\n GridComponent\n} from 'echarts/components'\nimport { LineChart, BarChart, ScatterChart } from 'echarts/charts'\nimport { UniversalTransition, LegacyGridContainLabel } from 'echarts/features'\nimport { CanvasRenderer } from 'echarts/renderers'\nimport tinycolor, { ColorInput } from 'tinycolor2'\n\necharts.use([\n GridComponent,\n TitleComponent,\n ToolboxComponent,\n TooltipComponent,\n LegendComponent,\n DataZoomComponent,\n LineChart,\n BarChart,\n ScatterChart,\n CanvasRenderer,\n UniversalTransition,\n LegacyGridContainLabel\n])\n\nimport { ChartConfiguration } from './definition-schema'\nimport { EChartsOption, SeriesOption } from 'echarts'\nimport { TitleOption } from 'echarts/types/dist/shared'\n\ntype Theme = {\n theme_name: string\n theme_object: any\n}\n\ntype SeriesOptionX = SeriesOption & {\n minDate?: number\n maxDate?: number\n drawOrder: number\n xAxisIndex?: number\n yAxisIndex?: number\n // Which value axis (0 = primary, 1 = secondary) this series belongs to,\n // independent of orientation. In a vertical chart the value axes are the\n // y axes (left/right), in a horizontal one they are the x axes (bottom/top),\n // so xAxisIndex/yAxisIndex alone cannot be read without knowing the\n // orientation — this field can.\n valueAxisIndex?: number\n}\n@customElement('widget-linechart-versionplaceholder')\nexport class WidgetLinechart extends LitElement {\n @property({ type: Object })\n inputData?: ChartConfiguration\n\n @property({ type: Object })\n theme?: Theme\n\n @property({ type: Object })\n timeRange?: { start: number; end: number }\n\n @state()\n private canvasList: Map<\n string,\n {\n echart?: echarts.ECharts\n series: SeriesOptionX[]\n doomed?: boolean\n element?: HTMLDivElement\n drawing: boolean\n lastUpdateTime?: number\n updateIntervals?: number[]\n lastMaxTimestamp?: number\n lastConfig?: string\n }\n > = new Map()\n\n @state() private themeBgColor?: string\n @state() private themeTitleColor?: string\n @state() private themeSubtitleColor?: string\n @query('.chart-container')\n chartContainer?: HTMLDivElement\n\n boxes?: HTMLDivElement[]\n origWidth: number = 0\n origHeight: number = 0\n template: EChartsOption\n modifier: number = 1\n version: string = 'versionplaceholder'\n resizeObserver?: ResizeObserver\n updateThresholdMs: number = 300\n private maxIntervalSamples: number = 3\n\n constructor() {\n super()\n\n this.template = {\n title: {\n text: 'Temperature Change in the Coming Week',\n left: 'center',\n top: 0,\n textStyle: {\n fontSize: 14\n }\n } as TitleOption,\n tooltip: {\n trigger: 'axis'\n },\n legend: {\n right: 0,\n top: 0\n },\n grid: {\n top: 30,\n bottom: 20,\n left: 20,\n right: 0,\n containLabel: true // ensures labels are not cut off\n },\n toolbox: {\n show: true,\n feature: {\n // dataZoom: {\n // yAxisIndex: 'none'\n // },\n // dataView: { readOnly: false },\n restore: {}\n // saveAsImage: {}\n }\n },\n dataZoom: [\n {\n show: false,\n realtime: true,\n // start: 30,\n // end: 70,\n xAxisIndex: [0, 1]\n }\n ],\n xAxis: {\n type: 'value', // value, time, log, category\n name: 'Time',\n nameGap: 27,\n nameLocation: 'middle',\n axisLine: {\n lineStyle: {\n width: undefined\n }\n },\n axisLabel: {\n fontSize: 14\n }\n },\n // index 0 = left (primary) axis, index 1 = right (secondary) axis.\n // Must stay function-free: the template is copied via structuredClone.\n yAxis: [\n {\n type: 'value',\n nameLocation: 'middle',\n name: 'Temperature (°C)',\n nameGap: 30,\n position: 'left',\n axisLabel: {\n fontSize: 14\n },\n axisLine: {\n lineStyle: {\n width: undefined\n }\n },\n scale: false\n },\n {\n type: 'value',\n position: 'right',\n show: false,\n name: '',\n nameGap: 30,\n axisLabel: {\n fontSize: 14\n },\n axisLine: {\n lineStyle: {\n width: undefined\n }\n },\n splitLine: {\n show: false\n },\n scale: false\n }\n ],\n series: [\n {\n name: 'Highest',\n type: 'line',\n symbolSize: 8,\n lineStyle: {\n width: 2,\n type: 'solid',\n color: 'green'\n },\n data: [10, 11, 13, 11, 12, 12, 9]\n } as SeriesOption,\n {\n name: 'Lowest',\n type: 'line',\n symbolSize: 8,\n lineStyle: {\n width: 2,\n type: 'solid'\n },\n data: [1, -2, 2, 5, 3, 2, 0]\n } as SeriesOption\n ]\n } as EChartsOption\n }\n\n update(changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {\n if (changedProperties.has('inputData')) {\n this.cachedXAxisType = undefined\n this.cachedYAxisType = undefined\n }\n if (changedProperties.has('inputData') && this.chartContainer) {\n // const drawingStates = Array.from(this.canvasList).map(([key, chart]) => chart.drawing)\n // if (drawingStates.every((d) => !d)) {\n this.transformData()\n this.applyData()\n // } else {\n // console.log('skipping linechart draw')\n // }\n }\n\n if (changedProperties.has('theme')) {\n this.registerTheme(this.theme)\n this.deleteCharts()\n this.transformData()\n this.applyData()\n }\n super.update(changedProperties)\n }\n\n protected firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {\n this.registerTheme(this.theme)\n this.transformData()\n this.applyData()\n // Add ResizeObserver for chart container\n if (this.chartContainer) {\n this.resizeObserver = new ResizeObserver(() => {\n this.canvasList.forEach((chart) => {\n chart.echart?.resize()\n })\n })\n this.resizeObserver.observe(this.chartContainer)\n }\n }\n\n registerTheme(theme?: Theme) {\n const cssTextColor = getComputedStyle(this).getPropertyValue('--re-text-color').trim()\n const cssBgColor = getComputedStyle(this).getPropertyValue('--re-tile-background-color').trim()\n this.themeBgColor = cssBgColor || this.theme?.theme_object?.backgroundColor\n this.themeTitleColor = cssTextColor || this.theme?.theme_object?.title?.textStyle?.color\n this.themeSubtitleColor =\n cssTextColor || this.theme?.theme_object?.title?.subtextStyle?.color || this.themeTitleColor\n\n if (!theme || !theme.theme_object || !theme.theme_name) return\n\n // Filter out component keys that would trigger warnings about unregistered components\n const excludeKeys = ['parallel', 'geo', 'timeline', 'visualMap', 'markPoint']\n const filteredTheme = Object.fromEntries(\n Object.entries(theme.theme_object).filter(([key]) => !excludeKeys.includes(key))\n )\n echarts.registerTheme(theme.theme_name, filteredTheme)\n }\n\n /** True when bars grow to the right instead of upwards (axis.orientation). */\n isHorizontal(): boolean {\n return this.inputData?.axis?.orientation === 'horizontal'\n }\n\n /**\n * Index of the measured y-value inside a data point's `value` tuple.\n *\n * A point is stored as `[x, y, r]` for a vertical chart. A horizontal chart\n * swaps the first two entries to `[y, x, r]`, because ECharts always maps\n * tuple index 0 to the x axis and index 1 to the y axis — and in a\n * horizontal chart the measured value is what belongs on the x axis.\n */\n private valueIndex(): number {\n return this.isHorizontal() ? 0 : 1\n }\n\n /** Index of the x-value (category/timestamp) inside a data point's `value` tuple. */\n private categoryIndex(): number {\n return this.isHorizontal() ? 1 : 0\n }\n\n /**\n * Formatter for the on-chart value labels (styling.showValueLabels).\n * Rounds to two decimals to match the numeric axis labels, and leaves\n * categorical y-values untouched.\n */\n private valueLabelFormatter(valueIdx: number) {\n return (params: any) => {\n const raw = Array.isArray(params?.value) ? params.value[valueIdx] : params?.value\n if (raw === undefined || raw === null || raw === '') return ''\n const num = Number(raw)\n return isNaN(num) ? String(raw) : String(Math.round(num * 100) / 100)\n }\n }\n\n transformData() {\n if (!this?.inputData?.dataseries?.length) return\n\n const horizontal = this.isHorizontal()\n const valueIdx = this.valueIndex()\n const categoryIdx = this.categoryIndex()\n\n // reset all existing chart dataseries\n this.canvasList.forEach((chartM) => {\n chartM.series = []\n chartM.doomed = true\n })\n this.inputData.dataseries.sort((a, b) => (a.advanced?.drawOrder ?? 0) - (b.advanced?.drawOrder ?? 0))\n this.inputData.dataseries.forEach((ds) => {\n ds.advanced ??= {}\n ds.advanced.chartName ??= ''\n\n ds.data ??= []\n\n // pivot data\n const distincts = [...new Set(ds.data.map((d) => d.pivot ?? ''))].sort()\n const derivedBgColors = tinycolor(ds.backgroundColor as ColorInput | undefined)\n .monochromatic(distincts.length)\n .map((c: any) => c.toHexString())\n const derivedBdColors = tinycolor(ds.borderColor as ColorInput | undefined)\n .monochromatic(distincts.length)\n .map((c: any) => c.toHexString())\n //sd\n distincts.forEach((piv, i) => {\n const prefix = piv ?? ''\n const label = ds.label ?? ''\n const name = prefix + (!!prefix && !!label ? ' - ' : '') + label\n const lineColor = ds.borderColor\n ? ds.advanced?.chartName?.includes('#split#')\n ? ds.borderColor\n : derivedBdColors[i]\n : undefined\n const fillColor = ds.backgroundColor\n ? ds.advanced?.chartName?.includes('#split#')\n ? ds.backgroundColor\n : derivedBgColors[i]\n : undefined\n const data = distincts.length === 1 ? ds.data : ds.data?.filter((d) => d.pivot === piv)\n // The value tuple is [x, y, r] for a vertical chart and [y, x, r]\n // for a horizontal one — ECharts always reads index 0 as the x\n // axis, and in a horizontal chart the measured value lives there.\n const toTuple = (x: any, y: any, r: any) => (horizontal ? [y, x, r] : [x, y, r])\n let data2 = this.inputData?.axis?.timeseries\n ? (data?.map((d) => ({\n name: d.x,\n value: toTuple(new Date(d.x ?? '').getTime(), d.y, d.r)\n })) ?? [])\n : (data?.map((d) => ({ name: d.x, value: toTuple(d.x, d.y, d.r) })) ?? [])\n\n let minDate: number = 0,\n maxDate: number = 0,\n extraData: (string | number | undefined)[][] = []\n if (this.xAxisType() === 'time' && data2) {\n const dates = data2.map((d: any) => d.value[categoryIdx] as number)\n minDate = Math.min(...dates)\n maxDate = Math.max(...dates)\n // extraData = (pds?.data as any[][])?.filter((d: any) => d[0] < minDate) ?? []\n // data2.unshift(...extraData) // add old data to the beginning of the new data\n // data2 = [...extraData, ...data2] // leave old data in for smooth shifting animation and delete after draw\n }\n const valueAxisIndex = ds.yAxis === 'right' ? 1 : 0\n const pds: SeriesOptionX = {\n id: name,\n name: name,\n minDate,\n maxDate,\n type: ds.type ?? 'line',\n lineStyle: {\n color: lineColor,\n width: ds.styling?.borderWidth ?? 2,\n type: ds.styling?.borderDash ?? 'solid'\n },\n smooth: false,\n itemStyle: {\n color: fillColor,\n borderColor: lineColor,\n borderWidth: ds.styling?.borderWidth ?? 2\n },\n areaStyle: ds.styling?.fill ? { color: fillColor } : undefined,\n symbol: ds.styling?.pointStyle ?? 'circle',\n symbolSize: (d: any[]) => d[2] ?? 0,\n showSymbol: ds.styling?.pointStyle === 'none' ? false : true,\n label: {\n show: ds.styling?.showValueLabels ?? false,\n // Bars grow upwards when vertical and rightwards when\n // horizontal, so the label sits past the growing end.\n position: horizontal ? 'right' : 'top',\n fontSize: 12,\n formatter: this.valueLabelFormatter(valueIdx)\n },\n data: data2 ?? [],\n drawOrder: ds.advanced?.drawOrder ?? 0,\n valueAxisIndex: valueAxisIndex,\n // The secondary value axis is the right y axis when vertical\n // and the top x axis when horizontal.\n xAxisIndex: horizontal ? valueAxisIndex : 0,\n yAxisIndex: horizontal ? 0 : valueAxisIndex\n }\n let chartName = ds.advanced?.chartName ?? ''\n chartName = chartName.replace('#split#', prefix)\n\n const chart = this.setupChart(chartName)\n\n // Ensure unique id per chart (ECharts requires unique ids)\n const existingIds = chart?.series.map((s) => s.id) ?? []\n let seriesId = name\n let suffix = 2\n while (existingIds.includes(seriesId)) {\n seriesId = `${name}_${suffix++}`\n }\n pds.id = seriesId\n\n chart?.series.push(pds)\n })\n })\n\n const doomedCharts: string[] = []\n // remove all doomed charts\n this.canvasList.forEach((chart, label) => {\n if (!chart.doomed) return\n chart.echart?.dispose()\n chart.element?.remove()\n doomedCharts.push(label)\n })\n\n doomedCharts.forEach((label) => this.canvasList.delete(label))\n this.canvasList = new Map(\n [...this.canvasList.entries()].sort(([labelA, va], [labelB, vb]) => {\n const orderA = va.series?.[0].drawOrder ?? 0\n const orderB = vb.series?.[0].drawOrder ?? 0\n if (orderA !== orderB) {\n return orderA - orderB\n }\n return labelA.localeCompare(labelB)\n })\n )\n\n // Resize remaining charts if any were removed\n if (doomedCharts.length > 0) {\n this.canvasList.forEach((chart) => {\n chart.echart?.resize()\n })\n }\n }\n\n // cached per inputData change — cleared in update(), see xAxisType()/yAxisType()\n private cachedXAxisType?: 'value' | 'category' | 'time'\n private cachedYAxisType?: 'value' | 'category'\n\n xAxisType(): 'value' | 'log' | 'category' | 'time' | undefined {\n if (this.cachedXAxisType) return this.cachedXAxisType\n if (this.inputData?.axis?.timeseries) {\n this.cachedXAxisType = 'time'\n return this.cachedXAxisType\n }\n this.cachedXAxisType = 'value'\n for (const ds of this.inputData?.dataseries ?? []) {\n const point = ds.data?.find((d) => d.x !== undefined && d.x !== null)\n if (point) {\n this.cachedXAxisType = !isNaN(Number(point.x)) ? 'value' : 'category'\n break\n }\n }\n return this.cachedXAxisType\n }\n\n yAxisType(): 'value' | 'log' | 'category' | undefined {\n if (this.cachedYAxisType) return this.cachedYAxisType\n this.cachedYAxisType = 'value'\n for (const ds of this.inputData?.dataseries ?? []) {\n const point = ds.data?.find((d) => d.y !== undefined && d.y !== null)\n if (point) {\n this.cachedYAxisType = !isNaN(Number(point.y)) ? 'value' : 'category'\n break\n }\n }\n return this.cachedYAxisType\n }\n\n calculateAnimationDuration(chart: any, label: string): number {\n const now = Date.now()\n const isSingleSeries = chart.series.length === 1\n // Only apply adaptive animation for single series charts\n if (!isSingleSeries || !this.inputData?.axis?.timeseries) {\n return this.updateThresholdMs\n }\n\n // Find the newest timestamp in the current chart data\n let maxTimestamp = 0\n if (this.xAxisType() === 'time') {\n for (const series of chart.series) {\n const seriesData = series.data as any[]\n for (const point of seriesData || []) {\n const timestamp = point.value?.[0] || 0\n if (timestamp > maxTimestamp) {\n maxTimestamp = timestamp\n }\n }\n }\n } else {\n // For non-time series, use the current time as proxy\n maxTimestamp = now\n }\n\n // Only track update if the data actually changed (new timestamp)\n chart.lastMaxTimestamp = chart.lastMaxTimestamp ?? 0\n const dataChanged = maxTimestamp > chart.lastMaxTimestamp\n if (dataChanged) {\n chart.updateIntervals ??= []\n if (chart.lastUpdateTime > 0) {\n const timeSinceLastUpdate = now - chart.lastUpdateTime\n chart.updateIntervals.push(timeSinceLastUpdate)\n if (chart.updateIntervals.length > this.maxIntervalSamples) {\n chart.updateIntervals.shift()\n }\n }\n chart.lastUpdateTime = now\n chart.lastMaxTimestamp = maxTimestamp\n }\n\n // Calculate average update interval\n const avgInterval =\n chart.updateIntervals && chart.updateIntervals.length > 0\n ? chart.updateIntervals.reduce((a: number, b: number) => a + b, 0) /\n chart.updateIntervals.length\n : this.updateThresholdMs\n return avgInterval\n }\n\n applyData() {\n const modifier = 1\n // Sort chartContainer children by drawOrder and label\n if (!this.chartContainer) return\n const horizontal = this.isHorizontal()\n for (const canvas of this.canvasList.values()) {\n if (canvas.element) this.chartContainer.appendChild(canvas.element)\n }\n this.canvasList.forEach((chart, label) => {\n chart.series.sort((a, b) => ((a.name as string) > (b.name as string) ? 1 : -1))\n\n // Visibility controls\n const showLegend = this.inputData?.axis?.showLegend ?? true\n const showTitle = this.inputData?.axis?.showTitle ?? true\n const showXAxis = this.inputData?.axis?.showXAxis ?? true\n const showYAxis = this.inputData?.axis?.showYAxis ?? true\n const showBox = this.inputData?.axis?.showBox ?? false\n\n // Track config changes to determine if full rebuild needed\n const currentConfig = JSON.stringify({\n showLegend,\n showTitle,\n showXAxis,\n showYAxis,\n showBox,\n xAxisLabel: this.inputData?.axis?.xAxisLabel,\n yAxisLabel: this.inputData?.axis?.yAxisLabel,\n xAxisZoom: this.inputData?.axis?.xAxisZoom,\n yAxisScaling: this.inputData?.axis?.yAxisScaling,\n yAxisLabelRight: this.inputData?.axis?.yAxisLabelRight,\n yAxisScalingRight: this.inputData?.axis?.yAxisScalingRight,\n xAxisType: this.xAxisType(),\n yAxisType: this.yAxisType(),\n // Flipping the orientation swaps which option key holds the\n // single category axis and which holds the value-axis array,\n // so it must force a notMerge rebuild rather than a merge.\n orientation: this.inputData?.axis?.orientation ?? 'vertical',\n seriesCount: chart.series.length,\n seriesNames: chart.series.map((s) => s.name).join(','),\n seriesAxes: chart.series.map((s) => s.valueAxisIndex ?? 0).join(','),\n seriesLabels: chart.series.map((s) => ((s as any).label?.show ? 1 : 0)).join(',')\n })\n const configChanged = chart.lastConfig !== currentConfig\n chart.lastConfig = currentConfig\n\n // Always build the option from the template — never from getOption().\n //\n // getOption() returns every component normalized to an *array*, while\n // everything below treats the single-instance ones (title, xAxis, grid,\n // legend, toolbox) as plain objects. `{ ...option.grid }` on an array\n // yields `{ '0': grid }`, which ECharts then deep-merges back into its\n // stored option — burying a copy one level deeper on *every* update. The\n // stored option grew one level per frame until zrender's recursive\n // merge()/clone() ran out of stack, so any board left open on a live\n // time series eventually died with \"Maximum call stack size exceeded\".\n // Assignments like `option.title.text` landed on the array object for the\n // same reason and were silently dropped, which is why the title, axis\n // name, legend and zoom toolbox stopped tracking config on that path.\n //\n // A template clone carries only the keys we actually set, so a merge\n // update still preserves ECharts-side state (zoom position, animation\n // continuity) — and it skips deep-cloning every series' data each frame.\n // `configChanged` still decides merge vs. rebuild via notMerge below.\n const option: any = window.structuredClone(this.template)\n\n // Title\n option.title.text = label\n option.title.show = showTitle\n\n // Axis\n option.xAxis.name = this.inputData?.axis?.xAxisLabel ?? ''\n option.xAxis.type = this.xAxisType()\n option.xAxis.show = showXAxis\n if (this.xAxisType() === 'time') {\n // Use provided timeRange if available and valid, otherwise calculate from data\n const dataMin = chart.series\n .map((s) => s.minDate ?? Infinity)\n .reduce((a, b) => Math.min(a, b), Infinity)\n const dataMax = chart.series.map((s) => s.maxDate ?? 0).reduce((a, b) => Math.max(a, b), 0)\n\n const timeRangeStart = Number(this.timeRange?.start)\n const timeRangeEnd = Number(this.timeRange?.end)\n\n const axisMin = !isNaN(timeRangeStart) ? timeRangeStart : dataMin\n const axisMax = !isNaN(timeRangeEnd) ? timeRangeEnd : dataMax\n\n option.xAxis = {\n ...option.xAxis,\n min: axisMin !== Infinity ? axisMin : new Date().getTime() - 1 * 24 * 60 * 60 * 1000,\n max: axisMax !== 0 ? axisMax : new Date().getTime()\n }\n }\n\n const showZoom = this.inputData?.axis?.xAxisZoom ?? false\n option.dataZoom[0].show = showZoom\n option.toolbox.show = showZoom\n\n // Y axes: index 0 = left (primary), index 1 = right (secondary).\n // The template holds an array; normalize anyway so a template edit\n // that drops down to a single axis object cannot silently break this.\n const yAxes: any[] = Array.isArray(option.yAxis) ? option.yAxis : [option.yAxis ?? {}]\n while (yAxes.length < 2) yAxes.push({})\n option.yAxis = yAxes\n\n const hasValueLabels = chart.series.some((s) => !!(s as any).label?.show)\n const rightAxisUsed = chart.series.some((s) => (s.valueAxisIndex ?? 0) === 1)\n const leftAxisUsed =\n chart.series.length === 0 || chart.series.some((s) => (s.valueAxisIndex ?? 0) === 0)\n const showLeftAxis = showYAxis && leftAxisUsed\n const showRightAxis = showYAxis && rightAxisUsed\n\n const yAxisLabel = this.inputData?.axis?.yAxisLabel ?? ''\n const yAxisLabelRight = this.inputData?.axis?.yAxisLabelRight ?? ''\n const hasYAxisLabel = showLeftAxis && !!yAxisLabel\n const hasYAxisLabelRight = showRightAxis && !!yAxisLabelRight\n\n const yType = this.yAxisType()\n const numericAxisLabel = ['value', 'log'].includes(yType ?? '')\n ? { fontSize: 14, formatter: (value: number) => Math.round(value * 100) / 100 }\n : undefined\n\n Object.assign(yAxes[0], {\n type: yType,\n name: yAxisLabel,\n scale: this.inputData?.axis?.yAxisScaling ?? false,\n show: showLeftAxis,\n position: 'left',\n nameLocation: 'end',\n nameGap: 10,\n nameTextStyle: { align: 'left' },\n axisLine: { show: true }\n })\n if (numericAxisLabel) yAxes[0].axisLabel = numericAxisLabel\n\n Object.assign(yAxes[1], {\n type: yType,\n name: showRightAxis ? yAxisLabelRight : '',\n scale: this.inputData?.axis?.yAxisScalingRight ?? false,\n show: showRightAxis,\n position: 'right',\n nameLocation: 'end',\n nameGap: 10,\n nameTextStyle: { align: 'right' },\n axisLine: { show: true },\n splitLine: { show: false }\n })\n if (numericAxisLabel) yAxes[1].axisLabel = numericAxisLabel\n\n // Orientation swap. Everything above builds one category axis (the\n // x-values) and a two-entry array of value axes (the y-values). A\n // vertical chart puts them where they were built; a horizontal one\n // moves the category axis onto `yAxis` and the value axes onto\n // `xAxis`. The axis *labels* keep their meaning either way:\n // 'X-Axis Label' names the x-value dimension wherever it is drawn.\n if (horizontal) {\n const catAxis: any = Array.isArray(option.xAxis) ? option.xAxis[0] : option.xAxis\n option.yAxis = {\n ...catAxis,\n position: 'left',\n // Read top-to-bottom, so the first data point is the top\n // bar — the convention for ranked horizontal bar charts.\n inverse: true,\n // 'start' is the top of an inverted axis, which keeps the\n // axis name clear of the value axis running along the bottom.\n // When a secondary value axis is in use it is drawn along\n // the top, so the name has to clear its tick labels too.\n nameLocation: 'start',\n nameGap: showRightAxis ? 30 : 10,\n nameTextStyle: { align: 'left' }\n }\n option.xAxis = yAxes.map((axis: any, index: number) => ({\n ...axis,\n position: index === 0 ? 'bottom' : 'top',\n nameLocation: 'middle',\n nameGap: 27,\n nameTextStyle: { align: 'center' }\n }))\n // Zooming still applies to the x-value dimension, which now\n // lives on the y axis.\n option.dataZoom = [\n { ...(option.dataZoom?.[0] ?? {}), xAxisIndex: undefined, yAxisIndex: [0] }\n ]\n }\n\n option.series = chart.series\n option.legend.show = showLegend\n\n // Dynamic grid padding based on visible elements\n // Add extra top space when Y-axis label is shown at 'end' position.\n // The right axis name and the legend both live in the top-right corner,\n // so reserve an extra row when both are visible.\n const topPadding =\n (showTitle || hasYAxisLabel || hasYAxisLabelRight ? 30 : 0) +\n (showLegend && hasYAxisLabelRight ? 25 : 0)\n // An ECharts slider dataZoom is ~30px thick and sits outside the\n // grid's own bookkeeping, so nothing reserves room for it. Left\n // unaccounted it is drawn straight over the plot, clipping the foot\n // of every bar and washing out the axis labels underneath.\n const ZOOM_THICKNESS = 40\n const zoomPadBottom = showZoom && !horizontal ? ZOOM_THICKNESS : 0\n const zoomPadRight = showZoom && horizontal ? ZOOM_THICKNESS : 0\n option.grid = {\n ...option.grid,\n show: showBox,\n backgroundColor: 'transparent',\n borderWidth: showBox ? 1 : 0,\n borderColor: this.themeTitleColor ?? '#ccc',\n top: topPadding,\n // The category axis sits at the bottom when vertical and on the\n // left when horizontal; the value axis is the other way round.\n // The zoom slider is not accounted for by `containLabel`, so its\n // thickness has to be reserved here as well — see ZOOM_THICKNESS.\n bottom: ((horizontal ? showLeftAxis : showXAxis) ? 20 : 0) + zoomPadBottom,\n left: (horizontal ? showXAxis : showLeftAxis) ? 20 : 0,\n // A horizontal chart grows towards the right edge, so the last\n // axis tick and any value label printed past the end of a bar\n // need room that `containLabel` does not reserve for them.\n right: (horizontal ? (hasValueLabels ? 45 : 15) : 0) + zoomPadRight,\n containLabel: showXAxis || showYAxis\n }\n\n // Anchor the slider to the edge whose dimension it zooms: the bottom\n // for a vertical chart, the right-hand side for a horizontal one\n // (where it controls the y axis and ECharts draws it upright).\n if (showZoom) {\n Object.assign(\n option.dataZoom[0],\n horizontal\n ? { right: 0, top: topPadding, bottom: 20, left: undefined }\n : { bottom: 0, left: undefined, right: undefined, top: undefined }\n )\n }\n\n // Calculate animation duration based on update frequency\n const animationDuration = this.updateThresholdMs //this.calculateAnimationDuration(chart, label)\n option.animation = true\n option.animationEasing = 'linear'\n option.animationDuration = animationDuration\n option.animationDurationUpdate = animationDuration\n chart.echart?.on('finished', () => (chart.drawing = false))\n chart.drawing = true\n chart.echart?.setOption(option, { notMerge: configChanged, lazyUpdate: true })\n // chart.echart?.resize()\n })\n }\n\n deleteCharts() {\n this.canvasList.forEach((chart, label) => {\n chart.echart?.dispose()\n chart.element?.remove()\n this.canvasList.delete(label)\n })\n }\n\n setupChart(label: string) {\n const existingChart = this.canvasList.get(label)\n\n if (existingChart) {\n delete existingChart.doomed\n return existingChart\n }\n\n if (!this.chartContainer) {\n // console.warn('Chart container not found')\n return\n }\n const newContainer = document.createElement('div')\n newContainer.setAttribute('name', label)\n newContainer.setAttribute('class', 'sizer')\n this.chartContainer.appendChild(newContainer)\n\n const newChart = echarts.init(newContainer, this.theme?.theme_name)\n const chart = {\n echart: newChart,\n series: [] as SeriesOptionX[],\n element: newContainer,\n drawing: false,\n lastUpdateTime: 0,\n updateIntervals: [],\n lastMaxTimestamp: 0\n }\n this.canvasList.set(label, chart)\n\n return chart\n }\n\n disconnectedCallback() {\n if (this.resizeObserver && this.chartContainer) {\n this.resizeObserver.unobserve(this.chartContainer)\n this.resizeObserver.disconnect()\n }\n super.disconnectedCallback()\n }\n\n static styles = css`\n :host {\n display: block;\n font-family: sans-serif;\n box-sizing: border-box;\n position: relative;\n margin: auto;\n container-type: size;\n }\n\n .paging:not([active]) {\n display: none !important;\n }\n\n .wrapper {\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n padding: 2cqh 2cqw;\n box-sizing: border-box;\n gap: 12px;\n }\n\n .sizer {\n flex: 1;\n overflow: hidden;\n position: relative;\n }\n\n .chart-container {\n display: flex;\n flex: 1;\n overflow: hidden;\n position: relative;\n }\n\n header {\n display: flex;\n flex-direction: column;\n }\n h3 {\n margin: 0;\n max-width: 300px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n p {\n margin: 10px 0 0 0;\n max-width: 300px;\n font-size: 14px;\n line-height: 17px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .chart {\n width: 600px; /* will be overriden by adjustSizes */\n height: 230px;\n }\n\n .columnLayout {\n flex-direction: column;\n }\n\n .no-data {\n font-size: 20px;\n display: flex;\n height: 100%;\n width: 100%;\n text-align: center;\n align-items: center;\n justify-content: center;\n }\n `\n\n render() {\n return html`\n <div\n class=\"wrapper\"\n style=\"background-color: ${this.themeBgColor}; color: ${this.themeTitleColor}\"\n >\n <header class=\"paging\" ?active=${this.inputData?.title || this.inputData?.subTitle}>\n <h3 class=\"paging\" ?active=${this.inputData?.title}>${this.inputData?.title}</h3>\n <p\n class=\"paging\"\n ?active=${this.inputData?.subTitle}\n style=\"color: ${this.themeSubtitleColor}\"\n >\n ${this.inputData?.subTitle}\n </p>\n </header>\n <div class=\"paging no-data\" ?active=${this.canvasList.size === 0}>No Data</div>\n <div\n class=\"chart-container ${this?.inputData?.axis?.columnLayout ? 'columnLayout' : ''}\"\n ></div>\n </div>\n `\n }\n}\n"],"names":["t","e","s","o","n$3","r","n","i","S","c","h","a","l","p","d","u","f","b","y$1","y","v","_","m","g","$","x","E","A","C","P","V","N","I","L","z","H","R","k","Z","B","D","echarts","GridComponent","TitleComponent","ToolboxComponent","TooltipComponent","LegendComponent","DataZoomComponent","LineChart","BarChart","ScatterChart","CanvasRenderer","UniversalTransition","LegacyGridContainLabel","WidgetLinechart","LitElement","changedProperties","_changedProperties","chart","theme","cssTextColor","cssBgColor","excludeKeys","filteredTheme","key","valueIdx","params","raw","num","horizontal","categoryIdx","chartM","ds","distincts","derivedBgColors","tinycolor","derivedBdColors","piv","prefix","label","name","lineColor","fillColor","data","toTuple","data2","minDate","maxDate","dates","valueAxisIndex","pds","chartName","existingIds","seriesId","suffix","doomedCharts","labelA","va","labelB","vb","orderA","orderB","point","now","maxTimestamp","series","seriesData","timestamp","timeSinceLastUpdate","canvas","showLegend","showTitle","showXAxis","showYAxis","showBox","currentConfig","configChanged","option","dataMin","dataMax","timeRangeStart","timeRangeEnd","axisMin","axisMax","showZoom","yAxes","hasValueLabels","rightAxisUsed","leftAxisUsed","showLeftAxis","showRightAxis","yAxisLabel","yAxisLabelRight","hasYAxisLabel","hasYAxisLabelRight","yType","numericAxisLabel","value","catAxis","axis","index","topPadding","ZOOM_THICKNESS","zoomPadBottom","zoomPadRight","animationDuration","existingChart","newContainer","html","css","__decorateClass","property","state","query","customElement"],"mappings":";;;;;;AAKA,MAAMA,IAAE,YAAWC,KAAED,EAAE,eAAsBA,EAAE,aAAX,UAAqBA,EAAE,SAAS,iBAAe,wBAAuB,SAAS,aAAW,aAAY,cAAc,WAAUE,KAAE,uBAAM,GAAGC,KAAE,oBAAI;AAAO,IAAAC,KAAC,MAAO;AAAA,EAAC,YAAY,GAAE,GAAED,GAAE;AAAC,QAAG,KAAK,eAAa,IAAGA,MAAID,GAAE,OAAM,MAAM,mEAAmE;AAAE,SAAK,UAAQ,GAAE,KAA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AAA,EAAhBE,GAAA;AAAM,GA5BElG,EA4BQ,WAAA,sBAAA,CAAA;AAEjBgG,EAAA;AAAA,EADCG,GAAM,kBAAkB;AAAA,GA7BhBnG,EA8BT,WAAA,kBAAA,CAAA;AA9BSA,IAANgG,EAAA;AAAA,EADNI,GAAc,wBAAqC;AAAA,GACvCpG,CAAA;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8]}
|
|
1
|
+
{"version":3,"file":"widget-linechart.js","sources":["../node_modules/@lit/reactive-element/css-tag.js","../node_modules/@lit/reactive-element/reactive-element.js","../node_modules/lit-html/lit-html.js","../node_modules/lit-element/lit-element.js","../node_modules/@lit/reactive-element/decorators/custom-element.js","../node_modules/@lit/reactive-element/decorators/property.js","../node_modules/@lit/reactive-element/decorators/state.js","../node_modules/@lit/reactive-element/decorators/base.js","../node_modules/@lit/reactive-element/decorators/query.js","../src/widget-linechart.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(s)+t[o+1],t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const e of o){const o=document.createElement(\"style\"),n=t.litNonce;void 0!==n&&o.setAttribute(\"nonce\",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as s}from\"./css-tag.js\";export{CSSResult,css,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{is:i,defineProperty:e,getOwnPropertyDescriptor:h,getOwnPropertyNames:r,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:\"\",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),b={attribute:!0,type:String,converter:u,reflect:!1,useDefault:!1,hasChanged:f};Symbol.metadata??=Symbol(\"metadata\"),a.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e(this.prototype,t,h)}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d(\"elementProperties\")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d(\"finalized\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d(\"properties\"))){const t=this.properties,s=[...r(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(t(s))}else void 0!==s&&i.push(t(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null}}requestUpdate(t,s,i,e=!1,h){if(void 0!==t){const r=this.constructor;if(!1===e&&(h=this[t]),i??=r.getPropertyOptions(t),!((i.hasChanged??f)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,i))))return;this.C(t,s,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),!0!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),!0===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];!0!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e)}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(s)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:\"open\"},y[d(\"elementProperties\")]=new Map,y[d(\"finalized\")]=new Map,p?.({ReactiveElement:y}),(a.reactiveElementVersions??=[]).push(\"2.1.2\");export{y as ReactiveElement,s as adoptStyles,u as defaultConverter,t as getCompatibleStyle,f as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,i=t=>t,s=t.trustedTypes,e=s?s.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,h=\"$lit$\",o=`lit$${Math.random().toFixed(9).slice(2)}$`,n=\"?\"+o,r=`<${n}>`,l=document,c=()=>l.createComment(\"\"),a=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,u=Array.isArray,d=t=>u(t)||\"function\"==typeof t?.[Symbol.iterator],f=\"[ \\t\\n\\f\\r]\",v=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,_=/-->/g,m=/>/g,p=RegExp(`>|${f}(?:([^\\\\s\"'>=/]+)(${f}*=${f}*(?:[^ \\t\\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,\"g\"),g=/'/g,$=/\"/g,y=/^(?:script|style|textarea|title)$/i,x=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),b=x(1),w=x(2),T=x(3),E=Symbol.for(\"lit-noChange\"),A=Symbol.for(\"lit-nothing\"),C=new WeakMap,P=l.createTreeWalker(l,129);function V(t,i){if(!u(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return void 0!==e?e.createHTML(i):i}const N=(t,i)=>{const s=t.length-1,e=[];let n,l=2===i?\"<svg>\":3===i?\"<math>\":\"\",c=v;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,f=0;for(;f<s.length&&(c.lastIndex=f,u=c.exec(s),null!==u);)f=c.lastIndex,c===v?\"!--\"===u[1]?c=_:void 0!==u[1]?c=m:void 0!==u[2]?(y.test(u[2])&&(n=RegExp(\"</\"+u[2],\"g\")),c=p):void 0!==u[3]&&(c=p):c===p?\">\"===u[0]?(c=n??v,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?p:'\"'===u[3]?$:g):c===$||c===g?c=p:c===_||c===m?c=v:(c=p,n=void 0);const x=c===p&&t[i+1].startsWith(\"/>\")?\" \":\"\";l+=c===v?s+r:d>=0?(e.push(a),s.slice(0,d)+h+s.slice(d)+o+x):s+o+(-2===d?i:x)}return[V(t,l+(t[s]||\"<?>\")+(2===i?\"</svg>\":3===i?\"</math>\":\"\")),e]};class S{constructor({strings:t,_$litType$:i},e){let r;this.parts=[];let l=0,a=0;const u=t.length-1,d=this.parts,[f,v]=N(t,i);if(this.el=S.createElement(f,e),P.currentNode=this.el.content,2===i||3===i){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=P.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(h)){const i=v[a++],s=r.getAttribute(t).split(o),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:l,name:e[2],strings:s,ctor:\".\"===e[1]?I:\"?\"===e[1]?L:\"@\"===e[1]?z:H}),r.removeAttribute(t)}else t.startsWith(o)&&(d.push({type:6,index:l}),r.removeAttribute(t));if(y.test(r.tagName)){const t=r.textContent.split(o),i=t.length-1;if(i>0){r.textContent=s?s.emptyScript:\"\";for(let s=0;s<i;s++)r.append(t[s],c()),P.nextNode(),d.push({type:2,index:++l});r.append(t[i],c())}}}else if(8===r.nodeType)if(r.data===n)d.push({type:2,index:l});else{let t=-1;for(;-1!==(t=r.data.indexOf(o,t+1));)d.push({type:7,index:l}),t+=o.length-1}l++}}static createElement(t,i){const s=l.createElement(\"template\");return s.innerHTML=t,s}}function M(t,i,s=t,e){if(i===E)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=a(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=M(t,h._$AS(t,i.values),h,e)),i}class R{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??l).importNode(i,!0);P.currentNode=e;let h=P.nextNode(),o=0,n=0,r=s[0];for(;void 0!==r;){if(o===r.index){let i;2===r.type?i=new k(h,h.nextSibling,this,t):1===r.type?i=new r.ctor(h,r.name,r.strings,this,t):6===r.type&&(i=new Z(h,this,t)),this._$AV.push(i),r=s[++n]}o!==r?.index&&(h=P.nextNode(),o++)}return P.currentNode=l,e}p(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class k{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=M(this,t,i),a(t)?t===A||null==t||\"\"===t?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==E&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):d(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==A&&a(this._$AH)?this._$AA.nextSibling.data=t:this.T(l.createTextNode(t)),this._$AH=t}$(t){const{values:i,_$litType$:s}=t,e=\"number\"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=S.createElement(V(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else{const t=new R(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t}}_$AC(t){let i=C.get(t.strings);return void 0===i&&C.set(t.strings,i=new S(t)),i}k(t){u(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new k(this.O(c()),this.O(c()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);t!==this._$AB;){const s=i(t).nextSibling;i(t).remove(),t=s}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class H{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=A,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=A}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=M(this,t,i,0),o=!a(t)||t!==this._$AH&&t!==E,o&&(this._$AH=t);else{const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=M(this,e[s+n],i,n),r===E&&(r=this._$AH[n]),o||=!a(r)||r!==this._$AH[n],r===A?t=A:t!==A&&(t+=(r??\"\")+h[n+1]),this._$AH[n]=r}o&&!e&&this.j(t)}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??\"\")}}class I extends H{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===A?void 0:t}}class L extends H{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==A)}}class z extends H{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5}_$AI(t,i=this){if((t=M(this,t,i,0)??A)===E)return;const s=this._$AH,e=t===A&&s!==A||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==A&&(s===A||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){\"function\"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){M(this,t)}}const j={M:h,P:o,A:n,C:1,L:N,R,D:d,V:M,I:k,H,N:L,U:z,B:I,F:Z},B=t.litHtmlPolyfillSupport;B?.(S,k),(t.litHtmlVersions??=[]).push(\"3.3.2\");const D=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new k(i.insertBefore(c(),t),t,void 0,s??{})}return h._$AI(t),h};export{j as _$LH,b as html,T as mathml,E as noChange,A as nothing,D as render,w as svg};\n//# sourceMappingURL=lit-html.js.map\n","import{ReactiveElement as t}from\"@lit/reactive-element\";export*from\"@lit/reactive-element\";import{render as e,noChange as r}from\"lit-html\";export*from\"lit-html\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const s=globalThis;class i extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=e(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return r}}i._$litElement$=!0,i[\"finalized\"]=!0,s.litElementHydrateSupport?.({LitElement:i});const o=s.litElementPolyfillSupport;o?.({LitElement:i});const n={_$AK:(t,e,r)=>{t._$AK(e,r)},_$AL:t=>t._$AL};(s.litElementVersions??=[]).push(\"4.2.2\");export{i as LitElement,n as _$LE};\n//# sourceMappingURL=lit-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=t=>(e,o)=>{void 0!==o?o.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)};export{t as customElement};\n//# sourceMappingURL=custom-element.js.map\n","import{notEqual as t,defaultConverter as e}from\"../reactive-element.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o={attribute:!0,type:String,converter:e,reflect:!1,hasChanged:t},r=(t=o,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),\"setter\"===n&&((t=Object.create(t)).wrapped=!0),s.set(r.name,t),\"accessor\"===n){const{name:o}=r;return{set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t,!0,r)},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if(\"setter\"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t,!0,r)}}throw Error(\"Unsupported decorator location: \"+n)};function n(t){return(e,o)=>\"object\"==typeof o?r(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}export{n as property,r as standardProperty};\n//# sourceMappingURL=property.js.map\n","import{property as t}from\"./property.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function r(r){return t({...r,state:!0,attribute:!1})}export{r as state};\n//# sourceMappingURL=state.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst e=(e,t,c)=>(c.configurable=!0,c.enumerable=!0,Reflect.decorate&&\"object\"!=typeof t&&Object.defineProperty(e,t,c),c);export{e as desc};\n//# sourceMappingURL=base.js.map\n","import{desc as t}from\"./base.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function e(e,r){return(n,s,i)=>{const o=t=>t.renderRoot?.querySelector(e)??null;if(r){const{get:e,set:r}=\"object\"==typeof s?n:i??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return t(n,s,{get(){let t=e.call(this);return void 0===t&&(t=o(this),(null!==t||this.hasUpdated)&&r.call(this,t)),t}})}return t(n,s,{get(){return o(this)}})}}export{e as query};\n//# sourceMappingURL=query.js.map\n","import { html, css, LitElement, PropertyValueMap } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\n\nimport * as echarts from 'echarts/core'\nimport {\n TitleComponent,\n ToolboxComponent,\n TooltipComponent,\n LegendComponent,\n DataZoomComponent,\n GridComponent\n} from 'echarts/components'\nimport { LineChart, BarChart, ScatterChart } from 'echarts/charts'\nimport { UniversalTransition, LegacyGridContainLabel } from 'echarts/features'\nimport { CanvasRenderer } from 'echarts/renderers'\nimport tinycolor, { ColorInput } from 'tinycolor2'\n\necharts.use([\n GridComponent,\n TitleComponent,\n ToolboxComponent,\n TooltipComponent,\n LegendComponent,\n DataZoomComponent,\n LineChart,\n BarChart,\n ScatterChart,\n CanvasRenderer,\n UniversalTransition,\n LegacyGridContainLabel\n])\n\nimport { ChartConfiguration } from './definition-schema'\nimport { EChartsOption, SeriesOption } from 'echarts'\nimport { TitleOption } from 'echarts/types/dist/shared'\n\ntype Theme = {\n theme_name: string\n theme_object: any\n}\n\ntype SeriesOptionX = SeriesOption & {\n minDate?: number\n maxDate?: number\n drawOrder: number\n xAxisIndex?: number\n yAxisIndex?: number\n // Which value axis (0 = primary, 1 = secondary) this series belongs to,\n // independent of orientation. In a vertical chart the value axes are the\n // y axes (left/right), in a horizontal one they are the x axes (bottom/top),\n // so xAxisIndex/yAxisIndex alone cannot be read without knowing the\n // orientation — this field can.\n valueAxisIndex?: number\n}\n@customElement('widget-linechart-versionplaceholder')\nexport class WidgetLinechart extends LitElement {\n @property({ type: Object })\n inputData?: ChartConfiguration\n\n @property({ type: Object })\n theme?: Theme\n\n @property({ type: Object })\n timeRange?: { start: number; end: number }\n\n @state()\n private canvasList: Map<\n string,\n {\n echart?: echarts.ECharts\n series: SeriesOptionX[]\n doomed?: boolean\n element?: HTMLDivElement\n drawing: boolean\n lastUpdateTime?: number\n updateIntervals?: number[]\n lastMaxTimestamp?: number\n lastConfig?: string\n }\n > = new Map()\n\n @state() private themeBgColor?: string\n @state() private themeTitleColor?: string\n @state() private themeSubtitleColor?: string\n @query('.chart-container')\n chartContainer?: HTMLDivElement\n\n boxes?: HTMLDivElement[]\n origWidth: number = 0\n origHeight: number = 0\n template: EChartsOption\n modifier: number = 1\n version: string = 'versionplaceholder'\n resizeObserver?: ResizeObserver\n updateThresholdMs: number = 300\n private maxIntervalSamples: number = 3\n\n constructor() {\n super()\n\n this.template = {\n title: {\n text: 'Temperature Change in the Coming Week',\n left: 'center',\n top: 0,\n textStyle: {\n fontSize: 14\n }\n } as TitleOption,\n tooltip: {\n trigger: 'axis'\n },\n legend: {\n right: 0,\n top: 0\n },\n grid: {\n top: 30,\n bottom: 20,\n left: 20,\n right: 0,\n containLabel: true // ensures labels are not cut off\n },\n toolbox: {\n show: true,\n feature: {\n // dataZoom: {\n // yAxisIndex: 'none'\n // },\n // dataView: { readOnly: false },\n restore: {}\n // saveAsImage: {}\n }\n },\n dataZoom: [\n {\n show: false,\n realtime: true,\n // start: 30,\n // end: 70,\n xAxisIndex: [0, 1]\n }\n ],\n xAxis: {\n type: 'value', // value, time, log, category\n name: 'Time',\n nameGap: 27,\n nameLocation: 'middle',\n axisLine: {\n lineStyle: {\n width: undefined\n }\n },\n axisLabel: {\n fontSize: 14\n }\n },\n // index 0 = left (primary) axis, index 1 = right (secondary) axis.\n // Must stay function-free: the template is copied via structuredClone.\n yAxis: [\n {\n type: 'value',\n nameLocation: 'middle',\n name: 'Temperature (°C)',\n nameGap: 30,\n position: 'left',\n axisLabel: {\n fontSize: 14\n },\n axisLine: {\n lineStyle: {\n width: undefined\n }\n },\n scale: false\n },\n {\n type: 'value',\n position: 'right',\n show: false,\n name: '',\n nameGap: 30,\n axisLabel: {\n fontSize: 14\n },\n axisLine: {\n lineStyle: {\n width: undefined\n }\n },\n splitLine: {\n show: false\n },\n scale: false\n }\n ],\n series: [\n {\n name: 'Highest',\n type: 'line',\n symbolSize: 8,\n lineStyle: {\n width: 2,\n type: 'solid',\n color: 'green'\n },\n data: [10, 11, 13, 11, 12, 12, 9]\n } as SeriesOption,\n {\n name: 'Lowest',\n type: 'line',\n symbolSize: 8,\n lineStyle: {\n width: 2,\n type: 'solid'\n },\n data: [1, -2, 2, 5, 3, 2, 0]\n } as SeriesOption\n ]\n } as EChartsOption\n }\n\n update(changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {\n if (changedProperties.has('inputData')) {\n this.cachedXAxisType = undefined\n this.cachedYAxisType = undefined\n }\n if (changedProperties.has('inputData') && this.chartContainer) {\n // const drawingStates = Array.from(this.canvasList).map(([key, chart]) => chart.drawing)\n // if (drawingStates.every((d) => !d)) {\n this.transformData()\n this.applyData()\n // } else {\n // console.log('skipping linechart draw')\n // }\n }\n\n if (changedProperties.has('theme')) {\n this.registerTheme(this.theme)\n this.deleteCharts()\n this.transformData()\n this.applyData()\n }\n super.update(changedProperties)\n }\n\n protected firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {\n this.registerTheme(this.theme)\n this.transformData()\n this.applyData()\n // Add ResizeObserver for chart container\n if (this.chartContainer) {\n this.resizeObserver = new ResizeObserver(() => {\n this.canvasList.forEach((chart) => {\n chart.echart?.resize()\n })\n })\n this.resizeObserver.observe(this.chartContainer)\n }\n }\n\n registerTheme(theme?: Theme) {\n const cssTextColor = getComputedStyle(this).getPropertyValue('--re-text-color').trim()\n const cssBgColor = getComputedStyle(this).getPropertyValue('--re-tile-background-color').trim()\n this.themeBgColor = cssBgColor || this.theme?.theme_object?.backgroundColor\n this.themeTitleColor = cssTextColor || this.theme?.theme_object?.title?.textStyle?.color\n this.themeSubtitleColor =\n cssTextColor || this.theme?.theme_object?.title?.subtextStyle?.color || this.themeTitleColor\n\n if (!theme || !theme.theme_object || !theme.theme_name) return\n\n // Filter out component keys that would trigger warnings about unregistered components\n const excludeKeys = ['parallel', 'geo', 'timeline', 'visualMap', 'markPoint']\n const filteredTheme = Object.fromEntries(\n Object.entries(theme.theme_object).filter(([key]) => !excludeKeys.includes(key))\n )\n echarts.registerTheme(theme.theme_name, filteredTheme)\n }\n\n /** True when bars grow to the right instead of upwards (axis.orientation). */\n isHorizontal(): boolean {\n return this.inputData?.axis?.orientation === 'horizontal'\n }\n\n /**\n * Index of the measured y-value inside a data point's `value` tuple.\n *\n * A point is stored as `[x, y, r]` for a vertical chart. A horizontal chart\n * swaps the first two entries to `[y, x, r]`, because ECharts always maps\n * tuple index 0 to the x axis and index 1 to the y axis — and in a\n * horizontal chart the measured value is what belongs on the x axis.\n */\n private valueIndex(): number {\n return this.isHorizontal() ? 0 : 1\n }\n\n /** Index of the x-value (category/timestamp) inside a data point's `value` tuple. */\n private categoryIndex(): number {\n return this.isHorizontal() ? 1 : 0\n }\n\n /**\n * Formatter for the on-chart value labels (styling.showValueLabels).\n * Rounds to two decimals to match the numeric axis labels, and leaves\n * categorical y-values untouched.\n */\n private valueLabelFormatter(valueIdx: number) {\n return (params: any) => {\n const raw = Array.isArray(params?.value) ? params.value[valueIdx] : params?.value\n if (raw === undefined || raw === null || raw === '') return ''\n const num = Number(raw)\n return isNaN(num) ? String(raw) : String(Math.round(num * 100) / 100)\n }\n }\n\n transformData() {\n if (!this?.inputData?.dataseries?.length) return\n\n const horizontal = this.isHorizontal()\n const valueIdx = this.valueIndex()\n const categoryIdx = this.categoryIndex()\n\n // reset all existing chart dataseries\n this.canvasList.forEach((chartM) => {\n chartM.series = []\n chartM.doomed = true\n })\n this.inputData.dataseries.sort((a, b) => (a.advanced?.drawOrder ?? 0) - (b.advanced?.drawOrder ?? 0))\n this.inputData.dataseries.forEach((ds) => {\n ds.advanced ??= {}\n ds.advanced.chartName ??= ''\n\n ds.data ??= []\n\n // pivot data\n const distincts = [...new Set(ds.data.map((d) => d.pivot ?? ''))].sort()\n const derivedBgColors = tinycolor(ds.backgroundColor as ColorInput | undefined)\n .monochromatic(distincts.length)\n .map((c: any) => c.toHexString())\n const derivedBdColors = tinycolor(ds.borderColor as ColorInput | undefined)\n .monochromatic(distincts.length)\n .map((c: any) => c.toHexString())\n //sd\n distincts.forEach((piv, i) => {\n const prefix = piv ?? ''\n const label = ds.label ?? ''\n const name = prefix + (!!prefix && !!label ? ' - ' : '') + label\n const lineColor = ds.borderColor\n ? ds.advanced?.chartName?.includes('#split#')\n ? ds.borderColor\n : derivedBdColors[i]\n : undefined\n const fillColor = ds.backgroundColor\n ? ds.advanced?.chartName?.includes('#split#')\n ? ds.backgroundColor\n : derivedBgColors[i]\n : undefined\n const data = distincts.length === 1 ? ds.data : ds.data?.filter((d) => d.pivot === piv)\n // The value tuple is [x, y, r] for a vertical chart and [y, x, r]\n // for a horizontal one — ECharts always reads index 0 as the x\n // axis, and in a horizontal chart the measured value lives there.\n const toTuple = (x: any, y: any, r: any) => (horizontal ? [y, x, r] : [x, y, r])\n let data2 = this.inputData?.axis?.timeseries\n ? (data?.map((d) => ({\n name: d.x,\n value: toTuple(new Date(d.x ?? '').getTime(), d.y, d.r)\n })) ?? [])\n : (data?.map((d) => ({ name: d.x, value: toTuple(d.x, d.y, d.r) })) ?? [])\n\n let minDate: number = 0,\n maxDate: number = 0,\n extraData: (string | number | undefined)[][] = []\n if (this.xAxisType() === 'time' && data2) {\n const dates = data2.map((d: any) => d.value[categoryIdx] as number)\n minDate = Math.min(...dates)\n maxDate = Math.max(...dates)\n // extraData = (pds?.data as any[][])?.filter((d: any) => d[0] < minDate) ?? []\n // data2.unshift(...extraData) // add old data to the beginning of the new data\n // data2 = [...extraData, ...data2] // leave old data in for smooth shifting animation and delete after draw\n }\n const valueAxisIndex = ds.yAxis === 'right' ? 1 : 0\n const pds: SeriesOptionX = {\n id: name,\n name: name,\n minDate,\n maxDate,\n type: ds.type ?? 'line',\n lineStyle: {\n color: lineColor,\n width: ds.styling?.borderWidth ?? 2,\n type: ds.styling?.borderDash ?? 'solid'\n },\n smooth: false,\n itemStyle: {\n color: fillColor,\n borderColor: lineColor,\n borderWidth: ds.styling?.borderWidth ?? 2\n },\n areaStyle: ds.styling?.fill ? { color: fillColor } : undefined,\n symbol: ds.styling?.pointStyle ?? 'circle',\n symbolSize: (d: any[]) => d[2] ?? 0,\n showSymbol: ds.styling?.pointStyle === 'none' ? false : true,\n label: {\n show: ds.styling?.showValueLabels ?? false,\n // Bars grow upwards when vertical and rightwards when\n // horizontal, so the label sits past the growing end.\n position: horizontal ? 'right' : 'top',\n fontSize: 12,\n formatter: this.valueLabelFormatter(valueIdx)\n },\n data: data2 ?? [],\n drawOrder: ds.advanced?.drawOrder ?? 0,\n valueAxisIndex: valueAxisIndex,\n // The secondary value axis is the right y axis when vertical\n // and the top x axis when horizontal.\n xAxisIndex: horizontal ? valueAxisIndex : 0,\n yAxisIndex: horizontal ? 0 : valueAxisIndex\n }\n let chartName = ds.advanced?.chartName ?? ''\n chartName = chartName.replace('#split#', prefix)\n\n const chart = this.setupChart(chartName)\n\n // Ensure unique id per chart (ECharts requires unique ids)\n const existingIds = chart?.series.map((s) => s.id) ?? []\n let seriesId = name\n let suffix = 2\n while (existingIds.includes(seriesId)) {\n seriesId = `${name}_${suffix++}`\n }\n pds.id = seriesId\n\n chart?.series.push(pds)\n })\n })\n\n const doomedCharts: string[] = []\n // remove all doomed charts\n this.canvasList.forEach((chart, label) => {\n if (!chart.doomed) return\n chart.echart?.dispose()\n chart.element?.remove()\n doomedCharts.push(label)\n })\n\n doomedCharts.forEach((label) => this.canvasList.delete(label))\n this.canvasList = new Map(\n [...this.canvasList.entries()].sort(([labelA, va], [labelB, vb]) => {\n const orderA = va.series?.[0].drawOrder ?? 0\n const orderB = vb.series?.[0].drawOrder ?? 0\n if (orderA !== orderB) {\n return orderA - orderB\n }\n return labelA.localeCompare(labelB)\n })\n )\n\n // Resize remaining charts if any were removed\n if (doomedCharts.length > 0) {\n this.canvasList.forEach((chart) => {\n chart.echart?.resize()\n })\n }\n }\n\n // cached per inputData change — cleared in update(), see xAxisType()/yAxisType()\n private cachedXAxisType?: 'value' | 'category' | 'time'\n private cachedYAxisType?: 'value' | 'category'\n\n xAxisType(): 'value' | 'log' | 'category' | 'time' | undefined {\n if (this.cachedXAxisType) return this.cachedXAxisType\n if (this.inputData?.axis?.timeseries) {\n this.cachedXAxisType = 'time'\n return this.cachedXAxisType\n }\n this.cachedXAxisType = 'value'\n for (const ds of this.inputData?.dataseries ?? []) {\n const point = ds.data?.find((d) => d.x !== undefined && d.x !== null)\n if (point) {\n this.cachedXAxisType = !isNaN(Number(point.x)) ? 'value' : 'category'\n break\n }\n }\n return this.cachedXAxisType\n }\n\n yAxisType(): 'value' | 'log' | 'category' | undefined {\n if (this.cachedYAxisType) return this.cachedYAxisType\n this.cachedYAxisType = 'value'\n for (const ds of this.inputData?.dataseries ?? []) {\n const point = ds.data?.find((d) => d.y !== undefined && d.y !== null)\n if (point) {\n this.cachedYAxisType = !isNaN(Number(point.y)) ? 'value' : 'category'\n break\n }\n }\n return this.cachedYAxisType\n }\n\n calculateAnimationDuration(chart: any, label: string): number {\n const now = Date.now()\n const isSingleSeries = chart.series.length === 1\n // Only apply adaptive animation for single series charts\n if (!isSingleSeries || !this.inputData?.axis?.timeseries) {\n return this.updateThresholdMs\n }\n\n // Find the newest timestamp in the current chart data\n let maxTimestamp = 0\n if (this.xAxisType() === 'time') {\n for (const series of chart.series) {\n const seriesData = series.data as any[]\n for (const point of seriesData || []) {\n const timestamp = point.value?.[0] || 0\n if (timestamp > maxTimestamp) {\n maxTimestamp = timestamp\n }\n }\n }\n } else {\n // For non-time series, use the current time as proxy\n maxTimestamp = now\n }\n\n // Only track update if the data actually changed (new timestamp)\n chart.lastMaxTimestamp = chart.lastMaxTimestamp ?? 0\n const dataChanged = maxTimestamp > chart.lastMaxTimestamp\n if (dataChanged) {\n chart.updateIntervals ??= []\n if (chart.lastUpdateTime > 0) {\n const timeSinceLastUpdate = now - chart.lastUpdateTime\n chart.updateIntervals.push(timeSinceLastUpdate)\n if (chart.updateIntervals.length > this.maxIntervalSamples) {\n chart.updateIntervals.shift()\n }\n }\n chart.lastUpdateTime = now\n chart.lastMaxTimestamp = maxTimestamp\n }\n\n // Calculate average update interval\n const avgInterval =\n chart.updateIntervals && chart.updateIntervals.length > 0\n ? chart.updateIntervals.reduce((a: number, b: number) => a + b, 0) /\n chart.updateIntervals.length\n : this.updateThresholdMs\n return avgInterval\n }\n\n applyData() {\n const modifier = 1\n // Sort chartContainer children by drawOrder and label\n if (!this.chartContainer) return\n const horizontal = this.isHorizontal()\n for (const canvas of this.canvasList.values()) {\n if (canvas.element) this.chartContainer.appendChild(canvas.element)\n }\n this.canvasList.forEach((chart, label) => {\n chart.series.sort((a, b) => ((a.name as string) > (b.name as string) ? 1 : -1))\n\n // Visibility controls\n const showLegend = this.inputData?.axis?.showLegend ?? true\n const showTitle = this.inputData?.axis?.showTitle ?? true\n const showXAxis = this.inputData?.axis?.showXAxis ?? true\n const showYAxis = this.inputData?.axis?.showYAxis ?? true\n const showBox = this.inputData?.axis?.showBox ?? false\n\n // Track config changes to determine if full rebuild needed\n const currentConfig = JSON.stringify({\n showLegend,\n showTitle,\n showXAxis,\n showYAxis,\n showBox,\n xAxisLabel: this.inputData?.axis?.xAxisLabel,\n yAxisLabel: this.inputData?.axis?.yAxisLabel,\n xAxisZoom: this.inputData?.axis?.xAxisZoom,\n yAxisScaling: this.inputData?.axis?.yAxisScaling,\n yAxisLabelRight: this.inputData?.axis?.yAxisLabelRight,\n yAxisScalingRight: this.inputData?.axis?.yAxisScalingRight,\n xAxisType: this.xAxisType(),\n yAxisType: this.yAxisType(),\n // Flipping the orientation swaps which option key holds the\n // single category axis and which holds the value-axis array,\n // so it must force a notMerge rebuild rather than a merge.\n orientation: this.inputData?.axis?.orientation ?? 'vertical',\n seriesCount: chart.series.length,\n seriesNames: chart.series.map((s) => s.name).join(','),\n seriesAxes: chart.series.map((s) => s.valueAxisIndex ?? 0).join(','),\n seriesLabels: chart.series.map((s) => ((s as any).label?.show ? 1 : 0)).join(',')\n })\n const configChanged = chart.lastConfig !== currentConfig\n chart.lastConfig = currentConfig\n\n // Always build the option from the template — never from getOption().\n //\n // getOption() returns every component normalized to an *array*, while\n // everything below treats the single-instance ones (title, xAxis, grid,\n // legend, toolbox) as plain objects. `{ ...option.grid }` on an array\n // yields `{ '0': grid }`, which ECharts then deep-merges back into its\n // stored option — burying a copy one level deeper on *every* update. The\n // stored option grew one level per frame until zrender's recursive\n // merge()/clone() ran out of stack, so any board left open on a live\n // time series eventually died with \"Maximum call stack size exceeded\".\n // Assignments like `option.title.text` landed on the array object for the\n // same reason and were silently dropped, which is why the title, axis\n // name, legend and zoom toolbox stopped tracking config on that path.\n //\n // A template clone carries only the keys we actually set, so a merge\n // update still preserves ECharts-side state (zoom position, animation\n // continuity) — and it skips deep-cloning every series' data each frame.\n // `configChanged` still decides merge vs. rebuild via notMerge below.\n const option: any = window.structuredClone(this.template)\n\n // Title\n option.title.text = label\n option.title.show = showTitle\n\n // Axis\n option.xAxis.name = this.inputData?.axis?.xAxisLabel ?? ''\n option.xAxis.type = this.xAxisType()\n option.xAxis.show = showXAxis\n if (this.xAxisType() === 'time') {\n // Use provided timeRange if available and valid, otherwise calculate from data\n const dataMin = chart.series\n .map((s) => s.minDate ?? Infinity)\n .reduce((a, b) => Math.min(a, b), Infinity)\n const dataMax = chart.series.map((s) => s.maxDate ?? 0).reduce((a, b) => Math.max(a, b), 0)\n\n const timeRangeStart = Number(this.timeRange?.start)\n const timeRangeEnd = Number(this.timeRange?.end)\n\n const axisMin = !isNaN(timeRangeStart) ? timeRangeStart : dataMin\n const axisMax = !isNaN(timeRangeEnd) ? timeRangeEnd : dataMax\n\n option.xAxis = {\n ...option.xAxis,\n min: axisMin !== Infinity ? axisMin : new Date().getTime() - 1 * 24 * 60 * 60 * 1000,\n max: axisMax !== 0 ? axisMax : new Date().getTime()\n }\n }\n\n const showZoom = this.inputData?.axis?.xAxisZoom ?? false\n option.dataZoom[0].show = showZoom\n option.toolbox.show = showZoom\n\n // Y axes: index 0 = left (primary), index 1 = right (secondary).\n // The template holds an array; normalize anyway so a template edit\n // that drops down to a single axis object cannot silently break this.\n const yAxes: any[] = Array.isArray(option.yAxis) ? option.yAxis : [option.yAxis ?? {}]\n while (yAxes.length < 2) yAxes.push({})\n option.yAxis = yAxes\n\n const hasValueLabels = chart.series.some((s) => !!(s as any).label?.show)\n const rightAxisUsed = chart.series.some((s) => (s.valueAxisIndex ?? 0) === 1)\n const leftAxisUsed =\n chart.series.length === 0 || chart.series.some((s) => (s.valueAxisIndex ?? 0) === 0)\n const showLeftAxis = showYAxis && leftAxisUsed\n const showRightAxis = showYAxis && rightAxisUsed\n\n const yAxisLabel = this.inputData?.axis?.yAxisLabel ?? ''\n const yAxisLabelRight = this.inputData?.axis?.yAxisLabelRight ?? ''\n const hasYAxisLabel = showLeftAxis && !!yAxisLabel\n const hasYAxisLabelRight = showRightAxis && !!yAxisLabelRight\n\n const yType = this.yAxisType()\n const numericAxisLabel = ['value', 'log'].includes(yType ?? '')\n ? { fontSize: 14, formatter: (value: number) => Math.round(value * 100) / 100 }\n : undefined\n\n Object.assign(yAxes[0], {\n type: yType,\n name: yAxisLabel,\n scale: this.inputData?.axis?.yAxisScaling ?? false,\n show: showLeftAxis,\n position: 'left',\n nameLocation: 'end',\n nameGap: 10,\n nameTextStyle: { align: 'left' },\n axisLine: { show: true }\n })\n if (numericAxisLabel) yAxes[0].axisLabel = numericAxisLabel\n\n Object.assign(yAxes[1], {\n type: yType,\n name: showRightAxis ? yAxisLabelRight : '',\n scale: this.inputData?.axis?.yAxisScalingRight ?? false,\n show: showRightAxis,\n position: 'right',\n nameLocation: 'end',\n nameGap: 10,\n nameTextStyle: { align: 'right' },\n axisLine: { show: true },\n splitLine: { show: false }\n })\n if (numericAxisLabel) yAxes[1].axisLabel = numericAxisLabel\n\n // Orientation swap. Everything above builds one category axis (the\n // x-values) and a two-entry array of value axes (the y-values). A\n // vertical chart puts them where they were built; a horizontal one\n // moves the category axis onto `yAxis` and the value axes onto\n // `xAxis`. The axis *labels* keep their meaning either way:\n // 'X-Axis Label' names the x-value dimension wherever it is drawn.\n if (horizontal) {\n const catAxis: any = Array.isArray(option.xAxis) ? option.xAxis[0] : option.xAxis\n option.yAxis = {\n ...catAxis,\n position: 'left',\n // Read top-to-bottom, so the first data point is the top\n // bar — the convention for ranked horizontal bar charts.\n inverse: true,\n // 'start' is the top of an inverted axis, which keeps the\n // axis name clear of the value axis running along the bottom.\n // When a secondary value axis is in use it is drawn along\n // the top, so the name has to clear its tick labels too.\n nameLocation: 'start',\n nameGap: showRightAxis ? 30 : 10,\n nameTextStyle: { align: 'left' }\n }\n option.xAxis = yAxes.map((axis: any, index: number) => ({\n ...axis,\n position: index === 0 ? 'bottom' : 'top',\n nameLocation: 'middle',\n nameGap: 27,\n nameTextStyle: { align: 'center' }\n }))\n // Zooming still applies to the x-value dimension, which now\n // lives on the y axis.\n option.dataZoom = [\n { ...(option.dataZoom?.[0] ?? {}), xAxisIndex: undefined, yAxisIndex: [0] }\n ]\n }\n\n option.series = chart.series\n option.legend.show = showLegend\n\n // Dynamic grid padding based on visible elements\n // Add extra top space when Y-axis label is shown at 'end' position.\n // The right axis name and the legend both live in the top-right corner,\n // so reserve an extra row when both are visible.\n const topPadding =\n (showTitle || hasYAxisLabel || hasYAxisLabelRight ? 30 : 0) +\n (showLegend && hasYAxisLabelRight ? 25 : 0)\n // An ECharts slider dataZoom is ~30px thick and sits outside the\n // grid's own bookkeeping, so nothing reserves room for it. Left\n // unaccounted it is drawn straight over the plot, clipping the foot\n // of every bar and washing out the axis labels underneath.\n const ZOOM_THICKNESS = 40\n const zoomPadBottom = showZoom && !horizontal ? ZOOM_THICKNESS : 0\n const zoomPadRight = showZoom && horizontal ? ZOOM_THICKNESS : 0\n option.grid = {\n ...option.grid,\n show: showBox,\n backgroundColor: 'transparent',\n borderWidth: showBox ? 1 : 0,\n borderColor: this.themeTitleColor ?? '#ccc',\n top: topPadding,\n // The category axis sits at the bottom when vertical and on the\n // left when horizontal; the value axis is the other way round.\n // The zoom slider is not accounted for by `containLabel`, so its\n // thickness has to be reserved here as well — see ZOOM_THICKNESS.\n bottom: ((horizontal ? showLeftAxis : showXAxis) ? 20 : 0) + zoomPadBottom,\n left: (horizontal ? showXAxis : showLeftAxis) ? 20 : 0,\n // A horizontal chart grows towards the right edge, so the last\n // axis tick and any value label printed past the end of a bar\n // need room that `containLabel` does not reserve for them.\n right: (horizontal ? (hasValueLabels ? 45 : 15) : 0) + zoomPadRight,\n containLabel: showXAxis || showYAxis\n }\n\n // Anchor the slider to the edge whose dimension it zooms: the bottom\n // for a vertical chart, the right-hand side for a horizontal one\n // (where it controls the y axis and ECharts draws it upright).\n if (showZoom) {\n Object.assign(\n option.dataZoom[0],\n horizontal\n ? { right: 0, top: topPadding, bottom: 20, left: undefined }\n : { bottom: 0, left: undefined, right: undefined, top: undefined }\n )\n }\n\n // Calculate animation duration based on update frequency\n const animationDuration = this.updateThresholdMs //this.calculateAnimationDuration(chart, label)\n option.animation = true\n option.animationEasing = 'linear'\n option.animationDuration = animationDuration\n option.animationDurationUpdate = animationDuration\n chart.echart?.on('finished', () => (chart.drawing = false))\n chart.drawing = true\n chart.echart?.setOption(option, { notMerge: configChanged, lazyUpdate: true })\n // chart.echart?.resize()\n })\n }\n\n // ECharts positions a slider dataZoom against the grid rect from *before*\n // `containLabel` insets the plot to make room for the axis labels, so the\n // slider comes out shifted towards the label side by exactly that inset and\n // its window no longer lines up with the data above it. The real plot rect\n // only exists after a render, so this runs on the chart's 'finished' event\n // and pins the slider to it. The pin itself triggers another render and\n // thus another 'finished'; the already-aligned check ends that recursion.\n private alignZoomSlider(echart: echarts.ECharts) {\n if (!(this.inputData?.axis?.xAxisZoom ?? false)) return\n const model = (echart as any).getModel?.()\n const rect = model?.getComponent('grid')?.coordinateSystem?.getRect?.()\n const dz = model?.getComponent('dataZoom', 0)?.option\n if (!rect || !dz) return\n // The slider tracks the zoomed dimension: the plot's width along the\n // bottom when vertical, its height along the right edge when horizontal.\n const pin: Record<string, number> = this.isHorizontal()\n ? { top: rect.y, height: rect.height }\n : { left: rect.x, width: rect.width }\n if (Object.keys(pin).every((k) => Math.abs(pin[k] - dz[k]) < 0.5)) return\n echart.setOption({ dataZoom: [pin] }, { lazyUpdate: true })\n }\n\n deleteCharts() {\n this.canvasList.forEach((chart, label) => {\n chart.echart?.dispose()\n chart.element?.remove()\n this.canvasList.delete(label)\n })\n }\n\n setupChart(label: string) {\n const existingChart = this.canvasList.get(label)\n\n if (existingChart) {\n delete existingChart.doomed\n return existingChart\n }\n\n if (!this.chartContainer) {\n // console.warn('Chart container not found')\n return\n }\n const newContainer = document.createElement('div')\n newContainer.setAttribute('name', label)\n newContainer.setAttribute('class', 'sizer')\n this.chartContainer.appendChild(newContainer)\n\n const newChart = echarts.init(newContainer, this.theme?.theme_name)\n newChart.on('finished', () => this.alignZoomSlider(newChart))\n const chart = {\n echart: newChart,\n series: [] as SeriesOptionX[],\n element: newContainer,\n drawing: false,\n lastUpdateTime: 0,\n updateIntervals: [],\n lastMaxTimestamp: 0\n }\n this.canvasList.set(label, chart)\n\n return chart\n }\n\n disconnectedCallback() {\n if (this.resizeObserver && this.chartContainer) {\n this.resizeObserver.unobserve(this.chartContainer)\n this.resizeObserver.disconnect()\n }\n super.disconnectedCallback()\n }\n\n static styles = css`\n :host {\n display: block;\n font-family: sans-serif;\n box-sizing: border-box;\n position: relative;\n margin: auto;\n container-type: size;\n }\n\n .paging:not([active]) {\n display: none !important;\n }\n\n .wrapper {\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n padding: 2cqh 2cqw;\n box-sizing: border-box;\n gap: 12px;\n }\n\n .sizer {\n flex: 1;\n overflow: hidden;\n position: relative;\n }\n\n .chart-container {\n display: flex;\n flex: 1;\n overflow: hidden;\n position: relative;\n }\n\n header {\n display: flex;\n flex-direction: column;\n }\n h3 {\n margin: 0;\n max-width: 300px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n p {\n margin: 10px 0 0 0;\n max-width: 300px;\n font-size: 14px;\n line-height: 17px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .chart {\n width: 600px; /* will be overriden by adjustSizes */\n height: 230px;\n }\n\n .columnLayout {\n flex-direction: column;\n }\n\n .no-data {\n font-size: 20px;\n display: flex;\n height: 100%;\n width: 100%;\n text-align: center;\n align-items: center;\n justify-content: center;\n }\n `\n\n render() {\n return html`\n <div\n class=\"wrapper\"\n style=\"background-color: ${this.themeBgColor}; color: ${this.themeTitleColor}\"\n >\n <header class=\"paging\" ?active=${this.inputData?.title || this.inputData?.subTitle}>\n <h3 class=\"paging\" ?active=${this.inputData?.title}>${this.inputData?.title}</h3>\n <p\n class=\"paging\"\n ?active=${this.inputData?.subTitle}\n style=\"color: ${this.themeSubtitleColor}\"\n >\n ${this.inputData?.subTitle}\n </p>\n </header>\n <div class=\"paging no-data\" ?active=${this.canvasList.size === 0}>No Data</div>\n <div\n class=\"chart-container ${this?.inputData?.axis?.columnLayout ? 'columnLayout' : ''}\"\n ></div>\n </div>\n `\n }\n}\n"],"names":["t","e","s","o","n$3","r","n","i","S","c","h","a","l","p","d","u","f","b","y$1","y","v","_","m","g","$","x","E","A","C","P","V","N","I","L","z","H","R","k","Z","B","D","echarts","GridComponent","TitleComponent","ToolboxComponent","TooltipComponent","LegendComponent","DataZoomComponent","LineChart","BarChart","ScatterChart","CanvasRenderer","UniversalTransition","LegacyGridContainLabel","WidgetLinechart","LitElement","changedProperties","_changedProperties","chart","theme","cssTextColor","cssBgColor","excludeKeys","filteredTheme","key","valueIdx","params","raw","num","horizontal","categoryIdx","chartM","ds","distincts","derivedBgColors","tinycolor","derivedBdColors","piv","prefix","label","name","lineColor","fillColor","data","toTuple","data2","minDate","maxDate","dates","valueAxisIndex","pds","chartName","existingIds","seriesId","suffix","doomedCharts","labelA","va","labelB","vb","orderA","orderB","point","now","maxTimestamp","series","seriesData","timestamp","timeSinceLastUpdate","canvas","showLegend","showTitle","showXAxis","showYAxis","showBox","currentConfig","configChanged","option","dataMin","dataMax","timeRangeStart","timeRangeEnd","axisMin","axisMax","showZoom","yAxes","hasValueLabels","rightAxisUsed","leftAxisUsed","showLeftAxis","showRightAxis","yAxisLabel","yAxisLabelRight","hasYAxisLabel","hasYAxisLabelRight","yType","numericAxisLabel","value","catAxis","axis","index","topPadding","ZOOM_THICKNESS","zoomPadBottom","zoomPadRight","animationDuration","echart","model","rect","dz","pin","existingChart","newContainer","newChart","html","css","__decorateCl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;AAAA,EADNI,GAAc,wBAAqC;AAAA,GACvC1G,CAAA;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8]}
|
package/package.json
CHANGED
|
@@ -54,7 +54,7 @@ export type StackMultipleChartsVertically = boolean;
|
|
|
54
54
|
*/
|
|
55
55
|
export type ShowXAxis = boolean;
|
|
56
56
|
/**
|
|
57
|
-
* When enabled, shows a slider control below the chart for zooming into specific x-axis ranges.
|
|
57
|
+
* When enabled, shows a slider control below the chart for zooming into specific x-axis ranges. Leave this DISABLED (the default) unless the user explicitly asks for a zoom, pan, or time-range slider: the slider costs vertical chart space, and dashboards usually already control the visible time range through their data query or a filter widget. Do not enable it just because the data is a long time series.
|
|
58
58
|
*/
|
|
59
59
|
export type XAxisZoomTool = boolean;
|
|
60
60
|
/**
|
|
@@ -122,7 +122,8 @@
|
|
|
122
122
|
"xAxisZoom": {
|
|
123
123
|
"title": "X-Axis Zoom Tool",
|
|
124
124
|
"type": "boolean",
|
|
125
|
-
"description": "When enabled, shows a slider control below the chart for zooming into specific x-axis ranges.
|
|
125
|
+
"description": "When enabled, shows a slider control below the chart for zooming into specific x-axis ranges. Leave this DISABLED (the default) unless the user explicitly asks for a zoom, pan, or time-range slider: the slider costs vertical chart space, and dashboards usually already control the visible time range through their data query or a filter widget. Do not enable it just because the data is a long time series.",
|
|
126
|
+
"default": false,
|
|
126
127
|
"dataDrivenDisabled": true,
|
|
127
128
|
"order": 8
|
|
128
129
|
},
|
package/src/widget-linechart.ts
CHANGED
|
@@ -793,6 +793,28 @@ export class WidgetLinechart extends LitElement {
|
|
|
793
793
|
})
|
|
794
794
|
}
|
|
795
795
|
|
|
796
|
+
// ECharts positions a slider dataZoom against the grid rect from *before*
|
|
797
|
+
// `containLabel` insets the plot to make room for the axis labels, so the
|
|
798
|
+
// slider comes out shifted towards the label side by exactly that inset and
|
|
799
|
+
// its window no longer lines up with the data above it. The real plot rect
|
|
800
|
+
// only exists after a render, so this runs on the chart's 'finished' event
|
|
801
|
+
// and pins the slider to it. The pin itself triggers another render and
|
|
802
|
+
// thus another 'finished'; the already-aligned check ends that recursion.
|
|
803
|
+
private alignZoomSlider(echart: echarts.ECharts) {
|
|
804
|
+
if (!(this.inputData?.axis?.xAxisZoom ?? false)) return
|
|
805
|
+
const model = (echart as any).getModel?.()
|
|
806
|
+
const rect = model?.getComponent('grid')?.coordinateSystem?.getRect?.()
|
|
807
|
+
const dz = model?.getComponent('dataZoom', 0)?.option
|
|
808
|
+
if (!rect || !dz) return
|
|
809
|
+
// The slider tracks the zoomed dimension: the plot's width along the
|
|
810
|
+
// bottom when vertical, its height along the right edge when horizontal.
|
|
811
|
+
const pin: Record<string, number> = this.isHorizontal()
|
|
812
|
+
? { top: rect.y, height: rect.height }
|
|
813
|
+
: { left: rect.x, width: rect.width }
|
|
814
|
+
if (Object.keys(pin).every((k) => Math.abs(pin[k] - dz[k]) < 0.5)) return
|
|
815
|
+
echart.setOption({ dataZoom: [pin] }, { lazyUpdate: true })
|
|
816
|
+
}
|
|
817
|
+
|
|
796
818
|
deleteCharts() {
|
|
797
819
|
this.canvasList.forEach((chart, label) => {
|
|
798
820
|
chart.echart?.dispose()
|
|
@@ -819,6 +841,7 @@ export class WidgetLinechart extends LitElement {
|
|
|
819
841
|
this.chartContainer.appendChild(newContainer)
|
|
820
842
|
|
|
821
843
|
const newChart = echarts.init(newContainer, this.theme?.theme_name)
|
|
844
|
+
newChart.on('finished', () => this.alignZoomSlider(newChart))
|
|
822
845
|
const chart = {
|
|
823
846
|
echart: newChart,
|
|
824
847
|
series: [] as SeriesOptionX[],
|