{"action":"created","issue":{"url":"https://api.github.com/repos/jhudson8/react-chartjs/issues/28","labels_url":"https://api.github.com/repos/jhudson8/react-chartjs/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/jhudson8/react-chartjs/issues/28/comments","events_url":"https://api.github.com/repos/jhudson8/react-chartjs/issues/28/events","html_url":"https://github.com/jhudson8/react-chartjs/issues/28","id":87417475,"number":28,"title":"Calling getBarsAtEvent fails","user":{"login":"sbowman","id":47979,"avatar_url":"https://avatars.githubusercontent.com/u/47979?v=3","gravatar_id":"","url":"https://api.github.com/users/sbowman","html_url":"https://github.com/sbowman","followers_url":"https://api.github.com/users/sbowman/followers","following_url":"https://api.github.com/users/sbowman/following{/other_user}","gists_url":"https://api.github.com/users/sbowman/gists{/gist_id}","starred_url":"https://api.github.com/users/sbowman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbowman/subscriptions","organizations_url":"https://api.github.com/users/sbowman/orgs","repos_url":"https://api.github.com/users/sbowman/repos","events_url":"https://api.github.com/users/sbowman/events{/privacy}","received_events_url":"https://api.github.com/users/sbowman/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-11T17:11:44Z","updated_at":"2015-07-13T18:09:00Z","closed_at":"2015-07-13T18:08:43Z","body":"Whenever I try to call getBarsAtEvent, I get the error:  \"Uncaught TypeError: Cannot read property 'apply' of undefined\".  \r\n\r\nI've got this JSX:\r\n\r\n```\r\n<ReactChart.Bar ref=\"placementsGraph\" name=\"test\" data={chartData} options={this.chartOptions} className=\"placements-chart\" onClick={this.chartClicked}/>\r\n```\r\n\r\nIn my chartClicked method, I call:\r\n\r\n```javascript\r\nchartClicked: function(event) {\r\n  console.log('Clicked!', this.refs.placementsGraph.getBarsAtEvent(event));\r\n}\r\n```\r\n\r\nAccording to the error, this bit of code in core.js is failing:\r\n\r\n```javascript\r\nfunction extra(type) {\r\n  classData[type] = function() {\r\n    this.state.chart[name].apply(this.state.chart, arguments);\r\n  };\r\n}\r\n```\r\n\r\nI put a few debug messages in there, and \"name\" is blank, so this.state.chart[name] is undefined.  What exactly is this bit of code trying to do?  "},"comment":{"url":"https://api.github.com/repos/jhudson8/react-chartjs/issues/comments/121009417","html_url":"https://github.com/jhudson8/react-chartjs/issues/28#issuecomment-121009417","issue_url":"https://api.github.com/repos/jhudson8/react-chartjs/issues/28","id":121009417,"user":{"login":"joshhornby","id":5455767,"avatar_url":"https://avatars.githubusercontent.com/u/5455767?v=3","gravatar_id":"","url":"https://api.github.com/users/joshhornby","html_url":"https://github.com/joshhornby","followers_url":"https://api.github.com/users/joshhornby/followers","following_url":"https://api.github.com/users/joshhornby/following{/other_user}","gists_url":"https://api.github.com/users/joshhornby/gists{/gist_id}","starred_url":"https://api.github.com/users/joshhornby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshhornby/subscriptions","organizations_url":"https://api.github.com/users/joshhornby/orgs","repos_url":"https://api.github.com/users/joshhornby/repos","events_url":"https://api.github.com/users/joshhornby/events{/privacy}","received_events_url":"https://api.github.com/users/joshhornby/received_events","type":"User","site_admin":false},"created_at":"2015-07-13T18:09:00Z","updated_at":"2015-07-13T18:09:00Z","body":"@sbowman That seems the only way to get the function yes."}}