@record-evolution/widget-gauge 1.7.5 → 1.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/default-data.json
CHANGED
package/src/widget-gauge.ts
CHANGED
|
@@ -191,7 +191,7 @@ export class WidgetGauge extends LitElement {
|
|
|
191
191
|
|
|
192
192
|
registerTheme(theme?: Theme) {
|
|
193
193
|
const cssTextColor = getComputedStyle(this).getPropertyValue('--re-text-color').trim()
|
|
194
|
-
const cssBgColor = getComputedStyle(this).getPropertyValue('--re-background-color').trim()
|
|
194
|
+
const cssBgColor = getComputedStyle(this).getPropertyValue('--re-tile-background-color').trim()
|
|
195
195
|
this.themeBgColor = cssBgColor || this.theme?.theme_object?.backgroundColor
|
|
196
196
|
this.themeTitleColor = cssTextColor || this.theme?.theme_object?.title?.textStyle?.color
|
|
197
197
|
this.themeSubtitleColor =
|
|
@@ -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() {
|