From 6f53fe94310099647638c7c41a45c8ce04789511 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Wed, 9 Dec 2015 10:13:17 +0100 Subject: [PATCH] fix tooltips on the overview treemap --- server/sonar-web/src/main/js/components/charts/treemap.js | 7 ++++--- 1 file 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}
${node.label.substr(prefixLength)}` : node.label; const onClick = this.props.canBeClicked(node) ? () => this.props.onRectangleClick(node) : null; - return