Added the labels that Martijn removed because he wasn't paying attention.

This commit is contained in:
2017-04-11 16:39:50 +02:00
parent 0f1f0b74f1
commit 491162fac0
4 changed files with 10 additions and 17 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+3 -6
View File
@@ -206,20 +206,17 @@ var DashboardComponent = (function () {
DashboardComponent.prototype.refreshData = function () {
var _this = this;
console.log("Refreshing data");
this.label = ({ data: ["Huidig opgenomen", "Huidig terug"] });
this.dataService
.usage("4530303035303031353538313833363134")
.subscribe(function (res) {
//this.data1 = <LineData> ({data: [res.HOV, res.HTV], label: "Verbruik Martijn"});
_this.data1 = ({ data: [21, 25], label: "Verbruik Martijn" });
console.log("data ");
console.log(_this.data1);
_this.data1 = ({ data: [res.HOV, res.HTV], label: "Verbruik Martijn" });
_this.mloaded = true;
});
this.dataService
.usage("4530303235303030303636383733323136")
.subscribe(function (res) {
//this.data1 = <LineData> ({data: [res.HOV, res.HTV], label: "Verbruik Kenneth"});
_this.data2 = ({ data: [18, 13], label: "Verbruik Kenneth" });
_this.data1 = ({ data: [res.HOV, res.HTV], label: "Verbruik Kenneth" });
_this.kloaded = true;
});
this.dataService
+1 -1
View File
File diff suppressed because one or more lines are too long
+5 -9
View File
@@ -17,6 +17,8 @@ export class DashboardComponent implements OnInit, OnDestroy {
public data1:LineData;
public data2:LineData;
public label:LabelData;
public mloaded:boolean = false;
public kloaded:boolean = false;
@@ -39,17 +41,13 @@ export class DashboardComponent implements OnInit, OnDestroy {
refreshData()
{
console.log("Refreshing data");
this.label = <LabelData> ({data: ["Huidig opgenomen", "Huidig terug"]});
this.dataService
.usage("4530303035303031353538313833363134")
.subscribe(res => {
//this.data1 = <LineData> ({data: [res.HOV, res.HTV], label: "Verbruik Martijn"});
this.data1 = <LineData> ({data: [21, 25], label: "Verbruik Martijn"});
console.log("data ");
console.log(this.data1);
this.data1 = <LineData> ({data: [res.HOV, res.HTV], label: "Verbruik Martijn"});
this.mloaded = true;
});
@@ -58,9 +56,7 @@ export class DashboardComponent implements OnInit, OnDestroy {
.usage("4530303235303030303636383733323136")
.subscribe(res => {
//this.data1 = <LineData> ({data: [res.HOV, res.HTV], label: "Verbruik Kenneth"});
this.data2 = <LineData> ({data: [18, 13], label: "Verbruik Kenneth"});
this.data1 = <LineData> ({data: [res.HOV, res.HTV], label: "Verbruik Kenneth"});
this.kloaded = true;
});