Almost there
This commit is contained in:
2
webapp/dist/main.js
vendored
2
webapp/dist/main.js
vendored
File diff suppressed because one or more lines are too long
@@ -64,10 +64,10 @@ class ClimateChart {
|
|||||||
this.chart = new Chart(ctx, generateClimateChartConfig({}));
|
this.chart = new Chart(ctx, generateClimateChartConfig({}));
|
||||||
try {
|
try {
|
||||||
const payload = await this.getInitialDataBlob();
|
const payload = await this.getInitialDataBlob();
|
||||||
console.log(payload);
|
|
||||||
this.latestSnapshot = payload.snapshots[payload.snapshots.length - 1];
|
this.latestSnapshot = payload.snapshots[payload.snapshots.length - 1];
|
||||||
this.insertSnapshots(...payload.snapshots);
|
this.insertSnapshots(...payload.snapshots);
|
||||||
setInterval(() => this.updateFromServer(), 30 * 1000);
|
setInterval(() => this.updateFromServer(), 30 * 1000);
|
||||||
|
this.chart.update();
|
||||||
this.onLoadedCallback();
|
this.onLoadedCallback();
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user