mirror of
https://github.com/ConnectedHumber/Air-Quality-Web
synced 2024-11-22 06:23:01 +00:00
For #15. Attempt to fix it, but I'm unsure as to whether it's worked or not.
This commit is contained in:
parent
cd71310154
commit
28323e86d9
1 changed files with 2 additions and 2 deletions
|
@ -229,7 +229,7 @@ class DeviceReadingDisplay {
|
||||||
data: {
|
data: {
|
||||||
// We need to define an initial dataset here because otherwise
|
// We need to define an initial dataset here because otherwise
|
||||||
// Chart.js gets confused 'cause it has nothing to animate from
|
// Chart.js gets confused 'cause it has nothing to animate from
|
||||||
labels: [],
|
// labels: [],
|
||||||
datasets: []
|
datasets: []
|
||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
|
@ -353,7 +353,7 @@ class DeviceReadingDisplay {
|
||||||
this.chart.data.datasets.push(new_data_obj);
|
this.chart.data.datasets.push(new_data_obj);
|
||||||
|
|
||||||
// Update the x axis labels
|
// Update the x axis labels
|
||||||
this.chart.data.labels = new_data_obj.data.map((point) => point.t);
|
// this.chart.data.labels = new_data_obj.data.map((point) => point.t);
|
||||||
|
|
||||||
// Update the chart
|
// Update the chart
|
||||||
this.chart.update();
|
this.chart.update();
|
||||||
|
|
Loading…
Reference in a new issue