Skip to content

Commit

Permalink
Sankey Tooltip fix (#1748) (#1750)
Browse files Browse the repository at this point in the history
.layer{X,Y} gives viewport offset, moved to node offset using .offset{X,Y}
  • Loading branch information
ddol authored Dec 3, 2016
1 parent 09d597f commit b045075
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions superset/assets/visualizations/sankey.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ function sankeyVis(slice) {
.html(function () { return getTooltipHtml(d); })
.transition()
.duration(200)
.style('left', (d3.event.layerX + 10) + 'px')
.style('top', (d3.event.layerY + 10) + 'px')
.style('left', (d3.event.offsetX + 10) + 'px')
.style('top', (d3.event.offsetY + 10) + 'px')
.style('opacity', 0.95);
}

Expand Down

0 comments on commit b045075

Please sign in to comment.