aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2013-10-29 10:10:42 +0100
committerStas Vilchik <vilchiks@gmail.com>2013-10-29 10:10:42 +0100
commit336b4ea25cf4ac0d517903625f86655897b0e56d (patch)
tree46a828559c6032d2c6bbda47ca62d3ecf8946772 /sonar-server
parent86cbb7d1c0ba6bc7de42ba216230f91e23ff1ae1 (diff)
downloadsonarqube-336b4ea25cf4ac0d517903625f86655897b0e56d.tar.gz
sonarqube-336b4ea25cf4ac0d517903625f86655897b0e56d.zip
SONAR-4817 Fix timeline widget for IE8, improve time axis' labels
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/webapp/javascripts/widgets/timeline.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/sonar-server/src/main/webapp/javascripts/widgets/timeline.js b/sonar-server/src/main/webapp/javascripts/widgets/timeline.js
index 5772a0f2380..cc70e097367 100644
--- a/sonar-server/src/main/webapp/javascripts/widgets/timeline.js
+++ b/sonar-server/src/main/webapp/javascripts/widgets/timeline.js
@@ -147,7 +147,14 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
// Configure the axis
this.timeAxis = d3.svg.axis()
.scale(this.time)
- .orient('bottom');
+ .orient('bottom')
+ .tickFormat(function(d) {
+ var format = d.getMonth() === 0 ?
+ d3.time.format('%Y') :
+ d3.time.format('%b');
+
+ return format(d);
+ });
// Configure lines and points