@record-evolution/widget-gauge 1.7.3 → 1.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/widget-gauge.ts
CHANGED
|
@@ -181,6 +181,7 @@ export class WidgetGauge extends LitElement {
|
|
|
181
181
|
protected firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {
|
|
182
182
|
this.resizeObserver.observe(this.shadowRoot?.querySelector('.wrapper') as HTMLDivElement)
|
|
183
183
|
this.gaugeContainer = this.shadowRoot?.querySelector('.gauge-container')
|
|
184
|
+
this.registerTheme(this.theme)
|
|
184
185
|
this.transformData()
|
|
185
186
|
this.setupCharts()
|
|
186
187
|
this.sizingSetup()
|
|
@@ -189,16 +190,16 @@ export class WidgetGauge extends LitElement {
|
|
|
189
190
|
}
|
|
190
191
|
|
|
191
192
|
registerTheme(theme?: Theme) {
|
|
192
|
-
console.log('Registering theme', theme)
|
|
193
|
-
if (!theme || !theme.theme_object || !theme.theme_name) return
|
|
194
|
-
|
|
195
|
-
echarts.registerTheme(theme.theme_name, theme.theme_object)
|
|
196
193
|
const cssTextColor = getComputedStyle(this).getPropertyValue('--re-text-color').trim()
|
|
197
194
|
const cssBgColor = getComputedStyle(this).getPropertyValue('--re-background-color').trim()
|
|
198
195
|
this.themeBgColor = cssBgColor || this.theme?.theme_object?.backgroundColor
|
|
199
196
|
this.themeTitleColor = cssTextColor || this.theme?.theme_object?.title?.textStyle?.color
|
|
200
197
|
this.themeSubtitleColor =
|
|
201
198
|
cssTextColor || this.theme?.theme_object?.title?.subtextStyle?.color || this.themeTitleColor
|
|
199
|
+
|
|
200
|
+
if (!theme || !theme.theme_object || !theme.theme_name) return
|
|
201
|
+
|
|
202
|
+
echarts.registerTheme(theme.theme_name, theme.theme_object)
|
|
202
203
|
}
|
|
203
204
|
|
|
204
205
|
sizingSetup() {
|