aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorFabrice Bellingard <bellingard@gmail.com>2011-09-08 18:41:52 +0200
committerFabrice Bellingard <bellingard@gmail.com>2011-09-08 18:45:31 +0200
commit070b2dd35a49fbf4a6bd22bd7426c49e437b4a8b (patch)
tree6e070c267321b952b230495d22fa4fc9a12b2d36 /sonar-server
parentce536435e52aeb824849965710b0e5c2e1df9d46 (diff)
downloadsonarqube-070b2dd35a49fbf4a6bd22bd7426c49e437b4a8b.tar.gz
sonarqube-070b2dd35a49fbf4a6bd22bd7426c49e437b4a8b.zip
SONAR-2200 Improve text positioning and colors
This is required to be able to read the values even when the mouse is close to the borders
Diffstat (limited to 'sonar-server')
-rwxr-xr-xsonar-server/src/main/webapp/javascripts/protovis-sonar.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/sonar-server/src/main/webapp/javascripts/protovis-sonar.js b/sonar-server/src/main/webapp/javascripts/protovis-sonar.js
index 41321cceac0..f80836031b5 100755
--- a/sonar-server/src/main/webapp/javascripts/protovis-sonar.js
+++ b/sonar-server/src/main/webapp/javascripts/protovis-sonar.js
@@ -124,11 +124,11 @@ SonarWidgets.StackArea.prototype.render = function() {
.extend(area)
.fillStyle(null)
.strokeStyle(null)
- .anchor(function() {return idx == 0 ? "left" : (idx == idx_numbers-1 ? "right" : "center");})
+ .anchor(function() {return (idx == idx_numbers-1 || vis.mouse().x > w*4/5) ? "right" : (vis.mouse().x < w/5 ? "left" : "center");})
.add(pv.Label)
.visible(function(d) {return this.index == idx && d.y != 0;})
.font(function(d) { return Math.round(5 + Math.sqrt(y(d.y))) + "px sans-serif";})
- .textStyle("#FFF")
+ .textStyle("#DDD")
.text(function(d) {return metrics[this.parent.index] + ": " + d.y;});
/* The total cost of the selected dot in the header. */