antvis/G2

4.x items如何使用html自定义图例名称 #4041

xiangchunyu posted onGitHub

  • I have searched the issues of this repository and believe that this is not a duplicate.

需求是想在图例名称后面加个小图标 给这个小图标绑定事件,3.x可使用itemTpl 写html自定义图例名称 4.x 的items应该怎么写呀,看了好久文档没看懂,求指教

Environment Info
g2 4.2.5
System -
Browser -

<!-- generated by antv-issue-helper. DO NOT REMOVE -->


4.x 中去除了 html 类型的图例,对于这类需求,建议是图表外部,使用 react/vue 外置写一个图例,灵活性和美观、兼容、维护性上都会好非常多。

posted by hustcc over 2 years ago

Fund this Issue

$0.00
Funded

Pull requests