Mit Diagramm für 1 Tag
This commit is contained in:
parent
4900d71722
commit
5cffc1d09f
@ -1,5 +1,5 @@
|
||||
<main class="main">
|
||||
<div style="border: 1px solid blueviolet;width: 640px; height: 320px;">
|
||||
<div style="border: 1px solid blueviolet;width: 100%; height: 100%;">
|
||||
<canvas id="canvas"></canvas>
|
||||
</div>
|
||||
<div ngbAccordion>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -2,6 +2,7 @@ import { Injectable } from '@angular/core';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Statistics } from './statistics';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Aggregate } from './aggregate';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@ -12,10 +13,13 @@ export class RestService {
|
||||
}
|
||||
|
||||
getStatistics(): Observable<Statistics> {
|
||||
|
||||
return this.http.get<Statistics>('https://vz.home.peper.info/rest-vz/stats?houseId=1&duration=P7D');
|
||||
}
|
||||
|
||||
getLatestData(): Observable<Aggregate[]> {
|
||||
return this.http.get<Aggregate[]>('https://vz.home.peper.info/rest-vz/latest-data?houseId=1&timeWindow=1440');
|
||||
}
|
||||
|
||||
getStatisticsWithDuration(duration: string | undefined): Observable<Statistics> {
|
||||
if (duration) {
|
||||
return this.http.get<Statistics>('https://vz.home.peper.info/rest-vz/stats?houseId=1&duration=' + duration);
|
||||
|
||||
@ -4,7 +4,6 @@ import { RestService } from '../rest.service';
|
||||
import { formatDate, formatNumber } from '@angular/common';
|
||||
import { NgIf } from '@angular/common';
|
||||
import * as _ from 'lodash';
|
||||
//import { RestService } from '../rest.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-test',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user