From 0f8f3e9a7dd44b1347cbc5cd414db3927b79d1e5 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Tue, 21 Jan 2014 16:33:00 +0600 Subject: [PATCH] Pie chart: fix hover issue --- .../src/main/webapp/javascripts/widgets/pie-chart.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 ac56ab7bce4..ca8f3a3d116 100644 --- a/sonar-server/src/main/webapp/javascripts/widgets/pie-chart.js +++ b/sonar-server/src/main/webapp/javascripts/widgets/pie-chart.js @@ -124,7 +124,8 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets; this._detailsHeight = this._lineHeight * this._metricsCount; this.detailsWrap = this.gWrap.append('g') - .attr('width', this.legendWidth()); + .attr('width', this.legendWidth()) + .style('display', 'none'); this.detailsColorIndicator = this.detailsWrap.append('rect') .classed('details-color-indicator', true) @@ -270,6 +271,9 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets; widget.detailsColorIndicator .style('opacity', 1) .style('fill', widget.color(i)); + + widget.detailsWrap + .style('display', 'block'); } widget.donutLabel .style('opacity', 1) @@ -298,6 +302,8 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets; .classed('hover', false); sector. classed('hover', false); + widget.detailsWrap + .style('display', 'none'); }, clickHandler = function(d) { -- 2.39.5