diff options
-rw-r--r-- | plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/timeline.html.erb | 6 | ||||
-rw-r--r-- | sonar-server/src/main/webapp/javascripts/widgets/timeline.js | 9 |
2 files changed, 14 insertions, 1 deletions
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/timeline.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/timeline.html.erb index 8156f929343..dae64bfef9d 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/timeline.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/timeline.html.erb @@ -146,11 +146,16 @@ %> +<!--[if lte IE 8 ]> <h3><%= message('widget.unsupported_browser_warning') -%></h3> <![endif]--> + +<!--[if (gt IE 9)|!(IE)]><!--> <% if widget_properties["chartTitle"] %> <h3 style="text-align: center; margin-bottom: 10px"><%= h(widget_properties["chartTitle"]) -%></h3> <% end %> +<!--<![endif]--> +<!--[if (gt IE 9)|!(IE)]><!--> <% unless metric_data_map.values.empty? @@ -188,3 +193,4 @@ end end %> +<!--<![endif]--> 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 |