Skip to content

[v5] 鼠标 hover 到标签上时,无法显示 tooltip #5005

Answered by hustcc
visiky asked this question in Q&A
Discussion options

You must be logged in to vote

可以将 label 的事件禁用,不响应事件。

.label({
  text: 'value',
  position: 'inside',
  formatter: (v) => (v ? `${v}%` : ''),
  transform: [{ type: 'overlapDodgeY' }],
  style: {
    fill: '#000',
    fontSize: 10,
    pointerEvents: 'none',  // 👈🏻,不响应事件即可
  },
});

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by hustcc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants
Converted from issue

This discussion was converted from issue #4757 on May 11, 2023 06:42.