Removed unused plugins, added axis labels

Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
This commit is contained in:
Roman Schmerold (BNoiZe)
2013-12-27 15:00:38 +01:00
parent 5cb0256a58
commit f3b61ce87c
3 changed files with 34 additions and 54 deletions

View File

@@ -5,6 +5,7 @@ $(document).ready(function() {
var ftp = [];
var http = [];
var mail = [];
var ticks = [];
var i = 1;
var links = [];
$('#datatable tbody tr').reverse().each(function() {
@@ -14,6 +15,9 @@ $(document).ready(function() {
var maild = $(row).children().first().next().next().next().text();
if ($(row).children().first().find("a").length > 0) {
links.push($(row).children().first().html());
ticks.push([i, $(row).children().first().find("a").html().split(" ")[0]]);
} else {
ticks.push([i, $(row).children().first().html()]);
}
ftp.push([i, parseFloat(ftpd / 1024)]);
http.push([i, parseFloat(httpd / 1024)]);
@@ -39,17 +43,17 @@ $(document).ready(function() {
var ftpdata = [{
label: 'FTP',
data: ftp,
color: '#019522'
color: '#1db34f'
}];
var httpdata = [{
label: 'HTTP',
data: http,
color: '#0000FF'
color: '#0a90d8'
}];
var maildata = [{
label: 'Mail',
data: mail,
color: '#800000'
color: '#f17f49'
}];
var options = {
@@ -62,7 +66,8 @@ $(document).ready(function() {
}
},
lines: {
show: true
show: true,
fill: true
},
points: {
radius: 2,
@@ -77,10 +82,13 @@ $(document).ready(function() {
},
xaxis: {
tickSize: 1,
tickLength: 0
tickLength: 0,
ticks: ticks,
labelAngle: 45
},
yaxis: {
tickColor: '#eee'
tickColor: '#eee',
min: 0
}
};