aboutsummaryrefslogtreecommitdiff
path: root/web/static/app/diller/web.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/static/app/diller/web.js')
-rw-r--r--web/static/app/diller/web.js55
1 files changed, 1 insertions, 54 deletions
diff --git a/web/static/app/diller/web.js b/web/static/app/diller/web.js
index 4b173ad..911cae5 100644
--- a/web/static/app/diller/web.js
+++ b/web/static/app/diller/web.js
@@ -48,6 +48,7 @@
ctrl.device = device.data.device;
ctrl.property = _.find(ctrl.device.properties, {id: $route.current.params.propertyId});
}
+
updateData(device);
ctrl.values = values.data.values;
@@ -92,60 +93,6 @@
};
ctrl.interval = Diller.Interval.hours(5);
-
- // ctrl.values24h = values24h.data.values;
-
- function chartist() {
- var avgs = _.pluck(ctrl.values24h, 'avg');
- var timestamps = _.map(ctrl.values24h, function(row) {
- var m = moment(row.timestamp, isoFormat);
- return m.format('HH:mm');
- });
-
- var data = {
- labels: timestamps,
- series: [
- avgs
- ]
- };
-
- var options = {
- axisX: {
- showLabel: false,
- showGrid: false
- }
- };
-
-// options.lineSmooth = Chartist.Interpolation.cardinal({
-// fillHoles: true,
-// })
-
- options.axisX = {
- showLabel: true,
- showGrid: true,
- labelInterpolationFnc: function(value, index) {
- return index % 4 === 0 ? value : null;
- }
- };
-
- var chartData = {
- series: [[]],
- labels: []
- };
-
- // var chart = new Chartist.Line('#values-chart', chartData, options);
- // console.log('chart', chart);
-/*
- $timeout(function() {
- chartData = data;
- // console.log(data);
- var chart = new Chartist.Line('#values-chart', chartData, options);
- console.log('chart', chart);
- });
-*/
- }
-
- // chartist();
}
function TimestampFilter() {