From fe80b2fcdf0735896b47e8d089ba09c1487a1d13 Mon Sep 17 00:00:00 2001 From: Nikolai Kristiansen Date: Mon, 28 Nov 2011 22:39:42 +0100 Subject: [PATCH] See previous commitmsg --- static/js/snurr.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/static/js/snurr.js b/static/js/snurr.js index f7e5b63..51ed174 100644 --- a/static/js/snurr.js +++ b/static/js/snurr.js @@ -56,11 +56,15 @@ $(document).ready(function() { }; var url = '/log/'; $.getJSON(url, function(data) { + var max = 0; $.each(data, function(user, val) { // convert to unixtime and fill lines array. var line = []; $.each(val, function(i, num) { + if(num[1] > max) { + max = num[1]; + } line[i] = new Array(Date.parse(num[0]), num[1]); }); options.series.push({ @@ -72,6 +76,7 @@ $(document).ready(function() { data: line }); }); + options.yAxis.max = max + 5; chart = new Highcharts.Chart(options); }); });