antvis/G2

图例鼠标移动上去,如何给具体某一图例出现自定义提示 #4956

jwlovelife posted onGitHub

<!-- Thank you for your pull request. Please review below requirements. Bug fixes and new features should include tests and possibly benchmarks. Contributors guide: https://github.com/antvis/g2/blob/master/CONTRIBUTING.md 感谢您贡献代码。请确认下列 checklist 的完成情况。 Bug 修复和新功能必须包含测试,必要时请附上性能测试。 Contributors guide: https://github.com/antvis/g2/blob/master/CONTRIBUTING.md -->

plot.on('legend-item:mouseover', ev => { const target = ev.target; const delegateObject = target.get('delegateObject'); const item = delegateObject.item; // 图例选项 // 如何将获得图例item出现tooltip });

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

  • npm test passes
  • benchmarks are included
  • commit message follows commit guidelines
  • documents are updated
Description of change

<!-- Provide a description of the change below this comment. -->


Fund this Issue

$0.00
Funded

Pull requests