Almost there
This commit is contained in:
@@ -45,7 +45,6 @@ class ClimateChart {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async getInitialDataBlob(): Promise<SnapshotRecords> {
|
private async getInitialDataBlob(): Promise<SnapshotRecords> {
|
||||||
try {
|
|
||||||
const data = await fetch(this.rootUrl + "/data?since=" + new Date((new Date().getTime() - this.minutesDisplayed * 60 * 1000)).toISOString());
|
const data = await fetch(this.rootUrl + "/data?since=" + new Date((new Date().getTime() - this.minutesDisplayed * 60 * 1000)).toISOString());
|
||||||
const payload = await data.json();
|
const payload = await data.json();
|
||||||
if (payload.snapshots.length < 0) {
|
if (payload.snapshots.length < 0) {
|
||||||
@@ -53,10 +52,6 @@ class ClimateChart {
|
|||||||
}
|
}
|
||||||
return payload;
|
return payload;
|
||||||
}
|
}
|
||||||
catch (e) {
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private async initChart() {
|
private async initChart() {
|
||||||
const canvasElement = document.getElementById(this.canvasId);
|
const canvasElement = document.getElementById(this.canvasId);
|
||||||
|
|||||||
Reference in New Issue
Block a user