Visualization: fix label width on mobile (#9829)

This commit is contained in:
Michael Geers 2023-09-10 20:44:53 +02:00 • committed by GitHub
parent bd72d94b62
commit c9fa5ab7eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View file

@ -115,7 +115,12 @@ import Energyflow from "./Energyflow.vue";
:pvPower="0"
:gridPower="6500"
:homePower="1000"
:loadpointsCompact="[{ power: 5500, icon: 'car', charging: true }]"
:loadpointsCompact="[
{ power: 5500, icon: 'car', charging: true },
{ power: 0, icon: 'car', charging: false },
{ power: 0, icon: 'car', charging: false },
{ power: 0, icon: 'car', charging: false },
]"
:batteryPower="0"
:batterySoc="0"
siteTitle="Home"

View file

@ -146,7 +146,7 @@ export default {
},
methods: {
widthTotal: function (power) {
if (this.totalAdjusted === 0) return "0%";
if (this.totalAdjusted === 0 || power === 0) return "0";
return (100 / this.totalAdjusted) * power + "%";
},
fmtBarValue: function (watt) {