Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
changes to date time visualization input
  • Loading branch information
rrc12004 committed Apr 2, 2019
1 parent b6b5dda commit 7fdd98d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
5 changes: 5 additions & 0 deletions src/app/visualize-all/visualize-all.component.css
Expand Up @@ -15,4 +15,9 @@ select#data_select {

p#visMessage {
color: white;
}

p#graphInfo {
color: grey;
font-size: 12px;
}
7 changes: 6 additions & 1 deletion src/app/visualize-all/visualize-all.component.html
Expand Up @@ -5,7 +5,11 @@
<p class="text-center">{{laymanDataVal$}} Graph</p>
<canvas id="canvas">{{chart}}</canvas>

<p class="text-center">Units: {{unit$}}</p>
<p id="graphInfo" class="text-center">
Dates: {{startTime$}} - {{endTime$}}<br>
Units: {{unit$}}<br>
Function: {{function$}}<br>
</p>
<form id="visToolbar">
<h4 class="text-center mb3" style="color:red" *ngIf="signal">Invalid Entry</h4>
<div class="text-center mb3" style="background-color: black;">
Expand Down Expand Up @@ -45,6 +49,7 @@
<br>
<br>
</div>
<br><br>
</form>
</div>
</div>
Expand Down
13 changes: 11 additions & 2 deletions src/app/visualize-all/visualize-all.component.ts
Expand Up @@ -20,6 +20,9 @@ export class VisualizeAllComponent implements OnInit {
public generators$: Object;
public chart$: Object;
public unit$: any = null;
public function$: any = null;
public startTime$: any = null;
public endTime$: any = null;
public dataNames$;
public laymanDataVal$: any = null;
public chart: any = null;
Expand Down Expand Up @@ -86,8 +89,8 @@ export class VisualizeAllComponent implements OnInit {
this.signal = true;
}

let startTime = this.startTime.nativeElement.value;
let endTime = this.endTime.nativeElement.value;
const startTime = this.startTime.nativeElement.value;
const endTime = this.endTime.nativeElement.value;

let timeStart;
let timeEnd;
Expand Down Expand Up @@ -166,6 +169,9 @@ export class VisualizeAllComponent implements OnInit {
this.chart.destroy();
this.chart = this.graphData.createChart(labels, data, genName);
this.unit$ = this.data.getUnits(dataVal);
this.startTime$ = startArray[1] + '/' + startArray[2] + '/' + startArray[0];
this.endTime$ = endArray[1] + '/' + endArray[2] + '/' + endArray[0];
this.function$ = funcVal;
});
} catch (err) {
return err;
Expand Down Expand Up @@ -212,6 +218,9 @@ export class VisualizeAllComponent implements OnInit {
this.laymanDataVal$ = 'Example Lube Oil Temperature';
this.chart = this.graphData.createChart(labels, data, ['South Garage Generator']);
this.unit$ = this.data.getUnits('oil.temp');
this.startTime$ = '03/13/2019';
this.endTime$ = '03/14/2019';
this.function$ = 'sum';
});

} catch (err) {
Expand Down

0 comments on commit 7fdd98d

Please sign in to comment.