diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2015-12-09 10:13:17 +0100 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2015-12-09 16:29:49 +0100 |
commit | 6f53fe94310099647638c7c41a45c8ce04789511 (patch) | |
tree | 22c83dcd661865c750e458131d114399ac0326e4 /server/sonar-web/src | |
parent | 2d5660a9a61d4074644fed44ff535107e714b6d3 (diff) | |
download | sonarqube-6f53fe94310099647638c7c41a45c8ce04789511.tar.gz sonarqube-6f53fe94310099647638c7c41a45c8ce04789511.zip |
fix tooltips on the overview treemap
Diffstat (limited to 'server/sonar-web/src')
-rw-r--r-- | server/sonar-web/src/main/js/components/charts/treemap.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/server/sonar-web/src/main/js/components/charts/treemap.js b/server/sonar-web/src/main/js/components/charts/treemap.js index 63e974f5995..44d54dd698f 100644 --- a/server/sonar-web/src/main/js/components/charts/treemap.js +++ b/server/sonar-web/src/main/js/components/charts/treemap.js @@ -56,7 +56,7 @@ export const TreemapRect = React.createClass({ if (this.props.tooltip) { tooltipAttrs = { 'data-toggle': 'tooltip', - 'title': this.props.tooltip + 'data-title': this.props.tooltip }; } let cellStyles = { @@ -126,10 +126,11 @@ export const Treemap = React.createClass({ let prefix = mostCommitPrefix(this.props.items.map(item => item.label)); let prefixLength = prefix.length; - let rectangles = nodes.map((node, index) => { + let rectangles = nodes.map(node => { + const key = node.label; let label = prefixLength ? `${prefix}<br>${node.label.substr(prefixLength)}` : node.label; const onClick = this.props.canBeClicked(node) ? () => this.props.onRectangleClick(node) : null; - return <TreemapRect key={index} + return <TreemapRect key={key} x={node.x} y={node.y} width={node.dx} |