mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-02-27 09:20:22 +00:00
White numbers on graph in dark mode
This commit is contained in:
12
lib/SvelteUi/app/dist/index.js
vendored
12
lib/SvelteUi/app/dist/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -83,7 +83,7 @@
|
||||
width="{barWidth - 4}"
|
||||
dominant-baseline="middle"
|
||||
text-anchor="{barWidth < vertSwitch || point.labelAngle ? 'left' : 'middle'}"
|
||||
fill="{yScale(point.value) > yScale(0)-labelOffset ? point.color : 'white'}"
|
||||
fill="{yScale(point.value) > yScale(0)-labelOffset && !config.dark ? point.color : 'white'}"
|
||||
transform="translate({xScale(i) + barWidth/2} {yScale(point.value) > yScale(0) - labelOffset ? yScale(point.value) - labelOffset : yScale(point.value) + 10}) rotate({point.labelAngle ? point.labelAngle : barWidth < vertSwitch ? 90 : 0})"
|
||||
|
||||
>{point.label}</text>
|
||||
@@ -107,7 +107,7 @@
|
||||
width="{barWidth - 4}"
|
||||
dominant-baseline="middle"
|
||||
text-anchor="{'middle'}"
|
||||
fill="{yScale(-point.value2) < yScale(0) + 15 ? point.color2 ? point.color2 : point.color : 'white'}"
|
||||
fill="{yScale(-point.value2) < yScale(0) + 15 && !config.dark ? point.color2 ? point.color2 : point.color : 'white'}"
|
||||
transform="translate({xScale(i) + (barWidth/2)} {yScale(-point.value2) < yScale(0) + 15 ? yScale(-point.value2) + 15 : yScale(-point.value2) - 14}) rotate({barWidth < vertSwitch ? 90 : 0})"
|
||||
>{point.label2}</text>
|
||||
{#if point.title2}
|
||||
|
||||
@@ -97,6 +97,7 @@
|
||||
|
||||
config = {
|
||||
title: title,
|
||||
dark: document.documentElement.classList.contains('dark'),
|
||||
height: 226,
|
||||
width: 1520,
|
||||
padding: { top: 20, right: 15, bottom: 20, left: 35 },
|
||||
|
||||
@@ -98,6 +98,7 @@
|
||||
|
||||
config = {
|
||||
title: title.replace('{0}', lm.getDate().toFixed(0)) + " (kWh)",
|
||||
dark: document.documentElement.classList.contains('dark'),
|
||||
height: 226,
|
||||
width: 1520,
|
||||
padding: { top: 20, right: 15, bottom: 20, left: 35 },
|
||||
|
||||
@@ -79,6 +79,7 @@
|
||||
|
||||
config = {
|
||||
title: title,
|
||||
dark: document.documentElement.classList.contains('dark'),
|
||||
padding: { top: 20, right: 15, bottom: 20, left: 35 },
|
||||
y: {
|
||||
min: -maxExport,
|
||||
|
||||
@@ -115,6 +115,7 @@
|
||||
|
||||
config = {
|
||||
title: title + " (" + currency + ")",
|
||||
dark: document.documentElement.classList.contains('dark'),
|
||||
padding: { top: 20, right: 15, bottom: 20, left: 35 },
|
||||
y: {
|
||||
min: min,
|
||||
|
||||
@@ -80,6 +80,7 @@
|
||||
|
||||
config = {
|
||||
title: title,
|
||||
dark: document.documentElement.classList.contains('dark'),
|
||||
padding: { top: 20, right: 35, bottom: 20, left: 35 },
|
||||
y: {
|
||||
min: min,
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
|
||||
config = {
|
||||
title: title + " (°C)",
|
||||
dark: document.documentElement.classList.contains('dark'),
|
||||
height: 226,
|
||||
width: 1520,
|
||||
padding: { top: 20, right: 15, bottom: 20, left: 35 },
|
||||
|
||||
Reference in New Issue
Block a user