Skip to content

Commit

Permalink
feat: add tooltip data to tooltip event callback (#6529)
Browse files Browse the repository at this point in the history
Co-authored-by: anhaohui.ahh <[email protected]>
  • Loading branch information
moayuisuda and anhaohui.ahh authored Dec 10, 2024
1 parent 71fd89d commit c04318f
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 c04318f

Please sign in to comment.