mirror of
https://github.com/beestat/app.git
synced 2025-05-31 12:16:39 -04:00
Fixed latent issue related to #244
This commit is contained in:
parent
ed94987db1
commit
1f3ac41fe1
@ -94,10 +94,7 @@ beestat.runtime_sensor.get_data = function(thermostat_id, range) {
|
|||||||
|
|
||||||
// Loop.
|
// Loop.
|
||||||
var current_m = begin_m;
|
var current_m = begin_m;
|
||||||
while (
|
while (current_m.isSameOrAfter(end_m) === false) {
|
||||||
// beestat.cache.runtime_sensor.length > 0 &&
|
|
||||||
current_m.isSameOrAfter(end_m) === false
|
|
||||||
) {
|
|
||||||
data.x.push(current_m.clone());
|
data.x.push(current_m.clone());
|
||||||
|
|
||||||
// Without this series the chart will jump to the nearest value if there is a chunk of missing data.
|
// Without this series the chart will jump to the nearest value if there is a chunk of missing data.
|
||||||
|
@ -57,6 +57,21 @@ beestat.component.chart.runtime_sensor_detail_occupancy.prototype.get_options_se
|
|||||||
beestat.style.color.lightblue.dark
|
beestat.style.color.lightblue.dark
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This chart does not need the entire dummy series, but it does need the
|
||||||
|
* first series to have *some* non-null data or Highcharts does not find a
|
||||||
|
* valid point to reference when trying to sync the crosshair between
|
||||||
|
* series. The easiest way to fix that seems to be throwing a mostly-empty
|
||||||
|
* series up top.
|
||||||
|
*/
|
||||||
|
series.push({
|
||||||
|
'name': '',
|
||||||
|
'data': [0],
|
||||||
|
'yAxis': 0,
|
||||||
|
'type': 'line',
|
||||||
|
'lineWidth': 0
|
||||||
|
});
|
||||||
|
|
||||||
// Sensors
|
// Sensors
|
||||||
this.data_.metadata.sensors.forEach(function(sensor, i) {
|
this.data_.metadata.sensors.forEach(function(sensor, i) {
|
||||||
series.push({
|
series.push({
|
||||||
@ -71,14 +86,6 @@ beestat.component.chart.runtime_sensor_detail_occupancy.prototype.get_options_se
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
series.push({
|
|
||||||
'name': '',
|
|
||||||
'data': self.data_.series.dummy,
|
|
||||||
'yAxis': 0,
|
|
||||||
'type': 'line',
|
|
||||||
'lineWidth': 0
|
|
||||||
});
|
|
||||||
|
|
||||||
return series;
|
return series;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user