Skip to content

Commit

Permalink
Another try to fix graphs getting inverted.
Browse files Browse the repository at this point in the history
  • Loading branch information
Álan Crístoffer committed Apr 3, 2018
1 parent 58a4906 commit d7175e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/html/live_graph.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ <h1>{{ 'Graphs' | translate }}</h1>
<mat-checkbox [(ngModel)]="syncZoom">{{ 'Sync' | translate }}</mat-checkbox>
</div>

<div class="chart" *ngFor="let test of filteredTestData()">
<h2>{{ test.sensor }}</h2>
<chart [sensor]="test.sensor" [points]="test.points" [syncZoomFunction]="syncZoomFunction"></chart>
<div class="chart" *ngFor="let v of this.selectedVars">
<h2>{{ v }}</h2>
<chart [sensor]="v" [points]="filteredTestData(v)[0].points" [syncZoomFunction]="syncZoomFunction"></chart>
</div>
</mat-card-content>
</mat-card>
Expand Down
4 changes: 2 additions & 2 deletions src/typescript/live_graph.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ export class LiveGraphComponent implements OnInit, OnDestroy {
}
}

filteredTestData(): TestData[] {
return _.filter(this.testData, t => _.includes(this.selectedVars, t.sensor))
filteredTestData(sensor: string): TestData[] {
return _.filter(this.testData, t => t.sensor == sensor)
}

httpError(): () => void {
Expand Down

0 comments on commit d7175e3

Please sign in to comment.