aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-11-30 13:35:51 +0100
committerStas Vilchik <vilchiks@gmail.com>2015-11-30 13:35:51 +0100
commit4f3aaf4cef100fa7acf4e2fdbbe30377fdf5dfb1 (patch)
tree27e5986636e6485e962255dc007c6b11a1ea9303 /server/sonar-web
parent368ac5fb26d47ec153426185f76191df428207a9 (diff)
downloadsonarqube-4f3aaf4cef100fa7acf4e2fdbbe30377fdf5dfb1.tar.gz
sonarqube-4f3aaf4cef100fa7acf4e2fdbbe30377fdf5dfb1.zip
SONAR-7065 apply feedback
Diffstat (limited to 'server/sonar-web')
-rw-r--r--server/sonar-web/src/main/js/components/charts/bar-chart.js16
1 files changed, 14 insertions, 2 deletions
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 <text key={index} className="bar-chart-tick" x={x} y={y} dy="1.5em">{tick}</text>;
+ let d = this.props.data[index];
+ let tooltipAtts = {};
+ if (d.tooltip) {
+ tooltipAtts['title'] = d.tooltip;
+ tooltipAtts['data-toggle'] = 'tooltip';
+ }
+ return <text key={index} className="bar-chart-tick" x={x} y={y} dy="1.5em" {...tooltipAtts}>{tick}</text>;
});
return <g>{ticks}</g>;
},
@@ -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 <text key={index} className="bar-chart-tick" x={x} y={y} dy="-1em">{value}</text>;
+ let d = this.props.data[index];
+ let tooltipAtts = {};
+ if (d.tooltip) {
+ tooltipAtts['title'] = d.tooltip;
+ tooltipAtts['data-toggle'] = 'tooltip';
+ }
+ return <text key={index} className="bar-chart-tick" x={x} y={y} dy="-1em" {...tooltipAtts}>{value}</text>;
});
return <g>{ticks}</g>;
},