{"action":"created","issue":{"url":"https://api.github.com/repos/CodeYellowBV/chartist-plugin-legend/issues/14","repository_url":"https://api.github.com/repos/CodeYellowBV/chartist-plugin-legend","labels_url":"https://api.github.com/repos/CodeYellowBV/chartist-plugin-legend/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/CodeYellowBV/chartist-plugin-legend/issues/14/comments","events_url":"https://api.github.com/repos/CodeYellowBV/chartist-plugin-legend/issues/14/events","html_url":"https://github.com/CodeYellowBV/chartist-plugin-legend/pull/14","id":141144169,"number":14,"title":"Add click function to options","user":{"login":"hellodavecooper","id":3718738,"avatar_url":"https://avatars.githubusercontent.com/u/3718738?v=3","gravatar_id":"","url":"https://api.github.com/users/hellodavecooper","html_url":"https://github.com/hellodavecooper","followers_url":"https://api.github.com/users/hellodavecooper/followers","following_url":"https://api.github.com/users/hellodavecooper/following{/other_user}","gists_url":"https://api.github.com/users/hellodavecooper/gists{/gist_id}","starred_url":"https://api.github.com/users/hellodavecooper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hellodavecooper/subscriptions","organizations_url":"https://api.github.com/users/hellodavecooper/orgs","repos_url":"https://api.github.com/users/hellodavecooper/repos","events_url":"https://api.github.com/users/hellodavecooper/events{/privacy}","received_events_url":"https://api.github.com/users/hellodavecooper/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-16T01:26:48Z","updated_at":"2016-03-23T12:41:29Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/CodeYellowBV/chartist-plugin-legend/pulls/14","html_url":"https://github.com/CodeYellowBV/chartist-plugin-legend/pull/14","diff_url":"https://github.com/CodeYellowBV/chartist-plugin-legend/pull/14.diff","patch_url":"https://github.com/CodeYellowBV/chartist-plugin-legend/pull/14.patch"},"body":"This PR implements a clickFnc option. This gives the ability to write a custom function that makes other changes to the chart when a legend is clicked (other than just hiding that legend's series). Provides access to the whole chart, and the click event. "},"comment":{"url":"https://api.github.com/repos/CodeYellowBV/chartist-plugin-legend/issues/comments/200330657","html_url":"https://github.com/CodeYellowBV/chartist-plugin-legend/pull/14#issuecomment-200330657","issue_url":"https://api.github.com/repos/CodeYellowBV/chartist-plugin-legend/issues/14","id":200330657,"user":{"login":"SpaceK33z","id":533616,"avatar_url":"https://avatars.githubusercontent.com/u/533616?v=3","gravatar_id":"","url":"https://api.github.com/users/SpaceK33z","html_url":"https://github.com/SpaceK33z","followers_url":"https://api.github.com/users/SpaceK33z/followers","following_url":"https://api.github.com/users/SpaceK33z/following{/other_user}","gists_url":"https://api.github.com/users/SpaceK33z/gists{/gist_id}","starred_url":"https://api.github.com/users/SpaceK33z/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpaceK33z/subscriptions","organizations_url":"https://api.github.com/users/SpaceK33z/orgs","repos_url":"https://api.github.com/users/SpaceK33z/repos","events_url":"https://api.github.com/users/SpaceK33z/events{/privacy}","received_events_url":"https://api.github.com/users/SpaceK33z/received_events","type":"User","site_admin":false},"created_at":"2016-03-23T12:41:29Z","updated_at":"2016-03-23T12:41:29Z","body":"Thanks for the PR!\r\nI think `chartFnc` is a weird name, maybe `onClick` is better? That would make it more clear what it does.\r\nAlso, why do you re-assign to `chart`? You could just modify the `chart` instance in your function."}}