{"action":"created","issue":{"url":"https://api.github.com/repos/kevinkhill/lavacharts/issues/56","labels_url":"https://api.github.com/repos/kevinkhill/lavacharts/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/kevinkhill/lavacharts/issues/56/comments","events_url":"https://api.github.com/repos/kevinkhill/lavacharts/issues/56/events","html_url":"https://github.com/kevinkhill/lavacharts/issues/56","id":90990178,"number":56,"title":"Chart binding label is hard coded in JavascriptFactory.php","user":{"login":"MicahKV","id":13051226,"avatar_url":"https://avatars.githubusercontent.com/u/13051226?v=3","gravatar_id":"","url":"https://api.github.com/users/MicahKV","html_url":"https://github.com/MicahKV","followers_url":"https://api.github.com/users/MicahKV/followers","following_url":"https://api.github.com/users/MicahKV/following{/other_user}","gists_url":"https://api.github.com/users/MicahKV/gists{/gist_id}","starred_url":"https://api.github.com/users/MicahKV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MicahKV/subscriptions","organizations_url":"https://api.github.com/users/MicahKV/orgs","repos_url":"https://api.github.com/users/MicahKV/repos","events_url":"https://api.github.com/users/MicahKV/events{/privacy}","received_events_url":"https://api.github.com/users/MicahKV/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-06-25T15:05:01Z","updated_at":"2015-07-21T03:16:14Z","closed_at":null,"body":"Currently the dashboard only works if you pass the binding label as 'MyPie' in the controller because that label is hard coded in JavascriptFactory.php around line 292:\r\n> $boundChart = $dashboard->getBinding('MyPie')->getChartWrapper()->getChart();\r\n\r\nI'm currently getting around this issue by calling getBindings() and pulling the label from the first result.  I'm sure there's a better way to do this but it works:\r\n> $allBinding = $dashboard->getBindings();\r\n> foreach ($allBinding as $thisBinding)\r\n> {\r\n>     $bindingLabel = $thisBinding->getLabel();\r\n>     break;\r\n> }\r\n> $boundChart = $dashboard->getBinding($bindingLabel)->getChartWrapper()->getChart();\r\n"},"comment":{"url":"https://api.github.com/repos/kevinkhill/lavacharts/issues/comments/123138947","html_url":"https://github.com/kevinkhill/lavacharts/issues/56#issuecomment-123138947","issue_url":"https://api.github.com/repos/kevinkhill/lavacharts/issues/56","id":123138947,"user":{"login":"kevinkhill","id":266076,"avatar_url":"https://avatars.githubusercontent.com/u/266076?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinkhill","html_url":"https://github.com/kevinkhill","followers_url":"https://api.github.com/users/kevinkhill/followers","following_url":"https://api.github.com/users/kevinkhill/following{/other_user}","gists_url":"https://api.github.com/users/kevinkhill/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinkhill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinkhill/subscriptions","organizations_url":"https://api.github.com/users/kevinkhill/orgs","repos_url":"https://api.github.com/users/kevinkhill/repos","events_url":"https://api.github.com/users/kevinkhill/events{/privacy}","received_events_url":"https://api.github.com/users/kevinkhill/received_events","type":"User","site_admin":false},"created_at":"2015-07-21T03:16:14Z","updated_at":"2015-07-21T03:16:14Z","body":"I have been doing a lot of refactoring, in an effort to get the internals in a more logical state. I appreciate your diligence in helping me squash bugs and muddle through errors. I will take a look!"}}