raspberry pi analytics graph fix

revert-dabc3590
Nirothipan 8 years ago
parent 044b56f56f
commit f0e6d305f9

@ -13,7 +13,7 @@ define stream raspberrypi (meta_owner string, meta_deviceId string, meta_time lo
define stream temperature (meta_owner string, meta_deviceType string, meta_deviceId string, meta_time long, temperature float);
from raspberrypi
select meta_owner, 'raspberrypi' as meta_deviceType, meta_deviceId, meta_time * 1000 as meta_time, temperature
select meta_owner, 'raspberrypi' as meta_deviceType, meta_deviceId, time:timestampInMilliseconds() as meta_time, temperature
insert into temperature;

@ -168,7 +168,7 @@ function drawGraph_raspberrypi(from, to) {
for (var i = 0; i < data.length; i++) {
chartData.push(
{
x: parseInt(data[i].values.time) - tzOffset,
x: parseInt(data[i].values.meta_time/1000) - tzOffset,
y: parseInt(data[i].values.temperature)
}
);

Loading…
Cancel
Save