simple tuning of download graphs

This commit is contained in:
hamza zia 2012-12-30 15:54:00 +08:00
parent 3cb36cdee7
commit a3c98a47ae
4 changed files with 174 additions and 174 deletions

View File

@ -36,6 +36,8 @@
.more_info { .more_info {
min-height: 0px; min-height: 0px;
} }
.button_set { .button_set {
float: right; float: right;
margin-bottom: 5px; margin-bottom: 5px;
@ -48,15 +50,10 @@
text-align: center; text-align: center;
margin-bottom: 3px; margin-bottom: 3px;
} }
#active_downloads {
/* min-width: 856px; */
}
.active_graph { .active_graph {
height:300px; width: 80%;
margin-top: 10px; margin-top: 10px;
margin-bottom: 10px; margin-bottom: 10px;
/* min-width: 856px; */
width: 80%;
} }
.download_item { .download_item {
margin-bottom: 10px; margin-bottom: 10px;

File diff suppressed because it is too large Load Diff

View File

@ -11,10 +11,10 @@ plots, you can just fix the size of their placeholders.
*/ */
/* Inline dependency: /* Inline dependency:
* jQuery resize event - v1.1 - 3/14/2010 * jQuery resize event - v1.1 - 3/14/2010
* http://benalman.com/projects/jquery-resize-plugin/ * http://benalman.com/projects/jquery-resize-plugin/
* *
* Copyright (c) 2010 "Cowboy" Ben Alman * Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses. * Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/ * http://benalman.com/about/license/
@ -38,7 +38,7 @@ plots, you can just fix the size of their placeholders.
plot.setupGrid(); plot.setupGrid();
plot.draw(); plot.draw();
} }
function bindEvents(plot, eventHolder) { function bindEvents(plot, eventHolder) {
plot.getPlaceholder().resize(onResize); plot.getPlaceholder().resize(onResize);
} }
@ -46,11 +46,11 @@ plots, you can just fix the size of their placeholders.
function shutdown(plot, eventHolder) { function shutdown(plot, eventHolder) {
plot.getPlaceholder().unbind("resize", onResize); plot.getPlaceholder().unbind("resize", onResize);
} }
plot.hooks.bindEvents.push(bindEvents); plot.hooks.bindEvents.push(bindEvents);
plot.hooks.shutdown.push(shutdown); plot.hooks.shutdown.push(shutdown);
} }
$.plot.plugins.push({ $.plot.plugins.push({
init: init, init: init,
options: options, options: options,

View File

@ -491,7 +491,10 @@ function updateGraph(gid) {
} }
} }
function createGraph(selector) { function createGraph(selector) {
return $.plot(selector, [{ var elem = $(selector);
elem.height(elem.width() / 2);
return $.plot(elem, [{
label: "Download Speed", label: "Download Speed",
data: [], data: [],
color: "#ff0000", color: "#ff0000",