Visualization: fix label width on mobile (#9829)
This commit is contained in:
parent
bd72d94b62
commit
c9fa5ab7eb
2 changed files with 7 additions and 2 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue