From: Stas Vilchik Date: Mon, 30 Nov 2015 12:35:51 +0000 (+0100) Subject: SONAR-7065 apply feedback X-Git-Tag: 5.3-RC1~132 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4f3aaf4cef100fa7acf4e2fdbbe30377fdf5dfb1;p=sonarqube.git SONAR-7065 apply feedback --- diff --git a/server/sonar-web/src/main/js/components/charts/bar-chart.js b/server/sonar-web/src/main/js/components/charts/bar-chart.js index 7cd32a52c59..761ae960c65 100644 --- a/server/sonar-web/src/main/js/components/charts/bar-chart.js +++ b/server/sonar-web/src/main/js/components/charts/bar-chart.js @@ -37,7 +37,13 @@ export const BarChart = React.createClass({ let point = this.props.data[index]; let x = Math.round(xScale(point.x) + xScale.rangeBand() / 2 + this.props.barsWidth / 2); let y = yScale.range()[0]; - return {tick}; + let d = this.props.data[index]; + let tooltipAtts = {}; + if (d.tooltip) { + tooltipAtts['title'] = d.tooltip; + tooltipAtts['data-toggle'] = 'tooltip'; + } + return {tick}; }); return {ticks}; }, @@ -50,7 +56,13 @@ export const BarChart = React.createClass({ let point = this.props.data[index]; let x = Math.round(xScale(point.x) + xScale.rangeBand() / 2 + this.props.barsWidth / 2); let y = yScale(point.y); - return {value}; + let d = this.props.data[index]; + let tooltipAtts = {}; + if (d.tooltip) { + tooltipAtts['title'] = d.tooltip; + tooltipAtts['data-toggle'] = 'tooltip'; + } + return {value}; }); return {ticks}; },