Skip to content

Commit c5371a4

Browse files
committed
Tooltip coordinates corrected
1 parent 81622d5 commit c5371a4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/components/Resources/Bubblechart.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,15 @@ const Bubblechart = (aData) => {
8181
}
8282

8383
function mousemove(event, d) {
84-
const [x, y] = d3.pointer(event);
84+
8585
div
8686
.text(d.data.login + ", " + d.data.contributions)
87-
.style("left", (x + 800) + "px")
88-
.style("top", (y + 200) + "px");
87+
.style("left", (d.x + 150) + "px")
88+
.style("top", (d.y ) + "px")
89+
8990
}
9091

91-
function mouseout() {
92+
function mouseout(d) {
9293
div.style("display", "none");
9394
}
9495

0 commit comments

Comments
 (0)