});
// reload data in charts
- // TODO: this is basically the same as the unused loaddays function below
setInterval(
function() {
- if (element.substr(0, 7) == 'chart_w') {
- console.log("water");
- chart.load({
- url: api_base_url_sensors + beginend(days),
- mimeType: 'json'
- });
- chart.flush();
- } else {
- console.log("air");
- chart.load({
- url: api_base_url_weather + beginend(days),
- mimeType: 'json'
- });
- chart.flush();
- }
+ loaddays(chart, element, days);
},
refresh_interval
);