@record-evolution/widget-gauge 1.7.9 → 1.7.11
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
|
@@ -263,7 +263,7 @@ export class WidgetGauge extends LitElement {
|
|
|
263
263
|
this.boxes = Array.from(this?.shadowRoot?.querySelectorAll('.chart') as NodeListOf<HTMLDivElement>)
|
|
264
264
|
|
|
265
265
|
this.boxes?.forEach((box) =>
|
|
266
|
-
box.setAttribute('style', `width:${modifier * chartW}px; height:${modifier * (chartH -
|
|
266
|
+
box.setAttribute('style', `width:${modifier * chartW}px; height:${modifier * (chartH - 27)}px`)
|
|
267
267
|
)
|
|
268
268
|
|
|
269
269
|
this.modifier = modifier
|
|
@@ -346,7 +346,7 @@ export class WidgetGauge extends LitElement {
|
|
|
346
346
|
|
|
347
347
|
ga.data[0].value = ds.needleValue
|
|
348
348
|
ga.data[0].name = ds.unit
|
|
349
|
-
ga.title.fontSize =
|
|
349
|
+
ga.title.fontSize = 20 * modifier
|
|
350
350
|
ga.title.color = ds.valueColor ?? this.themeTitleColor
|
|
351
351
|
ga.detail.color = ds.valueColor ?? this.themeTitleColor
|
|
352
352
|
ga.detail.fontSize = 40 * modifier
|
|
@@ -379,7 +379,6 @@ export class WidgetGauge extends LitElement {
|
|
|
379
379
|
?.map((b, i) => [((sectionLimits?.[i + 1] ?? ga.min) - ga.min) / (ds.range as number), b])
|
|
380
380
|
.filter(([s]) => !isNaN(s as number)) ?? [1 / 3, 1 / 3, 1 / 3]
|
|
381
381
|
|
|
382
|
-
console.log('Color sections', colorSections, sectionLimits)
|
|
383
382
|
ga2.axisLine.lineStyle.width = 8 * modifier
|
|
384
383
|
ga2.axisLine.lineStyle.color = colorSections?.length
|
|
385
384
|
? colorSections
|
|
@@ -405,7 +404,7 @@ export class WidgetGauge extends LitElement {
|
|
|
405
404
|
if (titleElement) {
|
|
406
405
|
titleElement.style.fontSize = String(20 * modifier) + 'px'
|
|
407
406
|
titleElement.style.maxWidth = String(300 * modifier) + 'px'
|
|
408
|
-
titleElement.style.height = String(
|
|
407
|
+
titleElement.style.height = String(27 * modifier) + 'px'
|
|
409
408
|
titleElement.textContent = ds.label ?? ''
|
|
410
409
|
}
|
|
411
410
|
|