diff --git a/website/awfy.js b/website/awfy.js index d1ee5cc..7192129 100644 --- a/website/awfy.js +++ b/website/awfy.js @@ -53,7 +53,6 @@ AWFY.compute = function (xhr) { direction: blobgraph.direction, aggregate: blobgraph.aggregate, timelist: blobgraph.timelist, - timemap: blobgraph.timemap, earliest: blobgraph.earliest, info: blobgraph.lines }; diff --git a/website/frontpage.js b/website/frontpage.js index c4aee09..94b46ff 100644 --- a/website/frontpage.js +++ b/website/frontpage.js @@ -108,9 +108,26 @@ Display.prototype.draw = function () { options.borderColor = "#BEBEBE"; options.legend = { show: false }; options.xaxis = { }; - options.yaxis = { min: 0 }; + options.yaxis = { }; options.grid = { hoverable: true, clickable: true }; + // Aggregate view starts from 0. We space things out when zooming in. + if (this.graph.aggregate) + options.yaxis.min = 0; + + if (this.graph.direction == 1) { + options.yaxis.transform = function (v) { + return -v; + }; + options.yaxis.inverseTransform = function (v) { + return -v; + }; + } else { + options.yaxis.tickFormatter = function (v, axis) { + return v + 'ms'; + }; + } + if (this.historical) { // If the graph has both historical and recent points, indicated by // the "historical" midpoint, then we change some graph formatting @@ -146,19 +163,6 @@ Display.prototype.draw = function () { this.plot = $.plot(this.elt, this.graph.lines, options); } -// Display.prototype.checkHoverDelta(pos) { -// if (!this.lastPos) -// return false; -// if (pos.pageX - this.lastPos.pageX >= 0 && -// pos.pageX - this.lastPos.pageX <= 5 && -// pos.pageY - this.lastPos.pageY >= 0 && -// pos.pageY - this.lastPos.pageY <= 5) -// { -// return true; -// } -// return false; -// } - Display.prototype.createToolTip = function (item, extended) { var so = extended ? '' : ''; var sc = extended ? '' : ''; diff --git a/website/tooltip.js b/website/tooltip.js index b6e2f59..4853141 100644 --- a/website/tooltip.js +++ b/website/tooltip.js @@ -79,7 +79,7 @@ ToolTip.prototype.onDrag = function (event, ui) { return; this.line.setAttribute('x2', this.midpoint().x); this.line.setAttribute('y2', this.midpoint().y); - this.svg.height($('body').height()); + this.svg.height($('window').height()); } ToolTip.prototype.attachLine = function (color) { @@ -102,7 +102,7 @@ ToolTip.prototype.attachLine = function (color) { line.setAttribute('stroke-width', 2); $(line).appendTo(svg); - svg.height($('body').height()); + svg.height($('window').height()); svg.appendTo('body'); this.svg = svg; this.line = line;