diff --git a/src/app/app.component.html b/src/app/app.component.html
index 89bc8cd..16cb807 100644
--- a/src/app/app.component.html
+++ b/src/app/app.component.html
@@ -25,7 +25,7 @@
-
+
diff --git a/src/app/battery/battery.component.html b/src/app/battery/battery.component.html
index 132d185..bca05ba 100644
--- a/src/app/battery/battery.component.html
+++ b/src/app/battery/battery.component.html
@@ -1,26 +1,23 @@
-
POWER WALL:
{{batteryService.average * 100}}%
UNKNOWN
-
-
+
-
-
+
- {{b.name}}
+ {{b.name}}
{{b.history[0].percentage * 100}}%
{{round(b.history[0].temp)}} °C
diff --git a/src/app/battery/battery.component.ts b/src/app/battery/battery.component.ts
index ee2df3a..662345d 100644
--- a/src/app/battery/battery.component.ts
+++ b/src/app/battery/battery.component.ts
@@ -1,11 +1,14 @@
-import {Component} from '@angular/core';
+import {Component, OnInit, ViewChild} from '@angular/core';
import {BatteryService} from './battery.service';
+import {BarVerticalComponent} from '@swimlane/ngx-charts/release/bar-chart';
@Component({
selector: 'app-batterys',
templateUrl: './battery.component.html'
})
-export class BatteryComponent {
+export class BatteryComponent implements OnInit {
+ @ViewChild('chart1') chart1: BarVerticalComponent;
+ @ViewChild('chart2') chart2: BarVerticalComponent;
airScheme = {
name: 'air',
@@ -23,6 +26,13 @@ export class BatteryComponent {
constructor(public batteryService: BatteryService) { }
+ ngOnInit() {
+ setTimeout(() => {
+ this.chart1.update();
+ this.chart2.update();
+ }, 1000);
+ }
+
round(num: number) {
return Math.round(num * 10) / 10;
}
diff --git a/src/app/login/login.component.html b/src/app/login/login.component.html
index 8c99d8b..a270f57 100644
--- a/src/app/login/login.component.html
+++ b/src/app/login/login.component.html
@@ -9,5 +9,5 @@
-
+
diff --git a/src/styles.scss b/src/styles.scss
index e4b9573..d19677f 100644
--- a/src/styles.scss
+++ b/src/styles.scss
@@ -35,11 +35,6 @@ html, body {
}
}
-.nav-fix {
- width: 100%;
- height: 64px;
-}
-
.center {
position: fixed;
left: 50%;
@@ -125,3 +120,11 @@ html, body {
.flex-grow-3 {
flex-grow: 3;
}
+
+.flex-basis-0 {
+ flex-basis: 0;
+}
+
+.flex-basis-auto {
+ flex-basis: auto;
+}