From a5394e4cbfbc888913e1baadb5333db51e13ac30 Mon Sep 17 00:00:00 2001 From: Chteufleur Date: Fri, 6 Nov 2015 19:40:02 +0100 Subject: [PATCH] Some fancy on graph --- controllers/viewTemp.go | 2 +- views/temp.tpl | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/controllers/viewTemp.go b/controllers/viewTemp.go index 02a7fd0..a7dab26 100644 --- a/controllers/viewTemp.go +++ b/controllers/viewTemp.go @@ -49,7 +49,7 @@ func (c *ViewTempController) Get() { */ func formatDataSensor(sensorName string, values []temperature.TempTable) string { - ret := "{name : \"" + sensorName + "\", data : [" + ret := "{name : \"" + sensorName + "\",marker : {enabled : true, radius : 3}, data : [" for i := 0; i < len(values); i++ { if i > 0 { ret += "," diff --git a/views/temp.tpl b/views/temp.tpl index 3849936..b2c7170 100644 --- a/views/temp.tpl +++ b/views/temp.tpl @@ -33,7 +33,7 @@ }, { count: 3, type: 'day', - text: '3j' + text: '3j', }, { count: 5, type: 'day', @@ -49,7 +49,8 @@ }, { type: 'all', text: 'All' - }] + }], + selected: 5 }, yAxis: { title: { @@ -58,6 +59,9 @@ }, xAxis: { type: 'datetime' + }, + scrollbar : { + enabled : false }, legend : { enabled : true,