{"action":"closed","issue":{"url":"https://api.github.com/repos/alibaba/BizCharts/issues/577","repository_url":"https://api.github.com/repos/alibaba/BizCharts","labels_url":"https://api.github.com/repos/alibaba/BizCharts/issues/577/labels{/name}","comments_url":"https://api.github.com/repos/alibaba/BizCharts/issues/577/comments","events_url":"https://api.github.com/repos/alibaba/BizCharts/issues/577/events","html_url":"https://github.com/alibaba/BizCharts/issues/577","id":372413050,"node_id":"MDU6SXNzdWUzNzI0MTMwNTA=","number":577,"title":"对于分组柱状图怎么定义Legend的点击事件？","user":{"login":"ht1131589588","id":24310479,"node_id":"MDQ6VXNlcjI0MzEwNDc5","avatar_url":"https://avatars3.githubusercontent.com/u/24310479?v=4","gravatar_id":"","url":"https://api.github.com/users/ht1131589588","html_url":"https://github.com/ht1131589588","followers_url":"https://api.github.com/users/ht1131589588/followers","following_url":"https://api.github.com/users/ht1131589588/following{/other_user}","gists_url":"https://api.github.com/users/ht1131589588/gists{/gist_id}","starred_url":"https://api.github.com/users/ht1131589588/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ht1131589588/subscriptions","organizations_url":"https://api.github.com/users/ht1131589588/orgs","repos_url":"https://api.github.com/users/ht1131589588/repos","events_url":"https://api.github.com/users/ht1131589588/events{/privacy}","received_events_url":"https://api.github.com/users/ht1131589588/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-22T07:00:28Z","updated_at":"2018-10-29T11:47:53Z","closed_at":"2018-10-29T11:47:52Z","author_association":"NONE","body":"- bizcharts Version:3.2.2\r\n- Platform or react version:16.5.1\r\n- Mini Showcase(like screenshots):\r\n- CodePen Link:\r\n- you can fork CodePen template form this: https://codepen.io/leslie2014/pen/xjJGER\r\n```\r\n<Legend marker={'circle'}\r\n        custom={true}\r\n        items={LegendItems}\r\n        onClick={ ev => {\r\n              const item = ev.item;\r\n              const value = item.value;\r\n              const checked = ev.checked;\r\n              const geoms = chartIns.getAllGeoms();\r\n              for (let i = 0; i < geoms.length; i++) {\r\n                    const geom = geoms[i];\r\n                    if (geom.getYScale().field === value ) {\r\n                           if (checked) {\r\n                                 geom.show();\r\n                           } else {\r\n                                 geom.hide();\r\n                           }\r\n                    }\r\n              }\r\n        }}\r\n     />\r\n```\r\n效果图如下\r\n![123](https://user-images.githubusercontent.com/24310479/47280835-db2d5b80-d60a-11e8-8379-2dab8b1bd9e1.png)\r\n"}}
{"actor":{"display_login":"weepy3641"}}