summaryrefslogtreecommitdiffstats
path: root/sonar-server/src
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2014-01-09 12:25:29 +0600
committerStas Vilchik <vilchiks@gmail.com>2014-01-09 12:25:29 +0600
commit4ddba193c9188acab4bfe236eb4b4f423982132a (patch)
treec8a39cb2853494ec0b52f3a6548d1aca0729b475 /sonar-server/src
parent7e4bcae950ed536cfedcd6d813f8e7139a3261e9 (diff)
downloadsonarqube-4ddba193c9188acab4bfe236eb4b4f423982132a.tar.gz
sonarqube-4ddba193c9188acab4bfe236eb4b4f423982132a.zip
Labels of axis on pie and bubbles
Diffstat (limited to 'sonar-server/src')
-rw-r--r--sonar-server/src/main/webapp/javascripts/widgets/bubble-chart.js4
-rw-r--r--sonar-server/src/main/webapp/javascripts/widgets/pie-chart.js12
2 files changed, 9 insertions, 7 deletions
diff --git a/sonar-server/src/main/webapp/javascripts/widgets/bubble-chart.js b/sonar-server/src/main/webapp/javascripts/widgets/bubble-chart.js
index 0299e8930c6..861d09a3616 100644
--- a/sonar-server/src/main/webapp/javascripts/widgets/bubble-chart.js
+++ b/sonar-server/src/main/webapp/javascripts/widgets/bubble-chart.js
@@ -228,7 +228,7 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
.orient('bottom');
this.gxAxisLabel = this.gxAxis.append('text')
- .text(this.metrics().x)
+ .text(this.metrics()[this.xMetric].name)
.style('font-weight', 'bold')
.style('text-anchor', 'middle');
@@ -241,7 +241,7 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
this.gyAxis.attr('transform', trans(60 - this.margin().left, 0));
this.gyAxisLabel = this.gyAxis.append('text')
- .text(this.metrics().y)
+ .text(this.metrics()[this.yMetric].name)
.style('font-weight', 'bold')
.style('text-anchor', 'middle');
diff --git a/sonar-server/src/main/webapp/javascripts/widgets/pie-chart.js b/sonar-server/src/main/webapp/javascripts/widgets/pie-chart.js
index d1556b52752..4c625a87f0d 100644
--- a/sonar-server/src/main/webapp/javascripts/widgets/pie-chart.js
+++ b/sonar-server/src/main/webapp/javascripts/widgets/pie-chart.js
@@ -146,7 +146,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
this.donutLabel2 = this.plotWrap.append('text')
.style('text-anchor', 'middle')
- .style('opacity', 0)
.text(this.metrics()[this.mainMetric].name);
@@ -248,8 +247,8 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
this.donutLabel2
.transition()
- .style('font-size', (this.radius / 10) + 'px')
- .attr('transform', trans(0, this.radius / 6));
+ .attr('transform', trans(0, widget.radius / 20))
+ .style('font-size', (this.radius / 10) + 'px');
// Configure events
@@ -277,7 +276,9 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
widget.donutLabel
.style('opacity', 1);
widget.donutLabel2
- .style('opacity', 1);
+ .transition()
+ .attr('dy', '0')
+ .attr('transform', trans(0, widget.radius / 6));
widget.plotWrap
.classed('hover', true);
sector.
@@ -297,7 +298,8 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
.style('opacity', 0)
.text('');
widget.donutLabel2
- .style('opacity', 0);
+ .transition()
+ .attr('transform', trans(0, widget.radius / 20));
widget.plotWrap
.classed('hover', false);
sector.