See previous commitmsg

This commit is contained in:
nikolark committed 2011-11-28 22:39:42 +01:00
1 parent 704ef8292b
commit fe80b2fcdf
1 file changed
+5
+5
View File
@@ -56,11 +56,15 @@ $(document).ready(function() {
}; };
var url = '/log/'; var url = '/log/';
$.getJSON(url, function(data) { $.getJSON(url, function(data) {
var max = 0;
$.each(data, function(user, val) { $.each(data, function(user, val) {
// convert to unixtime and fill lines array. // convert to unixtime and fill lines array.
var line = []; var line = [];
$.each(val, function(i, num) { $.each(val, function(i, num) {
if(num[1] > max) {
max = num[1];
}
line[i] = new Array(Date.parse(num[0]), num[1]); line[i] = new Array(Date.parse(num[0]), num[1]);
}); });
options.series.push({ options.series.push({
@@ -72,6 +76,7 @@ $(document).ready(function() {
data: line data: line
}); });
}); });
options.yAxis.max = max + 5;
chart = new Highcharts.Chart(options); chart = new Highcharts.Chart(options);
}); });
}); });