Archived
See previous commitmsg
This commit is contained in:
1 parent
704ef8292b
commit
fe80b2fcdf
1 file changed
+5
@@ -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);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
Reference in new issue
Block a user