-
Notifications
You must be signed in to change notification settings - Fork 397
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UI: fix display error + percentagebar calculation (#2837)
* fix reserve bar * fix energy chart cutoff * fix percentbar warning * fix on reserve soc
- Loading branch information
Showing
4 changed files
with
12 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
ui/src/app/shared/components/flat/flat-widget-percentagebar/flat-widget-percentagebar.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
<svg width="100%" height="24" overflow="visible"> | ||
<rect width="100%" rx="7.3" ry="7.3" height="22" fill="var(--ion-color-light)" /> | ||
<rect *ngIf="displayValue" x="2" y="2" rx="6" ry="6" height="18" ngClass="primary-color" | ||
attr.width="calc({{ displayValue }}% - 4px)" /> | ||
<rect *ngIf="displayPercent" x="2" y="2" rx="6" ry="6" height="18" ngClass="primary-color" | ||
[style]="'width: calc(' + displayPercent + '% - 4px); transition: width 0.5s ease-in-out;'" /> | ||
<text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" style="font-weight: 500" | ||
ngClass="secondary-color"> | ||
{{ displayValue | unitvalue: '%' }} | ||
{{ displayPercent | unitvalue: '%' }} | ||
</text> | ||
<ng-content></ng-content> | ||
</svg> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters