@record-evolution/widget-linechart 1.7.5 → 1.7.7

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.
@@ -1,6 +1,6 @@
1
1
  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
- import { LineChart as It, BarChart as Ht, ScatterChart as jt } from "echarts/charts";
3
+ import { LineChart as Ht, BarChart as It, ScatterChart as jt } from "echarts/charts";
4
4
  import { UniversalTransition as kt, LegacyGridContainLabel as Bt } from "echarts/features";
5
5
  import { CanvasRenderer as Zt } from "echarts/renderers";
6
6
  import ft from "tinycolor2";
@@ -69,7 +69,7 @@ const { is: Xt, defineProperty: Yt, getOwnPropertyDescriptor: Gt, getOwnProperty
69
69
  }
70
70
  }
71
71
  return e;
72
- } }, ht = (o, t) => !Xt(o, t), $t = { attribute: !0, type: String, converter: K, reflect: !1, useDefault: !1, hasChanged: ht };
72
+ } }, lt = (o, t) => !Xt(o, t), $t = { attribute: !0, type: String, converter: K, reflect: !1, useDefault: !1, hasChanged: lt };
73
73
  Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), J.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
74
74
  let O = class extends HTMLElement {
75
75
  static addInitializer(t) {
@@ -91,8 +91,8 @@ let O = class extends HTMLElement {
91
91
  this[e] = a;
92
92
  } };
93
93
  return { get: i, set(a) {
94
- const l = i?.call(this);
95
- n?.call(this, a), this.requestUpdate(t, l, s);
94
+ const h = i?.call(this);
95
+ n?.call(this, a), this.requestUpdate(t, h, s);
96
96
  }, configurable: !0, enumerable: !0 };
97
97
  }
98
98
  static getPropertyOptions(t) {
@@ -177,14 +177,14 @@ let O = class extends HTMLElement {
177
177
  if (i !== void 0 && this._$Em !== i) {
178
178
  const n = s.getPropertyOptions(i), a = typeof n.converter == "function" ? { fromAttribute: n.converter } : n.converter?.fromAttribute !== void 0 ? n.converter : K;
179
179
  this._$Em = i;
180
- const l = a.fromAttribute(e, n.type);
181
- this[i] = l ?? this._$Ej?.get(i) ?? l, this._$Em = null;
180
+ const h = a.fromAttribute(e, n.type);
181
+ this[i] = h ?? this._$Ej?.get(i) ?? h, this._$Em = null;
182
182
  }
183
183
  }
184
184
  requestUpdate(t, e, s, i = !1, n) {
185
185
  if (t !== void 0) {
186
186
  const a = this.constructor;
187
- if (i === !1 && (n = this[t]), s ??= a.getPropertyOptions(t), !((s.hasChanged ?? ht)(n, e) || s.useDefault && s.reflect && n === this._$Ej?.get(t) && !this.hasAttribute(a._$Eu(t, s)))) return;
187
+ if (i === !1 && (n = this[t]), s ??= a.getPropertyOptions(t), !((s.hasChanged ?? lt)(n, e) || s.useDefault && s.reflect && n === this._$Ej?.get(t) && !this.hasAttribute(a._$Eu(t, s)))) return;
188
188
  this.C(t, e, s);
189
189
  }
190
190
  this.isUpdatePending === !1 && (this._$ES = this._$EP());
@@ -214,8 +214,8 @@ let O = class extends HTMLElement {
214
214
  }
215
215
  const s = this.constructor.elementProperties;
216
216
  if (s.size > 0) for (const [i, n] of s) {
217
- const { wrapped: a } = n, l = this[i];
218
- a !== !0 || this._$AL.has(i) || l === void 0 || this.C(i, void 0, n, l);
217
+ const { wrapped: a } = n, h = this[i];
218
+ a !== !0 || this._$AL.has(i) || h === void 0 || this.C(i, void 0, n, h);
219
219
  }
220
220
  }
221
221
  let t = !1;
@@ -253,8 +253,8 @@ 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(""), Z = (o) => o === null || typeof o != "object" && typeof o != "function", ct = Array.isArray, ie = (o) => ct(o) || typeof o?.[Symbol.iterator] == "function", ot = `[
257
- \f\r]`, H = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, bt = /-->/g, _t = />/g, T = RegExp(`>|${ot}(?:([^\\s"'>=/]+)(${ot}*=${ot}*(?:[^
256
+ const ht = globalThis, vt = (o) => o, F = ht.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
+ \f\r]`, I = /<(?:(!--|\/[^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) {
260
260
  if (!ct(o) || !o.hasOwnProperty("raw")) throw Error("invalid template strings array");
@@ -262,13 +262,13 @@ function Ot(o, t) {
262
262
  }
263
263
  const ne = (o, t) => {
264
264
  const e = o.length - 1, s = [];
265
- let i, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", a = H;
266
- for (let l = 0; l < e; l++) {
267
- const r = o[l];
268
- let d, h, c = -1, p = 0;
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 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);
265
+ let i, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", a = I;
266
+ for (let h = 0; h < e; h++) {
267
+ const r = o[h];
268
+ let d, l, c = -1, p = 0;
269
+ for (; p < r.length && (a.lastIndex = p, l = a.exec(r), l !== null); ) p = a.lastIndex, a === I ? l[1] === "!--" ? a = bt : l[1] !== void 0 ? a = _t : l[2] !== void 0 ? (Dt.test(l[2]) && (i = RegExp("</" + l[2], "g")), a = T) : l[3] !== void 0 && (a = T) : a === T ? l[0] === ">" ? (a = i ?? I, c = -1) : l[1] === void 0 ? c = -2 : (c = a.lastIndex - l[2].length, d = l[1], a = l[3] === void 0 ? T : l[3] === '"' ? St : wt) : a === St || a === wt ? a = T : a === bt || a === _t ? a = I : (a = T, i = void 0);
270
+ const g = a === T && o[h + 1].startsWith("/>") ? " " : "";
271
+ n += a === I ? r + ee : c >= 0 ? (s.push(d), r.slice(0, c) + Et + r.slice(c) + A + g) : r + A + (c === -2 ? h : g);
272
272
  }
273
273
  return [Ot(o, n + (o[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
274
274
  };
@@ -277,16 +277,16 @@ class W {
277
277
  let i;
278
278
  this.parts = [];
279
279
  let n = 0, a = 0;
280
- const l = t.length - 1, r = this.parts, [d, h] = ne(t, e);
280
+ const h = t.length - 1, r = this.parts, [d, l] = ne(t, e);
281
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
- for (; (i = E.nextNode()) !== null && r.length < l; ) {
285
+ for (; (i = E.nextNode()) !== null && r.length < h; ) {
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++], 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);
288
+ const p = l[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] === "?" ? le : x[1] === "@" ? he : 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;
@@ -328,11 +328,11 @@ class ae {
328
328
  u(t) {
329
329
  const { el: { content: e }, parts: s } = this._$AD, i = (t?.creationScope ?? L).importNode(e, !0);
330
330
  E.currentNode = i;
331
- let n = E.nextNode(), a = 0, l = 0, r = s[0];
331
+ let n = E.nextNode(), a = 0, h = 0, r = s[0];
332
332
  for (; r !== void 0; ) {
333
333
  if (a === r.index) {
334
334
  let d;
335
- r.type === 2 ? d = new V(n, n.nextSibling, this, t) : r.type === 1 ? d = new r.ctor(n, r.name, r.strings, this, t) : r.type === 6 && (d = new ce(n, this, t)), this._$AV.push(d), r = s[++l];
335
+ r.type === 2 ? d = new V(n, n.nextSibling, this, t) : r.type === 1 ? d = new r.ctor(n, r.name, r.strings, this, t) : r.type === 6 && (d = new ce(n, this, t)), this._$AV.push(d), r = s[++h];
336
336
  }
337
337
  a !== r?.index && (n = E.nextNode(), a++);
338
338
  }
@@ -417,9 +417,9 @@ class Q {
417
417
  let a = !1;
418
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
- const l = t;
420
+ const h = 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 ||= !Z(d) || d !== this._$AH[r], d === f ? t = f : t !== f && (t += (d ?? "") + n[r + 1]), this._$AH[r] = d;
422
+ for (t = n[0], r = 0; r < n.length - 1; r++) d = M(this, h[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
  }
@@ -435,7 +435,7 @@ class re extends Q {
435
435
  this.element[this.name] = t === f ? void 0 : t;
436
436
  }
437
437
  }
438
- class he extends Q {
438
+ class le extends Q {
439
439
  constructor() {
440
440
  super(...arguments), this.type = 4;
441
441
  }
@@ -443,7 +443,7 @@ class he extends Q {
443
443
  this.element.toggleAttribute(this.name, !!t && t !== f);
444
444
  }
445
445
  }
446
- class le extends Q {
446
+ class he extends Q {
447
447
  constructor(t, e, s, i, n) {
448
448
  super(t, e, s, i, n), this.type = 5;
449
449
  }
@@ -467,8 +467,8 @@ class ce {
467
467
  M(this, t);
468
468
  }
469
469
  }
470
- const de = lt.litHtmlPolyfillSupport;
471
- de?.(W, V), (lt.litHtmlVersions ??= []).push("3.3.2");
470
+ const de = ht.litHtmlPolyfillSupport;
471
+ de?.(W, V), (ht.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,23 +510,23 @@ 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 }, ge = (o = fe, t, e) => {
513
+ const fe = { attribute: !0, type: String, converter: K, reflect: !1, hasChanged: lt }, 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") {
517
517
  const { name: a } = e;
518
- return { set(l) {
518
+ return { set(h) {
519
519
  const r = t.get.call(this);
520
- t.set.call(this, l), this.requestUpdate(a, r, o, !0, l);
521
- }, init(l) {
522
- return l !== void 0 && this.C(a, void 0, o, l), l;
520
+ t.set.call(this, h), this.requestUpdate(a, r, o, !0, h);
521
+ }, init(h) {
522
+ return h !== void 0 && this.C(a, void 0, o, h), h;
523
523
  } };
524
524
  }
525
525
  if (s === "setter") {
526
526
  const { name: a } = e;
527
- return function(l) {
527
+ return function(h) {
528
528
  const r = this[a];
529
- t.call(this, l), this.requestUpdate(a, r, o, !0, l);
529
+ t.call(this, h), this.requestUpdate(a, r, o, !0, h);
530
530
  };
531
531
  }
532
532
  throw Error("Unsupported decorator location: " + s);
@@ -561,8 +561,8 @@ nt.use([
561
561
  Ut,
562
562
  zt,
563
563
  Rt,
564
- It,
565
564
  Ht,
565
+ It,
566
566
  jt,
567
567
  Zt,
568
568
  kt,
@@ -570,7 +570,17 @@ nt.use([
570
570
  ]);
571
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.5", this.updateThresholdMs = 300, this.maxIntervalSamples = 3, this.template = {
573
+ super(), this.canvasList = /* @__PURE__ */ new Map(), this.origWidth = 0, this.origHeight = 0, this.modifier = 1, this.version = "1.7.7", this.updateThresholdMs = 300, this.maxIntervalSamples = 3, this.template = {
574
+ // ECharts paints the registered theme's own canvas `backgroundColor`
575
+ // (chalk = `rgba(41,52,65,1)`) as an opaque slab over the wrapper's
576
+ // background, so the tile shows the theme colour behind the chart and
577
+ // the host's `--re-tile-background-color` everywhere else. Keeping the
578
+ // canvas transparent lets the wrapper show through; it already falls
579
+ // back to the theme's colour when nothing overrides it, so no theme
580
+ // loses its background. Set here rather than filtered out of
581
+ // registerTheme() — theme registration is global by name, so another
582
+ // widget on the page can re-register the same theme with it.
583
+ backgroundColor: "transparent",
574
584
  title: {
575
585
  text: "Temperature Change in the Coming Week",
576
586
  left: "center",
@@ -608,10 +618,12 @@ let y = class extends k {
608
618
  dataZoom: [
609
619
  {
610
620
  show: !1,
611
- realtime: !0,
621
+ realtime: !0
612
622
  // start: 30,
613
623
  // end: 70,
614
- xAxisIndex: [0, 1]
624
+ // No axis index here: which axis carries the zoomed
625
+ // dimension depends on the orientation, so applyData()
626
+ // names it on every build.
615
627
  }
616
628
  ],
617
629
  xAxis: {
@@ -750,9 +762,9 @@ let y = class extends k {
750
762
  i.series = [], i.doomed = !0;
751
763
  }), this.inputData.dataseries.sort((i, n) => (i.advanced?.drawOrder ?? 0) - (n.advanced?.drawOrder ?? 0)), this.inputData.dataseries.forEach((i) => {
752
764
  i.advanced ??= {}, i.advanced.chartName ??= "", i.data ??= [];
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());
765
+ const n = [...new Set(i.data.map((r) => r.pivot ?? ""))].sort(), a = ft(i.backgroundColor).monochromatic(n.length).map((r) => r.toHexString()), h = ft(i.borderColor).monochromatic(n.length).map((r) => r.toHexString());
754
766
  n.forEach((r, d) => {
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];
767
+ const l = r ?? "", c = i.label ?? "", p = l + (l && c ? " - " : "") + c, g = i.borderColor ? i.advanced?.chartName?.includes("#split#") ? i.borderColor : h[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
768
  let v = this.inputData?.axis?.timeseries ? q?.map((u) => ({
757
769
  name: u.x,
758
770
  value: b(new Date(u.x ?? "").getTime(), u.y, u.r)
@@ -799,7 +811,7 @@ let y = class extends k {
799
811
  yAxisIndex: o ? 0 : z
800
812
  };
801
813
  let _ = i.advanced?.chartName ?? "";
802
- _ = _.replace("#split#", h);
814
+ _ = _.replace("#split#", l);
803
815
  const w = this.setupChart(_), X = w?.series.map((u) => u.id) ?? [];
804
816
  let D = p, it = 2;
805
817
  for (; X.includes(D); )
@@ -811,8 +823,8 @@ let y = class extends k {
811
823
  this.canvasList.forEach((i, n) => {
812
824
  i.doomed && (i.echart?.dispose(), i.element?.remove(), s.push(n));
813
825
  }), s.forEach((i) => this.canvasList.delete(i)), this.canvasList = new Map(
814
- [...this.canvasList.entries()].sort(([i, n], [a, l]) => {
815
- const r = n.series?.[0].drawOrder ?? 0, d = l.series?.[0].drawOrder ?? 0;
826
+ [...this.canvasList.entries()].sort(([i, n], [a, h]) => {
827
+ const r = n.series?.[0].drawOrder ?? 0, d = h.series?.[0].drawOrder ?? 0;
816
828
  return r !== d ? r - d : i.localeCompare(a);
817
829
  })
818
830
  ), s.length > 0 && this.canvasList.forEach((i) => {
@@ -851,23 +863,23 @@ let y = class extends k {
851
863
  return this.updateThresholdMs;
852
864
  let i = 0;
853
865
  if (this.xAxisType() === "time")
854
- for (const l of o.series) {
855
- const r = l.data;
866
+ for (const h of o.series) {
867
+ const r = h.data;
856
868
  for (const d of r || []) {
857
- const h = d.value?.[0] || 0;
858
- h > i && (i = h);
869
+ const l = d.value?.[0] || 0;
870
+ l > i && (i = l);
859
871
  }
860
872
  }
861
873
  else
862
874
  i = e;
863
875
  if (o.lastMaxTimestamp = o.lastMaxTimestamp ?? 0, i > o.lastMaxTimestamp) {
864
876
  if (o.updateIntervals ??= [], o.lastUpdateTime > 0) {
865
- const l = e - o.lastUpdateTime;
866
- o.updateIntervals.push(l), o.updateIntervals.length > this.maxIntervalSamples && o.updateIntervals.shift();
877
+ const h = e - o.lastUpdateTime;
878
+ o.updateIntervals.push(h), o.updateIntervals.length > this.maxIntervalSamples && o.updateIntervals.shift();
867
879
  }
868
880
  o.lastUpdateTime = e, o.lastMaxTimestamp = i;
869
881
  }
870
- return o.updateIntervals && o.updateIntervals.length > 0 ? o.updateIntervals.reduce((l, r) => l + r, 0) / o.updateIntervals.length : this.updateThresholdMs;
882
+ return o.updateIntervals && o.updateIntervals.length > 0 ? o.updateIntervals.reduce((h, r) => h + r, 0) / o.updateIntervals.length : this.updateThresholdMs;
871
883
  }
872
884
  applyData() {
873
885
  if (!this.chartContainer) return;
@@ -875,13 +887,13 @@ let y = class extends k {
875
887
  for (const t of this.canvasList.values())
876
888
  t.element && this.chartContainer.appendChild(t.element);
877
889
  this.canvasList.forEach((t, e) => {
878
- t.series.sort((m, I) => m.name > I.name ? 1 : -1);
879
- const s = this.inputData?.axis?.showLegend ?? !0, i = this.inputData?.axis?.showTitle ?? !0, n = this.inputData?.axis?.showXAxis ?? !0, a = this.inputData?.axis?.showYAxis ?? !0, l = this.inputData?.axis?.showBox ?? !1, r = JSON.stringify({
890
+ t.series.sort((m, H) => m.name > H.name ? 1 : -1);
891
+ const s = this.inputData?.axis?.showLegend ?? !0, i = this.inputData?.axis?.showTitle ?? !0, n = this.inputData?.axis?.showXAxis ?? !0, a = this.inputData?.axis?.showYAxis ?? !0, h = this.inputData?.axis?.showBox ?? !1, r = JSON.stringify({
880
892
  showLegend: s,
881
893
  showTitle: i,
882
894
  showXAxis: n,
883
895
  showYAxis: a,
884
- showBox: l,
896
+ showBox: h,
885
897
  xAxisLabel: this.inputData?.axis?.xAxisLabel,
886
898
  yAxisLabel: this.inputData?.axis?.yAxisLabel,
887
899
  xAxisZoom: this.inputData?.axis?.xAxisZoom,
@@ -900,20 +912,20 @@ let y = class extends k {
900
912
  seriesLabels: t.series.map((m) => m.label?.show ? 1 : 0).join(",")
901
913
  }), d = t.lastConfig !== r;
902
914
  t.lastConfig = r;
903
- const h = window.structuredClone(this.template);
904
- if (h.title.text = e, h.title.show = i, h.xAxis.name = this.inputData?.axis?.xAxisLabel ?? "", h.xAxis.type = this.xAxisType(), h.xAxis.show = n, this.xAxisType() === "time") {
905
- const m = t.series.map((C) => C.minDate ?? 1 / 0).reduce((C, st) => Math.min(C, st), 1 / 0), I = t.series.map((C) => C.maxDate ?? 0).reduce((C, st) => Math.max(C, st), 0), Y = Number(this.timeRange?.start), pt = Number(this.timeRange?.end), ut = isNaN(Y) ? m : Y, mt = isNaN(pt) ? I : pt;
906
- h.xAxis = {
907
- ...h.xAxis,
915
+ const l = window.structuredClone(this.template);
916
+ if (l.title.text = e, l.title.show = i, l.xAxis.name = this.inputData?.axis?.xAxisLabel ?? "", l.xAxis.type = this.xAxisType(), l.xAxis.show = n, this.xAxisType() === "time") {
917
+ const m = t.series.map((C) => C.minDate ?? 1 / 0).reduce((C, st) => Math.min(C, st), 1 / 0), H = t.series.map((C) => C.maxDate ?? 0).reduce((C, st) => Math.max(C, st), 0), Y = Number(this.timeRange?.start), pt = Number(this.timeRange?.end), ut = isNaN(Y) ? m : Y, mt = isNaN(pt) ? H : pt;
918
+ l.xAxis = {
919
+ ...l.xAxis,
908
920
  min: ut !== 1 / 0 ? ut : (/* @__PURE__ */ new Date()).getTime() - 1440 * 60 * 1e3,
909
921
  max: mt !== 0 ? mt : (/* @__PURE__ */ new Date()).getTime()
910
922
  };
911
923
  }
912
924
  const c = this.inputData?.axis?.xAxisZoom ?? !1;
913
- h.dataZoom[0].show = c, h.toolbox.show = c;
914
- const p = Array.isArray(h.yAxis) ? h.yAxis : [h.yAxis ?? {}];
925
+ l.dataZoom[0].show = c, l.toolbox.show = c;
926
+ const p = Array.isArray(l.yAxis) ? l.yAxis : [l.yAxis ?? {}];
915
927
  for (; p.length < 2; ) p.push({});
916
- h.yAxis = p;
928
+ l.yAxis = p;
917
929
  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
930
  if (Object.assign(p[0], {
919
931
  type: _,
@@ -937,8 +949,8 @@ let y = class extends k {
937
949
  axisLine: { show: !0 },
938
950
  splitLine: { show: !1 }
939
951
  }), w && (p[1].axisLabel = w), o) {
940
- const m = Array.isArray(h.xAxis) ? h.xAxis[0] : h.xAxis;
941
- h.yAxis = {
952
+ const m = Array.isArray(l.xAxis) ? l.xAxis[0] : l.xAxis;
953
+ l.yAxis = {
942
954
  ...m,
943
955
  position: "left",
944
956
  // Read top-to-bottom, so the first data point is the top
@@ -951,23 +963,21 @@ let y = class extends k {
951
963
  nameLocation: "start",
952
964
  nameGap: v ? 30 : 10,
953
965
  nameTextStyle: { align: "left" }
954
- }, h.xAxis = p.map((I, Y) => ({
955
- ...I,
966
+ }, l.xAxis = p.map((H, Y) => ({
967
+ ...H,
956
968
  position: Y === 0 ? "bottom" : "top",
957
969
  nameLocation: "middle",
958
970
  nameGap: 27,
959
971
  nameTextStyle: { align: "center" }
960
- })), h.dataZoom = [
961
- { ...h.dataZoom?.[0] ?? {}, xAxisIndex: void 0, yAxisIndex: [0] }
962
- ];
972
+ }));
963
973
  }
964
- h.series = t.series, h.legend.show = s;
974
+ l.dataZoom[0].xAxisIndex = o ? void 0 : [0], l.dataZoom[0].yAxisIndex = o ? [0] : void 0, l.series = t.series, l.legend.show = s;
965
975
  const X = (i || z || R ? 30 : 0) + (s && R ? 25 : 0), D = 40, it = c && !o ? D : 0, u = c && o ? D : 0;
966
- h.grid = {
967
- ...h.grid,
968
- show: l,
976
+ l.grid = {
977
+ ...l.grid,
978
+ show: h,
969
979
  backgroundColor: "transparent",
970
- borderWidth: l ? 1 : 0,
980
+ borderWidth: h ? 1 : 0,
971
981
  borderColor: this.themeTitleColor ?? "#ccc",
972
982
  top: X,
973
983
  // The category axis sits at the bottom when vertical and on the
@@ -982,11 +992,11 @@ let y = class extends k {
982
992
  right: (o ? g ? 45 : 15 : 0) + u,
983
993
  containLabel: n || a
984
994
  }, c && Object.assign(
985
- h.dataZoom[0],
995
+ l.dataZoom[0],
986
996
  o ? { right: 0, top: X, bottom: 20, left: void 0 } : { bottom: 0, left: void 0, right: void 0, top: void 0 }
987
997
  );
988
998
  const S = this.updateThresholdMs;
989
- h.animation = !0, h.animationEasing = "linear", h.animationDuration = S, h.animationDurationUpdate = S, t.drawing = !0, t.echart?.setOption(h, { notMerge: d, lazyUpdate: !0 });
999
+ l.animation = !0, l.animationEasing = "linear", l.animationDuration = S, l.animationDurationUpdate = S, t.drawing = !0, t.echart?.setOption(l, { notMerge: d, lazyUpdate: !0 });
990
1000
  });
991
1001
  }
992
1002
  // ECharts positions a slider dataZoom against the grid rect from *before*
@@ -1158,7 +1168,7 @@ $([
1158
1168
  xe(".chart-container")
1159
1169
  ], y.prototype, "chartContainer", 2);
1160
1170
  y = $([
1161
- me("widget-linechart-1.7.5")
1171
+ me("widget-linechart-1.7.7")
1162
1172
  ], y);
1163
1173
  export {
1164
1174
  y as WidgetLinechart
@@ -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.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 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 // One 'finished' handler per chart, registered here rather than in\n // applyData(). applyData() runs on every data tick, so registering\n // there added a handler per tick and never removed one: a board left\n // open on a live series accumulated one closure per update, all of them\n // invoked on every subsequent render.\n newChart.on('finished', () => {\n chart.drawing = false\n this.alignZoomSlider(newChart)\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","__decorateClass","property","state","query","customElement"],"mappings":";;;;;;AAKA,MAAMA,IAAE,YAAWC,KAAED,EAAE,eAAsBA,EAAE,aAAX,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echart.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 // ECharts paints the registered theme's own canvas `backgroundColor`\n // (chalk = `rgba(41,52,65,1)`) as an opaque slab over the wrapper's\n // background, so the tile shows the theme colour behind the chart and\n // the host's `--re-tile-background-color` everywhere else. Keeping the\n // canvas transparent lets the wrapper show through; it already falls\n // back to the theme's colour when nothing overrides it, so no theme\n // loses its background. Set here rather than filtered out of\n // registerTheme() — theme registration is global by name, so another\n // widget on the page can re-register the same theme with it.\n backgroundColor: 'transparent',\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 // No axis index here: which axis carries the zoomed\n // dimension depends on the orientation, so applyData()\n // names it on every build.\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 }\n\n // Point the zoom at the one axis that carries the x-value\n // dimension: `xAxis` when vertical, `yAxis` when horizontal (the\n // orientation swap above moved it there).\n //\n // Both keys are written on every build, and neither may name an\n // axis the option does not declare. ECharts resolves these indices\n // to axis components when the option is merged and dereferences\n // them again in its dataZoom processor without checking, so an\n // index with no axis behind it — a hard-coded one, or one left over\n // from the other orientation on a merge update — crashes the chart\n // with \"Cannot set properties of undefined (setting\n // '__dzAxisProxy')\". The vertical layout declares a single x axis,\n // so the only valid target is index 0.\n option.dataZoom[0].xAxisIndex = horizontal ? undefined : [0]\n option.dataZoom[0].yAxisIndex = horizontal ? [0] : undefined\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.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 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 // One 'finished' handler per chart, registered here rather than in\n // applyData(). applyData() runs on every data tick, so registering\n // there added a handler per tick and never removed one: a board left\n // open on a live series accumulated one closure per update, all of them\n // invoked on every subsequent render.\n newChart.on('finished', () => {\n chart.drawing = false\n this.alignZoomSlider(newChart)\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","__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,KAAK,IAAE;AAAA,EAAC;AAAA,EAAC,IAAI,aAAY;AAAC,QAAI,IAAE,KAAK;AAAE,UAAMA,IAAE,KAAK;AAAE,QAAGD,MAAY,MAAT,QAAW;AAAC,YAAMA,IAAWC,MAAT,UAAgBA,EAAE,WAAN;AAAa,MAAAD,MAAI,IAAEE,GAAE,IAAID,CAAC,IAAY,MAAT,YAAc,KAAK,IAAE,IAAE,IAAI,iBAAe,YAAY,KAAK,OAAO,GAAED,KAAGE,GAAE,IAAID,GAAE,CAAC;AAAA,IAAE;AAAC,WAAO;AAAA,EAAC;AAAA,EAAC,WAAU;AAAC,WAAO,KAAK;AAAA,EAAO;AAAC;AAAC,MAAMG,KAAE,CAAAL,MAAG,IAAIM,GAAY,OAAON,KAAj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M,OAAA,CAAQ;AAAA,GAPjBvG,EAQT,WAAA,aAAA,CAAA;AAGQsG,EAAA;AAAA,EADPE,GAAA;AAAM,GAVExG,EAWD,WAAA,cAAA,CAAA;AAeSsG,EAAA;AAAA,EAAhBE,GAAA;AAAM,GA1BExG,EA0BQ,WAAA,gBAAA,CAAA;AACAsG,EAAA;AAAA,EAAhBE,GAAA;AAAM,GA3BExG,EA2BQ,WAAA,mBAAA,CAAA;AACAsG,EAAA;AAAA,EAAhBE,GAAA;AAAM,GA5BExG,EA4BQ,WAAA,sBAAA,CAAA;AAEjBsG,EAAA;AAAA,EADCG,GAAM,kBAAkB;AAAA,GA7BhBzG,EA8BT,WAAA,kBAAA,CAAA;AA9BSA,IAANsG,EAAA;AAAA,EADNI,GAAc,wBAAqC;AAAA,GACvC1G,CAAA;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8]}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "REWidget widget-linechart",
4
4
  "license": "MIT",
5
5
  "author": "widget-linechart",
6
- "version": "1.7.5",
6
+ "version": "1.7.7",
7
7
  "engines": {
8
8
  "node": ">=24.9.0",
9
9
  "npm": ">=10.0.2"
@@ -25,7 +25,11 @@
25
25
  "link": "npm run build && npm link && cd ../RESWARM/frontend && npm link @record-evolution/widget-linechart",
26
26
  "unlink": "npm unlink --global && cd ../RESWARM/frontend && npm unlink @record-evolution/widget-linechart && npm i @record-evolution/widget-linechart",
27
27
  "types": "cat src/definition-schema.json | json2ts --style.tabWidth=4 > src/definition-schema.d.ts",
28
- "release": "npm run build && npm run types && npm version patch --tag-version-prefix='' && git push && git push --tag && npm run build"
28
+ "preversion": "sh scripts/release-preflight.sh",
29
+ "postversion": "git push --follow-tags && sh scripts/release-verify.sh",
30
+ "release": "npm version patch",
31
+ "release:minor": "npm version minor",
32
+ "release:major": "npm version major"
29
33
  },
30
34
  "dependencies": {
31
35
  "lit": "^3.3.3",
@@ -99,6 +99,16 @@ export class WidgetLinechart extends LitElement {
99
99
  super()
100
100
 
101
101
  this.template = {
102
+ // ECharts paints the registered theme's own canvas `backgroundColor`
103
+ // (chalk = `rgba(41,52,65,1)`) as an opaque slab over the wrapper's
104
+ // background, so the tile shows the theme colour behind the chart and
105
+ // the host's `--re-tile-background-color` everywhere else. Keeping the
106
+ // canvas transparent lets the wrapper show through; it already falls
107
+ // back to the theme's colour when nothing overrides it, so no theme
108
+ // loses its background. Set here rather than filtered out of
109
+ // registerTheme() — theme registration is global by name, so another
110
+ // widget on the page can re-register the same theme with it.
111
+ backgroundColor: 'transparent',
102
112
  title: {
103
113
  text: 'Temperature Change in the Coming Week',
104
114
  left: 'center',
@@ -135,10 +145,12 @@ export class WidgetLinechart extends LitElement {
135
145
  dataZoom: [
136
146
  {
137
147
  show: false,
138
- realtime: true,
148
+ realtime: true
139
149
  // start: 30,
140
150
  // end: 70,
141
- xAxisIndex: [0, 1]
151
+ // No axis index here: which axis carries the zoomed
152
+ // dimension depends on the orientation, so applyData()
153
+ // names it on every build.
142
154
  }
143
155
  ],
144
156
  xAxis: {
@@ -724,13 +736,24 @@ export class WidgetLinechart extends LitElement {
724
736
  nameGap: 27,
725
737
  nameTextStyle: { align: 'center' }
726
738
  }))
727
- // Zooming still applies to the x-value dimension, which now
728
- // lives on the y axis.
729
- option.dataZoom = [
730
- { ...(option.dataZoom?.[0] ?? {}), xAxisIndex: undefined, yAxisIndex: [0] }
731
- ]
732
739
  }
733
740
 
741
+ // Point the zoom at the one axis that carries the x-value
742
+ // dimension: `xAxis` when vertical, `yAxis` when horizontal (the
743
+ // orientation swap above moved it there).
744
+ //
745
+ // Both keys are written on every build, and neither may name an
746
+ // axis the option does not declare. ECharts resolves these indices
747
+ // to axis components when the option is merged and dereferences
748
+ // them again in its dataZoom processor without checking, so an
749
+ // index with no axis behind it — a hard-coded one, or one left over
750
+ // from the other orientation on a merge update — crashes the chart
751
+ // with "Cannot set properties of undefined (setting
752
+ // '__dzAxisProxy')". The vertical layout declares a single x axis,
753
+ // so the only valid target is index 0.
754
+ option.dataZoom[0].xAxisIndex = horizontal ? undefined : [0]
755
+ option.dataZoom[0].yAxisIndex = horizontal ? [0] : undefined
756
+
734
757
  option.series = chart.series
735
758
  option.legend.show = showLegend
736
759