G2 icon indicating copy to clipboard operation
G2 copied to clipboard

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

Open xiangchunyu opened this issue 3 years ago • 1 comments

  • [ ] 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 -

xiangchunyu avatar Jul 15 '22 03:07 xiangchunyu

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

hustcc avatar Sep 13 '22 02:09 hustcc