From 89ed7ca079f1db2c362fbee7fcd835995d68a46d Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Fri, 9 Sep 2011 10:13:48 +0200 Subject: SONAR-2074 Improve Timeline widget style - Apply same event style as for the stack area chart - Fix bug in event display (displays too many events) --- sonar-server/src/main/webapp/javascripts/protovis-sonar.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'sonar-server') diff --git a/sonar-server/src/main/webapp/javascripts/protovis-sonar.js b/sonar-server/src/main/webapp/javascripts/protovis-sonar.js index f80836031b5..2ae43a256a5 100755 --- a/sonar-server/src/main/webapp/javascripts/protovis-sonar.js +++ b/sonar-server/src/main/webapp/javascripts/protovis-sonar.js @@ -302,7 +302,7 @@ SonarWidgets.Timeline.prototype.render = function() { .height(h) .left(20) .right(20) - .bottom(20) + .bottom(30) .top(5) .strokeStyle("#CCC"); @@ -310,8 +310,8 @@ SonarWidgets.Timeline.prototype.render = function() { vis.add(pv.Rule) .data(x.ticks()) .left(x) - .bottom(-5) - .height(5) + .bottom(-10) + .height(10) .anchor("bottom") .add(pv.Label) .text(x.tickFormat); @@ -361,8 +361,9 @@ SonarWidgets.Timeline.prototype.render = function() { .bottom(0) .anchor("top") .add(pv.Dot) - .bottom(6) + .bottom(-6) .shape("triangle") + .angle(pv.radians(180)) .strokeStyle("grey") .fillStyle(function(e) {return e.sid == snapshots[idx].sid ? eventHoverColor : eventColor;}) .add(pv.Dot) @@ -382,7 +383,8 @@ SonarWidgets.Timeline.prototype.render = function() { /* An invisible bar to capture events (without flickering). */ vis.add(pv.Bar) .fillStyle("rgba(0,0,0,.001)") - .width(w+10) + .width(w+30) + .height(h+30) .event("mouseout", function() { i = -1; return vis; -- cgit v1.2.3