-
G2是支持图例两种选择模式的'single' | 'multiple', |
Beta Was this translation helpful? Give feedback.
Answered by
visiky
Feb 15, 2021
Replies: 1 comment
-
1⃣️ legend 支持单选交互,见: antvis/G2#3289 使用方式 2⃣️ 问题 Q:多折线图,如何在初始化时指定隐藏折线?触发点击legend的隐藏? plot.chart.filter('area', area => area !== '华北') |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
visiky
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
1⃣️ legend 支持单选交互,见: antvis/G2#3289 使用方式
2⃣️ 问题
Q:多折线图,如何在初始化时指定隐藏折线?触发点击legend的隐藏?
A:手动在 plot 渲染之后,调用 g2 chart 的 filter 方法,如下: