Skip to content

Commit

Permalink
feat: add tooltip data to tooltip event callback
Browse files Browse the repository at this point in the history
  • Loading branch information
anhaohui.ahh committed Dec 6, 2024
1 parent 69c44a3 commit 7f20967
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/interaction/tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -872,6 +872,7 @@ export function seriesTooltip(
...event,
nativeEvent: true,
data: {
...tooltipData,
data: { x: invert(scale.x, transformedX, true) },
},
});
Expand Down Expand Up @@ -1095,6 +1096,7 @@ export function tooltip(
...event,
nativeEvent: true,
data: {
...data,
data: dataOf(element, view),
},
});
Expand Down

0 comments on commit 7f20967

Please sign in to comment.