@record-evolution/widget-linechart 1.7.7 → 1.7.8

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.
@@ -4,18 +4,18 @@ import { LineChart as Ht, BarChart as It, ScatterChart as jt } from "echarts/cha
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";
7
- const G = globalThis, at = G.ShadowRoot && (G.ShadyCSS === void 0 || G.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, rt = /* @__PURE__ */ Symbol(), gt = /* @__PURE__ */ new WeakMap();
7
+ const G = globalThis, rt = G.ShadowRoot && (G.ShadyCSS === void 0 || G.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, at = /* @__PURE__ */ Symbol(), yt = /* @__PURE__ */ new WeakMap();
8
8
  let Tt = class {
9
9
  constructor(t, e, s) {
10
- if (this._$cssResult$ = !0, s !== rt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
10
+ if (this._$cssResult$ = !0, s !== at) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
11
11
  this.cssText = t, this.t = e;
12
12
  }
13
13
  get styleSheet() {
14
14
  let t = this.o;
15
15
  const e = this.t;
16
- if (at && t === void 0) {
16
+ if (rt && t === void 0) {
17
17
  const s = e !== void 0 && e.length === 1;
18
- s && (t = gt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && gt.set(e, t));
18
+ s && (t = yt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && yt.set(e, t));
19
19
  }
20
20
  return t;
21
21
  }
@@ -23,20 +23,20 @@ let Tt = class {
23
23
  return this.cssText;
24
24
  }
25
25
  };
26
- const Wt = (o) => new Tt(typeof o == "string" ? o : o + "", void 0, rt), Vt = (o, ...t) => {
27
- const e = o.length === 1 ? o[0] : t.reduce((s, i, n) => s + ((a) => {
28
- if (a._$cssResult$ === !0) return a.cssText;
29
- if (typeof a == "number") return a;
30
- throw Error("Value passed to 'css' function must be a 'css' function result: " + a + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
26
+ const Wt = (o) => new Tt(typeof o == "string" ? o : o + "", void 0, at), qt = (o, ...t) => {
27
+ const e = o.length === 1 ? o[0] : t.reduce((s, i, n) => s + ((r) => {
28
+ if (r._$cssResult$ === !0) return r.cssText;
29
+ if (typeof r == "number") return r;
30
+ throw Error("Value passed to 'css' function must be a 'css' function result: " + r + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
31
31
  })(i) + o[n + 1], o[0]);
32
- return new Tt(e, o, rt);
33
- }, qt = (o, t) => {
34
- if (at) o.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
32
+ return new Tt(e, o, at);
33
+ }, Vt = (o, t) => {
34
+ if (rt) o.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
35
35
  else for (const e of t) {
36
36
  const s = document.createElement("style"), i = G.litNonce;
37
37
  i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, o.appendChild(s);
38
38
  }
39
- }, yt = at ? (o) => o : (o) => o instanceof CSSStyleSheet ? ((t) => {
39
+ }, gt = rt ? (o) => o : (o) => o instanceof CSSStyleSheet ? ((t) => {
40
40
  let e = "";
41
41
  for (const s of t.cssRules) e += s.cssText;
42
42
  return Wt(e);
@@ -87,12 +87,12 @@ let O = class extends HTMLElement {
87
87
  static getPropertyDescriptor(t, e, s) {
88
88
  const { get: i, set: n } = Gt(this.prototype, t) ?? { get() {
89
89
  return this[e];
90
- }, set(a) {
91
- this[e] = a;
90
+ }, set(r) {
91
+ this[e] = r;
92
92
  } };
93
- return { get: i, set(a) {
93
+ return { get: i, set(r) {
94
94
  const h = i?.call(this);
95
- n?.call(this, a), this.requestUpdate(t, h, s);
95
+ n?.call(this, r), this.requestUpdate(t, h, s);
96
96
  }, configurable: !0, enumerable: !0 };
97
97
  }
98
98
  static getPropertyOptions(t) {
@@ -125,8 +125,8 @@ let O = class extends HTMLElement {
125
125
  const e = [];
126
126
  if (Array.isArray(t)) {
127
127
  const s = new Set(t.flat(1 / 0).reverse());
128
- for (const i of s) e.unshift(yt(i));
129
- } else t !== void 0 && e.push(yt(t));
128
+ for (const i of s) e.unshift(gt(i));
129
+ } else t !== void 0 && e.push(gt(t));
130
130
  return e;
131
131
  }
132
132
  static _$Eu(t, e) {
@@ -152,7 +152,7 @@ let O = class extends HTMLElement {
152
152
  }
153
153
  createRenderRoot() {
154
154
  const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
155
- return qt(t, this.constructor.elementStyles), t;
155
+ return Vt(t, this.constructor.elementStyles), t;
156
156
  }
157
157
  connectedCallback() {
158
158
  this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((t) => t.hostConnected?.());
@@ -175,22 +175,22 @@ let O = class extends HTMLElement {
175
175
  _$AK(t, e) {
176
176
  const s = this.constructor, i = s._$Eh.get(t);
177
177
  if (i !== void 0 && this._$Em !== i) {
178
- const n = s.getPropertyOptions(i), a = typeof n.converter == "function" ? { fromAttribute: n.converter } : n.converter?.fromAttribute !== void 0 ? n.converter : K;
178
+ const n = s.getPropertyOptions(i), r = typeof n.converter == "function" ? { fromAttribute: n.converter } : n.converter?.fromAttribute !== void 0 ? n.converter : K;
179
179
  this._$Em = i;
180
- const h = a.fromAttribute(e, n.type);
180
+ const h = r.fromAttribute(e, n.type);
181
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
- const a = this.constructor;
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;
186
+ const r = this.constructor;
187
+ if (i === !1 && (n = this[t]), s ??= r.getPropertyOptions(t), !((s.hasChanged ?? lt)(n, e) || s.useDefault && s.reflect && n === this._$Ej?.get(t) && !this.hasAttribute(r._$Eu(t, s)))) return;
188
188
  this.C(t, e, s);
189
189
  }
190
190
  this.isUpdatePending === !1 && (this._$ES = this._$EP());
191
191
  }
192
- C(t, e, { useDefault: s, reflect: i, wrapped: n }, a) {
193
- s && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, a ?? e ?? this[t]), n !== !0 || a !== void 0) || (this._$AL.has(t) || (this.hasUpdated || s || (e = void 0), this._$AL.set(t, e)), i === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
192
+ C(t, e, { useDefault: s, reflect: i, wrapped: n }, r) {
193
+ s && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, r ?? e ?? this[t]), n !== !0 || r !== void 0) || (this._$AL.has(t) || (this.hasUpdated || s || (e = void 0), this._$AL.set(t, e)), i === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
194
194
  }
195
195
  async _$EP() {
196
196
  this.isUpdatePending = !0;
@@ -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, h = this[i];
218
- a !== !0 || this._$AL.has(i) || h === void 0 || this.C(i, void 0, n, h);
217
+ const { wrapped: r } = n, h = this[i];
218
+ r !== !0 || this._$AL.has(i) || h === void 0 || this.C(i, void 0, n, h);
219
219
  }
220
220
  }
221
221
  let t = !1;
@@ -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 = I;
265
+ let i, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", r = I;
266
266
  for (let h = 0; h < e; h++) {
267
- const r = o[h];
267
+ const a = o[h];
268
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);
269
+ for (; p < a.length && (r.lastIndex = p, l = r.exec(a), l !== null); ) p = r.lastIndex, r === I ? l[1] === "!--" ? r = bt : l[1] !== void 0 ? r = _t : l[2] !== void 0 ? (Dt.test(l[2]) && (i = RegExp("</" + l[2], "g")), r = T) : l[3] !== void 0 && (r = T) : r === T ? l[0] === ">" ? (r = i ?? I, c = -1) : l[1] === void 0 ? c = -2 : (c = r.lastIndex - l[2].length, d = l[1], r = l[3] === void 0 ? T : l[3] === '"' ? St : wt) : r === St || r === wt ? r = T : r === bt || r === _t ? r = I : (r = T, i = void 0);
270
+ const y = r === T && o[h + 1].startsWith("/>") ? " " : "";
271
+ n += r === I ? a + ee : c >= 0 ? (s.push(d), a.slice(0, c) + Et + a.slice(c) + A + y) : a + A + (c === -2 ? h : y);
272
272
  }
273
273
  return [Ot(o, n + (o[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
274
274
  };
@@ -276,30 +276,30 @@ class W {
276
276
  constructor({ strings: t, _$litType$: e }, s) {
277
277
  let i;
278
278
  this.parts = [];
279
- let n = 0, a = 0;
280
- const h = t.length - 1, r = this.parts, [d, l] = ne(t, e);
279
+ let n = 0, r = 0;
280
+ const h = t.length - 1, a = 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 < h; ) {
285
+ for (; (i = E.nextNode()) !== null && a.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 = 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
- } else c.startsWith(A) && (r.push({ type: 6, index: n }), i.removeAttribute(c));
288
+ const p = l[r++], y = i.getAttribute(c).split(A), x = /([.?@])?(.*)/.exec(p);
289
+ a.push({ type: 1, index: n, name: x[2], strings: y, ctor: x[1] === "." ? ae : x[1] === "?" ? le : x[1] === "@" ? he : Q }), i.removeAttribute(c);
290
+ } else c.startsWith(A) && (a.push({ type: 6, index: n }), i.removeAttribute(c));
291
291
  if (Dt.test(i.tagName)) {
292
292
  const c = i.textContent.split(A), p = c.length - 1;
293
293
  if (p > 0) {
294
294
  i.textContent = F ? F.emptyScript : "";
295
- for (let g = 0; g < p; g++) i.append(c[g], B()), E.nextNode(), r.push({ type: 2, index: ++n });
295
+ for (let y = 0; y < p; y++) i.append(c[y], B()), E.nextNode(), a.push({ type: 2, index: ++n });
296
296
  i.append(c[p], B());
297
297
  }
298
298
  }
299
- } else if (i.nodeType === 8) if (i.data === Lt) r.push({ type: 2, index: n });
299
+ } else if (i.nodeType === 8) if (i.data === Lt) a.push({ type: 2, index: n });
300
300
  else {
301
301
  let c = -1;
302
- for (; (c = i.data.indexOf(A, c + 1)) !== -1; ) r.push({ type: 7, index: n }), c += A.length - 1;
302
+ for (; (c = i.data.indexOf(A, c + 1)) !== -1; ) a.push({ type: 7, index: n }), c += A.length - 1;
303
303
  }
304
304
  n++;
305
305
  }
@@ -315,7 +315,7 @@ function M(o, t, e = o, s) {
315
315
  const n = Z(t) ? void 0 : t._$litDirective$;
316
316
  return i?.constructor !== n && (i?._$AO?.(!1), n === void 0 ? i = void 0 : (i = new n(o), i._$AT(o, e, s)), s !== void 0 ? (e._$Co ??= [])[s] = i : e._$Cl = i), i !== void 0 && (t = M(o, i._$AS(o, t.values), i, s)), t;
317
317
  }
318
- class ae {
318
+ class re {
319
319
  constructor(t, e) {
320
320
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
321
321
  }
@@ -328,13 +328,13 @@ 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, h = 0, r = s[0];
332
- for (; r !== void 0; ) {
333
- if (a === r.index) {
331
+ let n = E.nextNode(), r = 0, h = 0, a = s[0];
332
+ for (; a !== void 0; ) {
333
+ if (r === a.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[++h];
335
+ a.type === 2 ? d = new q(n, n.nextSibling, this, t) : a.type === 1 ? d = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (d = new ce(n, this, t)), this._$AV.push(d), a = s[++h];
336
336
  }
337
- a !== r?.index && (n = E.nextNode(), a++);
337
+ r !== a?.index && (n = E.nextNode(), r++);
338
338
  }
339
339
  return E.currentNode = L, i;
340
340
  }
@@ -343,7 +343,7 @@ class ae {
343
343
  for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
344
344
  }
345
345
  }
346
- class V {
346
+ class q {
347
347
  get _$AU() {
348
348
  return this._$AM?._$AU ?? this._$Cv;
349
349
  }
@@ -377,8 +377,8 @@ class V {
377
377
  const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = W.createElement(Ot(s.h, s.h[0]), this.options)), s);
378
378
  if (this._$AH?._$AD === i) this._$AH.p(e);
379
379
  else {
380
- const n = new ae(i, this), a = n.u(this.options);
381
- n.p(e), this.T(a), this._$AH = n;
380
+ const n = new re(i, this), r = n.u(this.options);
381
+ n.p(e), this.T(r), this._$AH = n;
382
382
  }
383
383
  }
384
384
  _$AC(t) {
@@ -389,7 +389,7 @@ class V {
389
389
  ct(this._$AH) || (this._$AH = [], this._$AR());
390
390
  const e = this._$AH;
391
391
  let s, i = 0;
392
- for (const n of t) i === e.length ? e.push(s = new V(this.O(B()), this.O(B()), this, this.options)) : s = e[i], s._$AI(n), i++;
392
+ for (const n of t) i === e.length ? e.push(s = new q(this.O(B()), this.O(B()), this, this.options)) : s = e[i], s._$AI(n), i++;
393
393
  i < e.length && (this._$AR(s && s._$AB.nextSibling, i), e.length = i);
394
394
  }
395
395
  _$AR(t = this._$AA.nextSibling, e) {
@@ -414,20 +414,20 @@ class Q {
414
414
  }
415
415
  _$AI(t, e = this, s, i) {
416
416
  const n = this.strings;
417
- let a = !1;
418
- if (n === void 0) t = M(this, t, e, 0), a = !Z(t) || t !== this._$AH && t !== P, a && (this._$AH = t);
417
+ let r = !1;
418
+ if (n === void 0) t = M(this, t, e, 0), r = !Z(t) || t !== this._$AH && t !== P, r && (this._$AH = t);
419
419
  else {
420
420
  const h = t;
421
- let 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;
421
+ let a, d;
422
+ for (t = n[0], a = 0; a < n.length - 1; a++) d = M(this, h[s + a], e, a), d === P && (d = this._$AH[a]), r ||= !Z(d) || d !== this._$AH[a], d === f ? t = f : t !== f && (t += (d ?? "") + n[a + 1]), this._$AH[a] = d;
423
423
  }
424
- a && !i && this.j(t);
424
+ r && !i && this.j(t);
425
425
  }
426
426
  j(t) {
427
427
  t === f ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
428
428
  }
429
429
  }
430
- class re extends Q {
430
+ class ae extends Q {
431
431
  constructor() {
432
432
  super(...arguments), this.type = 3;
433
433
  }
@@ -468,13 +468,13 @@ class ce {
468
468
  }
469
469
  }
470
470
  const de = ht.litHtmlPolyfillSupport;
471
- de?.(W, V), (ht.litHtmlVersions ??= []).push("3.3.2");
471
+ de?.(W, q), (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$;
475
475
  if (i === void 0) {
476
476
  const n = e?.renderBefore ?? null;
477
- s._$litPart$ = i = new V(t.insertBefore(B(), n), n, void 0, e ?? {});
477
+ s._$litPart$ = i = new q(t.insertBefore(B(), n), n, void 0, e ?? {});
478
478
  }
479
479
  return i._$AI(o), i;
480
480
  };
@@ -510,48 +510,48 @@ 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: lt }, ge = (o = fe, t, e) => {
513
+ const fe = { attribute: !0, type: String, converter: K, reflect: !1, hasChanged: lt }, ye = (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
- const { name: a } = e;
517
+ const { name: r } = e;
518
518
  return { set(h) {
519
- const r = t.get.call(this);
520
- t.set.call(this, h), this.requestUpdate(a, r, o, !0, h);
519
+ const a = t.get.call(this);
520
+ t.set.call(this, h), this.requestUpdate(r, a, o, !0, h);
521
521
  }, init(h) {
522
- return h !== void 0 && this.C(a, void 0, o, h), h;
522
+ return h !== void 0 && this.C(r, void 0, o, h), h;
523
523
  } };
524
524
  }
525
525
  if (s === "setter") {
526
- const { name: a } = e;
526
+ const { name: r } = e;
527
527
  return function(h) {
528
- const r = this[a];
529
- t.call(this, h), this.requestUpdate(a, r, o, !0, h);
528
+ const a = this[r];
529
+ t.call(this, h), this.requestUpdate(r, a, o, !0, h);
530
530
  };
531
531
  }
532
532
  throw Error("Unsupported decorator location: " + s);
533
533
  };
534
534
  function tt(o) {
535
- return (t, e) => typeof e == "object" ? ge(o, t, e) : ((s, i, n) => {
536
- const a = i.hasOwnProperty(n);
537
- return i.constructor.createProperty(n, s), a ? Object.getOwnPropertyDescriptor(i, n) : void 0;
535
+ return (t, e) => typeof e == "object" ? ye(o, t, e) : ((s, i, n) => {
536
+ const r = i.hasOwnProperty(n);
537
+ return i.constructor.createProperty(n, s), r ? Object.getOwnPropertyDescriptor(i, n) : void 0;
538
538
  })(o, t, e);
539
539
  }
540
540
  function et(o) {
541
541
  return tt({ ...o, state: !0, attribute: !1 });
542
542
  }
543
- const ye = (o, t, e) => (e.configurable = !0, e.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(o, t, e), e);
543
+ const ge = (o, t, e) => (e.configurable = !0, e.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(o, t, e), e);
544
544
  function xe(o, t) {
545
545
  return (e, s, i) => {
546
- const n = (a) => a.renderRoot?.querySelector(o) ?? null;
547
- return ye(e, s, { get() {
546
+ const n = (r) => r.renderRoot?.querySelector(o) ?? null;
547
+ return ge(e, s, { get() {
548
548
  return n(this);
549
549
  } });
550
550
  };
551
551
  }
552
552
  var $e = Object.defineProperty, ve = Object.getOwnPropertyDescriptor, $ = (o, t, e, s) => {
553
- for (var i = s > 1 ? void 0 : s ? ve(t, e) : t, n = o.length - 1, a; n >= 0; n--)
554
- (a = o[n]) && (i = (s ? a(t, e, i) : a(i)) || i);
553
+ for (var i = s > 1 ? void 0 : s ? ve(t, e) : t, n = o.length - 1, r; n >= 0; n--)
554
+ (r = o[n]) && (i = (s ? r(t, e, i) : r(i)) || i);
555
555
  return s && i && $e(t, e, i), i;
556
556
  };
557
557
  nt.use([
@@ -568,9 +568,9 @@ nt.use([
568
568
  kt,
569
569
  Bt
570
570
  ]);
571
- let y = class extends k {
571
+ let g = 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.7", 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.8", this.updateThresholdMs = 300, this.maxIntervalSamples = 3, this.template = {
574
574
  // ECharts paints the registered theme's own canvas `backgroundColor`
575
575
  // (chalk = `rgba(41,52,65,1)`) as an opaque slab over the wrapper's
576
576
  // background, so the tile shows the theme colour behind the chart and
@@ -715,13 +715,23 @@ let y = class extends k {
715
715
  });
716
716
  }), this.resizeObserver.observe(this.chartContainer));
717
717
  }
718
+ /**
719
+ * Resolved text colour for the chart canvas.
720
+ *
721
+ * The themeTitleColor field holds a var() chain, which the browser resolves
722
+ * for CSS but ECharts cannot — it paints to a canvas and needs a real
723
+ * colour. Read at the point of use rather than cached, so a board style
724
+ * edit reaches the next chart rebuild instead of waiting for a theme change.
725
+ */
726
+ resolvedTextColor() {
727
+ return getComputedStyle(this).getPropertyValue("--re-text-color").trim() || this.theme?.theme_object?.title?.textStyle?.color;
728
+ }
718
729
  registerTheme(o) {
719
- const t = getComputedStyle(this).getPropertyValue("--re-text-color").trim(), e = getComputedStyle(this).getPropertyValue("--re-tile-background-color").trim();
720
- if (this.themeBgColor = e || this.theme?.theme_object?.backgroundColor, this.themeTitleColor = t || this.theme?.theme_object?.title?.textStyle?.color, this.themeSubtitleColor = t || this.theme?.theme_object?.title?.subtextStyle?.color || this.themeTitleColor, !o || !o.theme_object || !o.theme_name) return;
721
- const s = ["parallel", "geo", "timeline", "visualMap", "markPoint"], i = Object.fromEntries(
722
- Object.entries(o.theme_object).filter(([n]) => !s.includes(n))
730
+ if (this.themeBgColor = `var(--re-tile-background-color, ${this.theme?.theme_object?.backgroundColor || "transparent"})`, this.themeTitleColor = `var(--re-text-color, ${this.theme?.theme_object?.title?.textStyle?.color || "inherit"})`, this.themeSubtitleColor = `var(--re-text-color, ${this.theme?.theme_object?.title?.subtextStyle?.color || this.theme?.theme_object?.title?.textStyle?.color || "inherit"})`, !o || !o.theme_object || !o.theme_name) return;
731
+ const t = ["parallel", "geo", "timeline", "visualMap", "markPoint"], e = Object.fromEntries(
732
+ Object.entries(o.theme_object).filter(([s]) => !t.includes(s))
723
733
  );
724
- nt.registerTheme(o.theme_name, i);
734
+ nt.registerTheme(o.theme_name, e);
725
735
  }
726
736
  /** True when bars grow to the right instead of upwards (axis.orientation). */
727
737
  isHorizontal() {
@@ -762,13 +772,13 @@ let y = class extends k {
762
772
  i.series = [], i.doomed = !0;
763
773
  }), this.inputData.dataseries.sort((i, n) => (i.advanced?.drawOrder ?? 0) - (n.advanced?.drawOrder ?? 0)), this.inputData.dataseries.forEach((i) => {
764
774
  i.advanced ??= {}, i.advanced.chartName ??= "", i.data ??= [];
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());
766
- n.forEach((r, d) => {
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];
768
- let v = this.inputData?.axis?.timeseries ? q?.map((u) => ({
775
+ const n = [...new Set(i.data.map((a) => a.pivot ?? ""))].sort(), r = ft(i.backgroundColor).monochromatic(n.length).map((a) => a.toHexString()), h = ft(i.borderColor).monochromatic(n.length).map((a) => a.toHexString());
776
+ n.forEach((a, d) => {
777
+ const l = a ?? "", c = i.label ?? "", p = l + (l && c ? " - " : "") + c, y = i.borderColor ? i.advanced?.chartName?.includes("#split#") ? i.borderColor : h[d] : void 0, x = i.backgroundColor ? i.advanced?.chartName?.includes("#split#") ? i.backgroundColor : r[d] : void 0, V = n.length === 1 ? i.data : i.data?.filter((u) => u.pivot === a), b = (u, S, m) => o ? [S, u, m] : [u, S, m];
778
+ let v = this.inputData?.axis?.timeseries ? V?.map((u) => ({
769
779
  name: u.x,
770
780
  value: b(new Date(u.x ?? "").getTime(), u.y, u.r)
771
- })) ?? [] : q?.map((u) => ({ name: u.x, value: b(u.x, u.y, u.r) })) ?? [], N = 0, U = 0;
781
+ })) ?? [] : V?.map((u) => ({ name: u.x, value: b(u.x, u.y, u.r) })) ?? [], N = 0, U = 0;
772
782
  if (this.xAxisType() === "time" && v) {
773
783
  const u = v.map((S) => S.value[e]);
774
784
  N = Math.min(...u), U = Math.max(...u);
@@ -780,14 +790,14 @@ let y = class extends k {
780
790
  maxDate: U,
781
791
  type: i.type ?? "line",
782
792
  lineStyle: {
783
- color: g,
793
+ color: y,
784
794
  width: i.styling?.borderWidth ?? 2,
785
795
  type: i.styling?.borderDash ?? "solid"
786
796
  },
787
797
  smooth: !1,
788
798
  itemStyle: {
789
799
  color: x,
790
- borderColor: g,
800
+ borderColor: y,
791
801
  borderWidth: i.styling?.borderWidth ?? 2
792
802
  },
793
803
  areaStyle: i.styling?.fill ? { color: x } : void 0,
@@ -823,9 +833,9 @@ let y = class extends k {
823
833
  this.canvasList.forEach((i, n) => {
824
834
  i.doomed && (i.echart?.dispose(), i.element?.remove(), s.push(n));
825
835
  }), s.forEach((i) => this.canvasList.delete(i)), this.canvasList = new Map(
826
- [...this.canvasList.entries()].sort(([i, n], [a, h]) => {
827
- const r = n.series?.[0].drawOrder ?? 0, d = h.series?.[0].drawOrder ?? 0;
828
- return r !== d ? r - d : i.localeCompare(a);
836
+ [...this.canvasList.entries()].sort(([i, n], [r, h]) => {
837
+ const a = n.series?.[0].drawOrder ?? 0, d = h.series?.[0].drawOrder ?? 0;
838
+ return a !== d ? a - d : i.localeCompare(r);
829
839
  })
830
840
  ), s.length > 0 && this.canvasList.forEach((i) => {
831
841
  i.echart?.resize();
@@ -864,8 +874,8 @@ let y = class extends k {
864
874
  let i = 0;
865
875
  if (this.xAxisType() === "time")
866
876
  for (const h of o.series) {
867
- const r = h.data;
868
- for (const d of r || []) {
877
+ const a = h.data;
878
+ for (const d of a || []) {
869
879
  const l = d.value?.[0] || 0;
870
880
  l > i && (i = l);
871
881
  }
@@ -879,7 +889,7 @@ let y = class extends k {
879
889
  }
880
890
  o.lastUpdateTime = e, o.lastMaxTimestamp = i;
881
891
  }
882
- return o.updateIntervals && o.updateIntervals.length > 0 ? o.updateIntervals.reduce((h, r) => h + r, 0) / o.updateIntervals.length : this.updateThresholdMs;
892
+ return o.updateIntervals && o.updateIntervals.length > 0 ? o.updateIntervals.reduce((h, a) => h + a, 0) / o.updateIntervals.length : this.updateThresholdMs;
883
893
  }
884
894
  applyData() {
885
895
  if (!this.chartContainer) return;
@@ -888,11 +898,11 @@ let y = class extends k {
888
898
  t.element && this.chartContainer.appendChild(t.element);
889
899
  this.canvasList.forEach((t, e) => {
890
900
  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({
901
+ const s = this.inputData?.axis?.showLegend ?? !0, i = this.inputData?.axis?.showTitle ?? !0, n = this.inputData?.axis?.showXAxis ?? !0, r = this.inputData?.axis?.showYAxis ?? !0, h = this.inputData?.axis?.showBox ?? !1, a = JSON.stringify({
892
902
  showLegend: s,
893
903
  showTitle: i,
894
904
  showXAxis: n,
895
- showYAxis: a,
905
+ showYAxis: r,
896
906
  showBox: h,
897
907
  xAxisLabel: this.inputData?.axis?.xAxisLabel,
898
908
  yAxisLabel: this.inputData?.axis?.yAxisLabel,
@@ -910,8 +920,8 @@ let y = class extends k {
910
920
  seriesNames: t.series.map((m) => m.name).join(","),
911
921
  seriesAxes: t.series.map((m) => m.valueAxisIndex ?? 0).join(","),
912
922
  seriesLabels: t.series.map((m) => m.label?.show ? 1 : 0).join(",")
913
- }), d = t.lastConfig !== r;
914
- t.lastConfig = r;
923
+ }), d = t.lastConfig !== a;
924
+ t.lastConfig = a;
915
925
  const l = window.structuredClone(this.template);
916
926
  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
927
  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;
@@ -926,7 +936,7 @@ let y = class extends k {
926
936
  const p = Array.isArray(l.yAxis) ? l.yAxis : [l.yAxis ?? {}];
927
937
  for (; p.length < 2; ) p.push({});
928
938
  l.yAxis = p;
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;
939
+ const y = t.series.some((m) => !!m.label?.show), x = t.series.some((m) => (m.valueAxisIndex ?? 0) === 1), V = t.series.length === 0 || t.series.some((m) => (m.valueAxisIndex ?? 0) === 0), b = r && V, v = r && 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;
930
940
  if (Object.assign(p[0], {
931
941
  type: _,
932
942
  name: N,
@@ -978,7 +988,7 @@ let y = class extends k {
978
988
  show: h,
979
989
  backgroundColor: "transparent",
980
990
  borderWidth: h ? 1 : 0,
981
- borderColor: this.themeTitleColor ?? "#ccc",
991
+ borderColor: this.resolvedTextColor() ?? "#ccc",
982
992
  top: X,
983
993
  // The category axis sits at the bottom when vertical and on the
984
994
  // left when horizontal; the value axis is the other way round.
@@ -989,8 +999,8 @@ let y = class extends k {
989
999
  // A horizontal chart grows towards the right edge, so the last
990
1000
  // axis tick and any value label printed past the end of a bar
991
1001
  // need room that `containLabel` does not reserve for them.
992
- right: (o ? g ? 45 : 15 : 0) + u,
993
- containLabel: n || a
1002
+ right: (o ? y ? 45 : 15 : 0) + u,
1003
+ containLabel: n || r
994
1004
  }, c && Object.assign(
995
1005
  l.dataZoom[0],
996
1006
  o ? { right: 0, top: X, bottom: 20, left: void 0 } : { bottom: 0, left: void 0, right: void 0, top: void 0 }
@@ -1066,7 +1076,7 @@ let y = class extends k {
1066
1076
  `;
1067
1077
  }
1068
1078
  };
1069
- y.styles = Vt`
1079
+ g.styles = qt`
1070
1080
  :host {
1071
1081
  display: block;
1072
1082
  font-family: sans-serif;
@@ -1145,32 +1155,32 @@ y.styles = Vt`
1145
1155
  `;
1146
1156
  $([
1147
1157
  tt({ type: Object })
1148
- ], y.prototype, "inputData", 2);
1158
+ ], g.prototype, "inputData", 2);
1149
1159
  $([
1150
1160
  tt({ type: Object })
1151
- ], y.prototype, "theme", 2);
1161
+ ], g.prototype, "theme", 2);
1152
1162
  $([
1153
1163
  tt({ type: Object })
1154
- ], y.prototype, "timeRange", 2);
1164
+ ], g.prototype, "timeRange", 2);
1155
1165
  $([
1156
1166
  et()
1157
- ], y.prototype, "canvasList", 2);
1167
+ ], g.prototype, "canvasList", 2);
1158
1168
  $([
1159
1169
  et()
1160
- ], y.prototype, "themeBgColor", 2);
1170
+ ], g.prototype, "themeBgColor", 2);
1161
1171
  $([
1162
1172
  et()
1163
- ], y.prototype, "themeTitleColor", 2);
1173
+ ], g.prototype, "themeTitleColor", 2);
1164
1174
  $([
1165
1175
  et()
1166
- ], y.prototype, "themeSubtitleColor", 2);
1176
+ ], g.prototype, "themeSubtitleColor", 2);
1167
1177
  $([
1168
1178
  xe(".chart-container")
1169
- ], y.prototype, "chartContainer", 2);
1170
- y = $([
1171
- me("widget-linechart-1.7.7")
1172
- ], y);
1179
+ ], g.prototype, "chartContainer", 2);
1180
+ g = $([
1181
+ me("widget-linechart-1.7.8")
1182
+ ], g);
1173
1183
  export {
1174
- y as WidgetLinechart
1184
+ g as WidgetLinechart
1175
1185
  };
1176
1186
  //# sourceMappingURL=widget-linechart.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"widget-linechart.js","sources":["../node_modules/@lit/reactive-element/css-tag.js","../node_modules/@lit/reactive-element/reactive-element.js","../node_modules/lit-html/lit-html.js","../node_modules/lit-element/lit-element.js","../node_modules/@lit/reactive-element/decorators/custom-element.js","../node_modules/@lit/reactive-element/decorators/property.js","../node_modules/@lit/reactive-element/decorators/state.js","../node_modules/@lit/reactive-element/decorators/base.js","../node_modules/@lit/reactive-element/decorators/query.js","../src/widget-linechart.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(s)+t[o+1],t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const e of o){const o=document.createElement(\"style\"),n=t.litNonce;void 0!==n&&o.setAttribute(\"nonce\",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as s}from\"./css-tag.js\";export{CSSResult,css,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{is:i,defineProperty:e,getOwnPropertyDescriptor:h,getOwnPropertyNames:r,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:\"\",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),b={attribute:!0,type:String,converter:u,reflect:!1,useDefault:!1,hasChanged:f};Symbol.metadata??=Symbol(\"metadata\"),a.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e(this.prototype,t,h)}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d(\"elementProperties\")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d(\"finalized\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d(\"properties\"))){const t=this.properties,s=[...r(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(t(s))}else void 0!==s&&i.push(t(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null}}requestUpdate(t,s,i,e=!1,h){if(void 0!==t){const r=this.constructor;if(!1===e&&(h=this[t]),i??=r.getPropertyOptions(t),!((i.hasChanged??f)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,i))))return;this.C(t,s,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),!0!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),!0===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];!0!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e)}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(s)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:\"open\"},y[d(\"elementProperties\")]=new Map,y[d(\"finalized\")]=new Map,p?.({ReactiveElement:y}),(a.reactiveElementVersions??=[]).push(\"2.1.2\");export{y as ReactiveElement,s as adoptStyles,u as defaultConverter,t as getCompatibleStyle,f as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,i=t=>t,s=t.trustedTypes,e=s?s.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,h=\"$lit$\",o=`lit$${Math.random().toFixed(9).slice(2)}$`,n=\"?\"+o,r=`<${n}>`,l=document,c=()=>l.createComment(\"\"),a=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,u=Array.isArray,d=t=>u(t)||\"function\"==typeof t?.[Symbol.iterator],f=\"[ \\t\\n\\f\\r]\",v=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,_=/-->/g,m=/>/g,p=RegExp(`>|${f}(?:([^\\\\s\"'>=/]+)(${f}*=${f}*(?:[^ \\t\\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,\"g\"),g=/'/g,$=/\"/g,y=/^(?:script|style|textarea|title)$/i,x=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),b=x(1),w=x(2),T=x(3),E=Symbol.for(\"lit-noChange\"),A=Symbol.for(\"lit-nothing\"),C=new WeakMap,P=l.createTreeWalker(l,129);function V(t,i){if(!u(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return void 0!==e?e.createHTML(i):i}const N=(t,i)=>{const s=t.length-1,e=[];let n,l=2===i?\"<svg>\":3===i?\"<math>\":\"\",c=v;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,f=0;for(;f<s.length&&(c.lastIndex=f,u=c.exec(s),null!==u);)f=c.lastIndex,c===v?\"!--\"===u[1]?c=_:void 0!==u[1]?c=m:void 0!==u[2]?(y.test(u[2])&&(n=RegExp(\"</\"+u[2],\"g\")),c=p):void 0!==u[3]&&(c=p):c===p?\">\"===u[0]?(c=n??v,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?p:'\"'===u[3]?$:g):c===$||c===g?c=p:c===_||c===m?c=v:(c=p,n=void 0);const x=c===p&&t[i+1].startsWith(\"/>\")?\" \":\"\";l+=c===v?s+r:d>=0?(e.push(a),s.slice(0,d)+h+s.slice(d)+o+x):s+o+(-2===d?i:x)}return[V(t,l+(t[s]||\"<?>\")+(2===i?\"</svg>\":3===i?\"</math>\":\"\")),e]};class S{constructor({strings:t,_$litType$:i},e){let r;this.parts=[];let l=0,a=0;const u=t.length-1,d=this.parts,[f,v]=N(t,i);if(this.el=S.createElement(f,e),P.currentNode=this.el.content,2===i||3===i){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=P.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(h)){const i=v[a++],s=r.getAttribute(t).split(o),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:l,name:e[2],strings:s,ctor:\".\"===e[1]?I:\"?\"===e[1]?L:\"@\"===e[1]?z:H}),r.removeAttribute(t)}else t.startsWith(o)&&(d.push({type:6,index:l}),r.removeAttribute(t));if(y.test(r.tagName)){const t=r.textContent.split(o),i=t.length-1;if(i>0){r.textContent=s?s.emptyScript:\"\";for(let s=0;s<i;s++)r.append(t[s],c()),P.nextNode(),d.push({type:2,index:++l});r.append(t[i],c())}}}else if(8===r.nodeType)if(r.data===n)d.push({type:2,index:l});else{let t=-1;for(;-1!==(t=r.data.indexOf(o,t+1));)d.push({type:7,index:l}),t+=o.length-1}l++}}static createElement(t,i){const s=l.createElement(\"template\");return s.innerHTML=t,s}}function M(t,i,s=t,e){if(i===E)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=a(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=M(t,h._$AS(t,i.values),h,e)),i}class R{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??l).importNode(i,!0);P.currentNode=e;let h=P.nextNode(),o=0,n=0,r=s[0];for(;void 0!==r;){if(o===r.index){let i;2===r.type?i=new k(h,h.nextSibling,this,t):1===r.type?i=new r.ctor(h,r.name,r.strings,this,t):6===r.type&&(i=new Z(h,this,t)),this._$AV.push(i),r=s[++n]}o!==r?.index&&(h=P.nextNode(),o++)}return P.currentNode=l,e}p(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class k{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=M(this,t,i),a(t)?t===A||null==t||\"\"===t?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==E&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):d(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==A&&a(this._$AH)?this._$AA.nextSibling.data=t:this.T(l.createTextNode(t)),this._$AH=t}$(t){const{values:i,_$litType$:s}=t,e=\"number\"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=S.createElement(V(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else{const t=new R(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t}}_$AC(t){let i=C.get(t.strings);return void 0===i&&C.set(t.strings,i=new S(t)),i}k(t){u(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new k(this.O(c()),this.O(c()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);t!==this._$AB;){const s=i(t).nextSibling;i(t).remove(),t=s}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class H{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=A,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=A}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=M(this,t,i,0),o=!a(t)||t!==this._$AH&&t!==E,o&&(this._$AH=t);else{const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=M(this,e[s+n],i,n),r===E&&(r=this._$AH[n]),o||=!a(r)||r!==this._$AH[n],r===A?t=A:t!==A&&(t+=(r??\"\")+h[n+1]),this._$AH[n]=r}o&&!e&&this.j(t)}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??\"\")}}class I extends H{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===A?void 0:t}}class L extends H{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==A)}}class z extends H{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5}_$AI(t,i=this){if((t=M(this,t,i,0)??A)===E)return;const s=this._$AH,e=t===A&&s!==A||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==A&&(s===A||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){\"function\"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){M(this,t)}}const j={M:h,P:o,A:n,C:1,L:N,R,D:d,V:M,I:k,H,N:L,U:z,B:I,F:Z},B=t.litHtmlPolyfillSupport;B?.(S,k),(t.litHtmlVersions??=[]).push(\"3.3.2\");const D=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new k(i.insertBefore(c(),t),t,void 0,s??{})}return h._$AI(t),h};export{j as _$LH,b as html,T as mathml,E as noChange,A as nothing,D as render,w as svg};\n//# sourceMappingURL=lit-html.js.map\n","import{ReactiveElement as t}from\"@lit/reactive-element\";export*from\"@lit/reactive-element\";import{render as e,noChange as r}from\"lit-html\";export*from\"lit-html\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const s=globalThis;class i extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=e(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return r}}i._$litElement$=!0,i[\"finalized\"]=!0,s.litElementHydrateSupport?.({LitElement:i});const o=s.litElementPolyfillSupport;o?.({LitElement:i});const n={_$AK:(t,e,r)=>{t._$AK(e,r)},_$AL:t=>t._$AL};(s.litElementVersions??=[]).push(\"4.2.2\");export{i as LitElement,n as _$LE};\n//# sourceMappingURL=lit-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=t=>(e,o)=>{void 0!==o?o.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)};export{t as customElement};\n//# sourceMappingURL=custom-element.js.map\n","import{notEqual as t,defaultConverter as e}from\"../reactive-element.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o={attribute:!0,type:String,converter:e,reflect:!1,hasChanged:t},r=(t=o,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),\"setter\"===n&&((t=Object.create(t)).wrapped=!0),s.set(r.name,t),\"accessor\"===n){const{name:o}=r;return{set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t,!0,r)},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if(\"setter\"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t,!0,r)}}throw Error(\"Unsupported decorator location: \"+n)};function n(t){return(e,o)=>\"object\"==typeof o?r(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}export{n as property,r as standardProperty};\n//# sourceMappingURL=property.js.map\n","import{property as t}from\"./property.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function r(r){return t({...r,state:!0,attribute:!1})}export{r as state};\n//# sourceMappingURL=state.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst e=(e,t,c)=>(c.configurable=!0,c.enumerable=!0,Reflect.decorate&&\"object\"!=typeof t&&Object.defineProperty(e,t,c),c);export{e as desc};\n//# sourceMappingURL=base.js.map\n","import{desc as t}from\"./base.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function e(e,r){return(n,s,i)=>{const o=t=>t.renderRoot?.querySelector(e)??null;if(r){const{get:e,set:r}=\"object\"==typeof s?n:i??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return t(n,s,{get(){let t=e.call(this);return void 0===t&&(t=o(this),(null!==t||this.hasUpdated)&&r.call(this,t)),t}})}return t(n,s,{get(){return o(this)}})}}export{e as query};\n//# sourceMappingURL=query.js.map\n","import { html, css, LitElement, PropertyValueMap } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\n\nimport * as echarts from 'echarts/core'\nimport {\n TitleComponent,\n ToolboxComponent,\n TooltipComponent,\n LegendComponent,\n DataZoomComponent,\n GridComponent\n} from 'echarts/components'\nimport { LineChart, BarChart, ScatterChart } from 'echarts/charts'\nimport { UniversalTransition, LegacyGridContainLabel } from 'echarts/features'\nimport { CanvasRenderer } from 'echarts/renderers'\nimport tinycolor, { ColorInput } from 'tinycolor2'\n\necharts.use([\n GridComponent,\n TitleComponent,\n ToolboxComponent,\n TooltipComponent,\n LegendComponent,\n DataZoomComponent,\n LineChart,\n BarChart,\n ScatterChart,\n CanvasRenderer,\n UniversalTransition,\n LegacyGridContainLabel\n])\n\nimport { ChartConfiguration } from './definition-schema'\nimport { EChartsOption, SeriesOption } from 'echarts'\nimport { TitleOption } from 'echarts/types/dist/shared'\n\ntype Theme = {\n theme_name: string\n theme_object: any\n}\n\ntype SeriesOptionX = SeriesOption & {\n minDate?: number\n maxDate?: number\n drawOrder: number\n xAxisIndex?: number\n yAxisIndex?: number\n // Which value axis (0 = primary, 1 = secondary) this series belongs to,\n // independent of orientation. In a vertical chart the value axes are the\n // y axes (left/right), in a horizontal one they are the x axes (bottom/top),\n // so xAxisIndex/yAxisIndex alone cannot be read without knowing the\n // orientation — this field can.\n valueAxisIndex?: number\n}\n@customElement('widget-linechart-versionplaceholder')\nexport class WidgetLinechart extends LitElement {\n @property({ type: Object })\n inputData?: ChartConfiguration\n\n @property({ type: Object })\n theme?: Theme\n\n @property({ type: Object })\n timeRange?: { start: number; end: number }\n\n @state()\n private canvasList: Map<\n string,\n {\n echart?: echarts.ECharts\n series: SeriesOptionX[]\n doomed?: boolean\n element?: HTMLDivElement\n drawing: boolean\n lastUpdateTime?: number\n updateIntervals?: number[]\n lastMaxTimestamp?: number\n lastConfig?: string\n }\n > = new Map()\n\n @state() private themeBgColor?: string\n @state() private themeTitleColor?: string\n @state() private themeSubtitleColor?: string\n @query('.chart-container')\n chartContainer?: HTMLDivElement\n\n boxes?: HTMLDivElement[]\n origWidth: number = 0\n origHeight: number = 0\n template: EChartsOption\n modifier: number = 1\n version: string = 'versionplaceholder'\n resizeObserver?: ResizeObserver\n updateThresholdMs: number = 300\n private maxIntervalSamples: number = 3\n\n constructor() {\n super()\n\n this.template = {\n // 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,KAAjB,WAAmBA,IAAEA,IAAE,IAAG,QAAOE,EAAC,GAAEK,KAAE,CAACP,MAAKC,MAAI;AAAC,QAAME,IAAMH,EAAE,WAAN,IAAaA,EAAE,CAAC,IAAEC,EAAE,OAAO,CAACA,GAAEC,GAAEC,MAAIF,KAAG,CAAAD,MAAG;AAAC,QAAQA,E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G,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]}
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 // 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 /**\n * Resolved text colour for the chart canvas.\n *\n * The themeTitleColor field holds a var() chain, which the browser resolves\n * for CSS but ECharts cannot — it paints to a canvas and needs a real\n * colour. Read at the point of use rather than cached, so a board style\n * edit reaches the next chart rebuild instead of waiting for a theme change.\n */\n private resolvedTextColor(): string | undefined {\n return (\n getComputedStyle(this).getPropertyValue('--re-text-color').trim() ||\n this.theme?.theme_object?.title?.textStyle?.color\n )\n }\n\n registerTheme(theme?: Theme) {\n this.themeBgColor = `var(--re-tile-background-color, ${this.theme?.theme_object?.backgroundColor || 'transparent'})`\n this.themeTitleColor = `var(--re-text-color, ${this.theme?.theme_object?.title?.textStyle?.color || 'inherit'})`\n this.themeSubtitleColor = `var(--re-text-color, ${this.theme?.theme_object?.title?.subtextStyle?.color || this.theme?.theme_object?.title?.textStyle?.color || 'inherit'})`\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.resolvedTextColor() ?? '#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","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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,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.7",
6
+ "version": "1.7.8",
7
7
  "engines": {
8
8
  "node": ">=24.9.0",
9
9
  "npm": ">=10.0.2"
@@ -271,13 +271,25 @@ export class WidgetLinechart extends LitElement {
271
271
  }
272
272
  }
273
273
 
274
+ /**
275
+ * Resolved text colour for the chart canvas.
276
+ *
277
+ * The themeTitleColor field holds a var() chain, which the browser resolves
278
+ * for CSS but ECharts cannot — it paints to a canvas and needs a real
279
+ * colour. Read at the point of use rather than cached, so a board style
280
+ * edit reaches the next chart rebuild instead of waiting for a theme change.
281
+ */
282
+ private resolvedTextColor(): string | undefined {
283
+ return (
284
+ getComputedStyle(this).getPropertyValue('--re-text-color').trim() ||
285
+ this.theme?.theme_object?.title?.textStyle?.color
286
+ )
287
+ }
288
+
274
289
  registerTheme(theme?: Theme) {
275
- const cssTextColor = getComputedStyle(this).getPropertyValue('--re-text-color').trim()
276
- const cssBgColor = getComputedStyle(this).getPropertyValue('--re-tile-background-color').trim()
277
- this.themeBgColor = cssBgColor || this.theme?.theme_object?.backgroundColor
278
- this.themeTitleColor = cssTextColor || this.theme?.theme_object?.title?.textStyle?.color
279
- this.themeSubtitleColor =
280
- cssTextColor || this.theme?.theme_object?.title?.subtextStyle?.color || this.themeTitleColor
290
+ this.themeBgColor = `var(--re-tile-background-color, ${this.theme?.theme_object?.backgroundColor || 'transparent'})`
291
+ this.themeTitleColor = `var(--re-text-color, ${this.theme?.theme_object?.title?.textStyle?.color || 'inherit'})`
292
+ this.themeSubtitleColor = `var(--re-text-color, ${this.theme?.theme_object?.title?.subtextStyle?.color || this.theme?.theme_object?.title?.textStyle?.color || 'inherit'})`
281
293
 
282
294
  if (!theme || !theme.theme_object || !theme.theme_name) return
283
295
 
@@ -776,7 +788,7 @@ export class WidgetLinechart extends LitElement {
776
788
  show: showBox,
777
789
  backgroundColor: 'transparent',
778
790
  borderWidth: showBox ? 1 : 0,
779
- borderColor: this.themeTitleColor ?? '#ccc',
791
+ borderColor: this.resolvedTextColor() ?? '#ccc',
780
792
  top: topPadding,
781
793
  // The category axis sits at the bottom when vertical and on the
782
794
  // left when horizontal; the value axis is the other way round.