@record-evolution/widget-gauge 1.7.6 → 1.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/default-data.json
CHANGED
package/src/widget-gauge.ts
CHANGED
|
@@ -329,8 +329,8 @@ export class WidgetGauge extends LitElement {
|
|
|
329
329
|
if (isNaN(ds.range as number)) ds.range = 100
|
|
330
330
|
ds.ranges = ds.sections?.sectionLimits?.map((v, i, a) => v - (a?.[i - 1] ?? 0)).slice(1) ?? []
|
|
331
331
|
|
|
332
|
-
|
|
333
|
-
const option = window.structuredClone(this.template)
|
|
332
|
+
const echart = this.canvasList.get(ds.label)?.echart
|
|
333
|
+
const option = echart?.getOption() ?? window.structuredClone(this.template)
|
|
334
334
|
const seriesArr = option.series as GaugeSeriesOption[]
|
|
335
335
|
const ga: any = seriesArr?.[0],
|
|
336
336
|
ga2: any = seriesArr?.[1]
|
|
@@ -395,7 +395,7 @@ export class WidgetGauge extends LitElement {
|
|
|
395
395
|
titleElement.textContent = ds.label ?? ''
|
|
396
396
|
}
|
|
397
397
|
|
|
398
|
-
|
|
398
|
+
echart?.setOption(option)
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
401
|
deleteCharts() {
|