{"action":"created","comment":{"url":"https://api.github.com/repos/Addepar/ember-charts/pulls/comments/42325174","id":42325174,"diff_hunk":"@@ -483,9 +483,17 @@ export default ChartComponent.extend(FloatingTooltipMixin,\n     groups.select('path').attr(this.get('sliceAttrs'));\n     \n     var labelWidth = this.get('labelWidth');\n+    var maxLabelWidth = this.get('outerWidth')/2 - this.get('labelPadding');\n     var labelTrimmer = LabelTrimmer.create({\n-      getLabelSize: function() {\n-        return labelWidth;\n+      getLabelSize: function(d, selection) {\n+        var text, xPos;\n+        // Pick the current text element by filtering on data\n+        text = selection.filter(function(data) {\n+          return data === d;\n+        });\n+        // Calculate current horizontal translation from the center\n+        xPos = d3.transform(text.attr(\"transform\")).translate[0];\n+        return Math.max(labelWidth, maxLabelWidth - Math.abs(xPos));","path":"addon/components/pie-chart.js","position":16,"original_position":16,"commit_id":"8e4f0b6f233611bc0fc6204e4f992d53c58e6438","original_commit_id":"8e4f0b6f233611bc0fc6204e4f992d53c58e6438","user":{"login":"embooglement","id":2358927,"avatar_url":"https://avatars.githubusercontent.com/u/2358927?v=3","gravatar_id":"","url":"https://api.github.com/users/embooglement","html_url":"https://github.com/embooglement","followers_url":"https://api.github.com/users/embooglement/followers","following_url":"https://api.github.com/users/embooglement/following{/other_user}","gists_url":"https://api.github.com/users/embooglement/gists{/gist_id}","starred_url":"https://api.github.com/users/embooglement/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/embooglement/subscriptions","organizations_url":"https://api.github.com/users/embooglement/orgs","repos_url":"https://api.github.com/users/embooglement/repos","events_url":"https://api.github.com/users/embooglement/events{/privacy}","received_events_url":"https://api.github.com/users/embooglement/received_events","type":"User","site_admin":false},"body":"I say go for it. ","created_at":"2015-10-18T19:34:25Z","updated_at":"2015-10-18T19:34:25Z","html_url":"https://github.com/Addepar/ember-charts/pull/110#discussion_r42325174","pull_request_url":"https://api.github.com/repos/Addepar/ember-charts/pulls/110","_links":{"self":{"href":"https://api.github.com/repos/Addepar/ember-charts/pulls/comments/42325174"},"html":{"href":"https://github.com/Addepar/ember-charts/pull/110#discussion_r42325174"},"pull_request":{"href":"https://api.github.com/repos/Addepar/ember-charts/pulls/110"}}},"pull_request":{"url":"https://api.github.com/repos/Addepar/ember-charts/pulls/110","id":47998134,"html_url":"https://github.com/Addepar/ember-charts/pull/110","diff_url":"https://github.com/Addepar/ember-charts/pull/110.diff","patch_url":"https://github.com/Addepar/ember-charts/pull/110.patch","issue_url":"https://api.github.com/repos/Addepar/ember-charts/issues/110","number":110,"state":"open","locked":false,"title":"update pie chart legends to better utilize the white space","user":{"login":"akhileshgupta","id":500835,"avatar_url":"https://avatars.githubusercontent.com/u/500835?v=3","gravatar_id":"","url":"https://api.github.com/users/akhileshgupta","html_url":"https://github.com/akhileshgupta","followers_url":"https://api.github.com/users/akhileshgupta/followers","following_url":"https://api.github.com/users/akhileshgupta/following{/other_user}","gists_url":"https://api.github.com/users/akhileshgupta/gists{/gist_id}","starred_url":"https://api.github.com/users/akhileshgupta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akhileshgupta/subscriptions","organizations_url":"https://api.github.com/users/akhileshgupta/orgs","repos_url":"https://api.github.com/users/akhileshgupta/repos","events_url":"https://api.github.com/users/akhileshgupta/events{/privacy}","received_events_url":"https://api.github.com/users/akhileshgupta/received_events","type":"User","site_admin":false},"body":"Calculating the labelWidth based on the label position, allowing more space for the label if it's placed horizontally closer to center of the pie.\r\n\r\n@Addepar/fire @jordansmith42 @embooglement ","created_at":"2015-10-17T23:53:17Z","updated_at":"2015-10-18T19:34:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6759d0f99f0e5470e20b3a8e42e6c9416e31ad3e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Addepar/ember-charts/pulls/110/commits","review_comments_url":"https://api.github.com/repos/Addepar/ember-charts/pulls/110/comments","review_comment_url":"https://api.github.com/repos/Addepar/ember-charts/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Addepar/ember-charts/issues/110/comments","statuses_url":"https://api.github.com/repos/Addepar/ember-charts/statuses/8e4f0b6f233611bc0fc6204e4f992d53c58e6438","head":{"label":"akhileshgupta:fix_pie_legends","ref":"fix_pie_legends","sha":"8e4f0b6f233611bc0fc6204e4f992d53c58e6438","user":{"login":"akhileshgupta","id":500835,"avatar_url":"https://avatars.githubusercontent.com/u/500835?v=3","gravatar_id":"","url":"https://api.github.com/users/akhileshgupta","html_url":"https://github.com/akhileshgupta","followers_url":"https://api.github.com/users/akhileshgupta/followers","following_url":"https://api.github.com/users/akhileshgupta/following{/other_user}","gists_url":"https://api.github.com/users/akhileshgupta/gists{/gist_id}","starred_url":"https://api.github.com/users/akhileshgupta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akhileshgupta/subscriptions","organizations_url":"https://api.github.com/users/akhileshgupta/orgs","repos_url":"https://api.github.com/users/akhileshgupta/repos","events_url":"https://api.github.com/users/akhileshgupta/events{/privacy}","received_events_url":"https://api.github.com/users/akhileshgupta/received_events","type":"User","site_admin":false},"repo":{"id":44458878,"name":"ember-charts","full_name":"akhileshgupta/ember-charts","owner":{"login":"akhileshgupta","id":500835,"avatar_url":"https://avatars.githubusercontent.com/u/500835?v=3","gravatar_id":"","url":"https://api.github.com/users/akhileshgupta","html_url":"https://github.com/akhileshgupta","followers_url":"https://api.github.com/users/akhileshgupta/followers","following_url":"https://api.github.com/users/akhileshgupta/following{/other_user}","gists_url":"https://api.github.com/users/akhileshgupta/gists{/gist_id}","starred_url":"https://api.github.com/users/akhileshgupta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akhileshgupta/subscriptions","organizations_url":"https://api.github.com/users/akhileshgupta/orgs","repos_url":"https://api.github.com/users/akhileshgupta/repos","events_url":"https://api.github.com/users/akhileshgupta/events{/privacy}","received_events_url":"https://api.github.com/users/akhileshgupta/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/akhileshgupta/ember-charts","description":"","fork":true,"url":"https://api.github.com/repos/akhileshgupta/ember-charts","forks_url":"https://api.github.com/repos/akhileshgupta/ember-charts/forks","keys_url":"https://api.github.com/repos/akhileshgupta/ember-charts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akhileshgupta/ember-charts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akhileshgupta/ember-charts/teams","hooks_url":"https://api.github.com/repos/akhileshgupta/ember-charts/hooks","issue_events_url":"https://api.github.com/repos/akhileshgupta/ember-charts/issues/events{/number}","events_url":"https://api.github.com/repos/akhileshgupta/ember-charts/events","assignees_url":"https://api.github.com/repos/akhileshgupta/ember-charts/assignees{/user}","branches_url":"https://api.github.com/repos/akhileshgupta/ember-charts/branches{/branch}","tags_url":"https://api.github.com/repos/akhileshgupta/ember-charts/tags","blobs_url":"https://api.github.com/repos/akhileshgupta/ember-charts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akhileshgupta/ember-charts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akhileshgupta/ember-charts/git/refs{/sha}","trees_url":"https://api.github.com/repos/akhileshgupta/ember-charts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akhileshgupta/ember-charts/statuses/{sha}","languages_url":"https://api.github.com/repos/akhileshgupta/ember-charts/languages","stargazers_url":"https://api.github.com/repos/akhileshgupta/ember-charts/stargazers","contributors_url":"https://api.github.com/repos/akhileshgupta/ember-charts/contributors","subscribers_url":"https://api.github.com/repos/akhileshgupta/ember-charts/subscribers","subscription_url":"https://api.github.com/repos/akhileshgupta/ember-charts/subscription","commits_url":"https://api.github.com/repos/akhileshgupta/ember-charts/commits{/sha}","git_commits_url":"https://api.github.com/repos/akhileshgupta/ember-charts/git/commits{/sha}","comments_url":"https://api.github.com/repos/akhileshgupta/ember-charts/comments{/number}","issue_comment_url":"https://api.github.com/repos/akhileshgupta/ember-charts/issues/comments{/number}","contents_url":"https://api.github.com/repos/akhileshgupta/ember-charts/contents/{+path}","compare_url":"https://api.github.com/repos/akhileshgupta/ember-charts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akhileshgupta/ember-charts/merges","archive_url":"https://api.github.com/repos/akhileshgupta/ember-charts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akhileshgupta/ember-charts/downloads","issues_url":"https://api.github.com/repos/akhileshgupta/ember-charts/issues{/number}","pulls_url":"https://api.github.com/repos/akhileshgupta/ember-charts/pulls{/number}","milestones_url":"https://api.github.com/repos/akhileshgupta/ember-charts/milestones{/number}","notifications_url":"https://api.github.com/repos/akhileshgupta/ember-charts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akhileshgupta/ember-charts/labels{/name}","releases_url":"https://api.github.com/repos/akhileshgupta/ember-charts/releases{/id}","created_at":"2015-10-17T23:48:30Z","updated_at":"2015-10-17T23:48:32Z","pushed_at":"2015-10-18T00:39:26Z","git_url":"git://github.com/akhileshgupta/ember-charts.git","ssh_url":"git@github.com:akhileshgupta/ember-charts.git","clone_url":"https://github.com/akhileshgupta/ember-charts.git","svn_url":"https://github.com/akhileshgupta/ember-charts","homepage":null,"size":8311,"stargazers_count":0,"watchers_count":0,"language":"CoffeeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Addepar:ember-charts-cli","ref":"ember-charts-cli","sha":"13a6c151226f12e8745519b81eef59ea47bd6616","user":{"login":"Addepar","id":847867,"avatar_url":"https://avatars.githubusercontent.com/u/847867?v=3","gravatar_id":"","url":"https://api.github.com/users/Addepar","html_url":"https://github.com/Addepar","followers_url":"https://api.github.com/users/Addepar/followers","following_url":"https://api.github.com/users/Addepar/following{/other_user}","gists_url":"https://api.github.com/users/Addepar/gists{/gist_id}","starred_url":"https://api.github.com/users/Addepar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Addepar/subscriptions","organizations_url":"https://api.github.com/users/Addepar/orgs","repos_url":"https://api.github.com/users/Addepar/repos","events_url":"https://api.github.com/users/Addepar/events{/privacy}","received_events_url":"https://api.github.com/users/Addepar/received_events","type":"Organization","site_admin":false},"repo":{"id":13790555,"name":"ember-charts","full_name":"Addepar/ember-charts","owner":{"login":"Addepar","id":847867,"avatar_url":"https://avatars.githubusercontent.com/u/847867?v=3","gravatar_id":"","url":"https://api.github.com/users/Addepar","html_url":"https://github.com/Addepar","followers_url":"https://api.github.com/users/Addepar/followers","following_url":"https://api.github.com/users/Addepar/following{/other_user}","gists_url":"https://api.github.com/users/Addepar/gists{/gist_id}","starred_url":"https://api.github.com/users/Addepar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Addepar/subscriptions","organizations_url":"https://api.github.com/users/Addepar/orgs","repos_url":"https://api.github.com/users/Addepar/repos","events_url":"https://api.github.com/users/Addepar/events{/privacy}","received_events_url":"https://api.github.com/users/Addepar/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Addepar/ember-charts","description":"","fork":false,"url":"https://api.github.com/repos/Addepar/ember-charts","forks_url":"https://api.github.com/repos/Addepar/ember-charts/forks","keys_url":"https://api.github.com/repos/Addepar/ember-charts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Addepar/ember-charts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Addepar/ember-charts/teams","hooks_url":"https://api.github.com/repos/Addepar/ember-charts/hooks","issue_events_url":"https://api.github.com/repos/Addepar/ember-charts/issues/events{/number}","events_url":"https://api.github.com/repos/Addepar/ember-charts/events","assignees_url":"https://api.github.com/repos/Addepar/ember-charts/assignees{/user}","branches_url":"https://api.github.com/repos/Addepar/ember-charts/branches{/branch}","tags_url":"https://api.github.com/repos/Addepar/ember-charts/tags","blobs_url":"https://api.github.com/repos/Addepar/ember-charts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Addepar/ember-charts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Addepar/ember-charts/git/refs{/sha}","trees_url":"https://api.github.com/repos/Addepar/ember-charts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Addepar/ember-charts/statuses/{sha}","languages_url":"https://api.github.com/repos/Addepar/ember-charts/languages","stargazers_url":"https://api.github.com/repos/Addepar/ember-charts/stargazers","contributors_url":"https://api.github.com/repos/Addepar/ember-charts/contributors","subscribers_url":"https://api.github.com/repos/Addepar/ember-charts/subscribers","subscription_url":"https://api.github.com/repos/Addepar/ember-charts/subscription","commits_url":"https://api.github.com/repos/Addepar/ember-charts/commits{/sha}","git_commits_url":"https://api.github.com/repos/Addepar/ember-charts/git/commits{/sha}","comments_url":"https://api.github.com/repos/Addepar/ember-charts/comments{/number}","issue_comment_url":"https://api.github.com/repos/Addepar/ember-charts/issues/comments{/number}","contents_url":"https://api.github.com/repos/Addepar/ember-charts/contents/{+path}","compare_url":"https://api.github.com/repos/Addepar/ember-charts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Addepar/ember-charts/merges","archive_url":"https://api.github.com/repos/Addepar/ember-charts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Addepar/ember-charts/downloads","issues_url":"https://api.github.com/repos/Addepar/ember-charts/issues{/number}","pulls_url":"https://api.github.com/repos/Addepar/ember-charts/pulls{/number}","milestones_url":"https://api.github.com/repos/Addepar/ember-charts/milestones{/number}","notifications_url":"https://api.github.com/repos/Addepar/ember-charts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Addepar/ember-charts/labels{/name}","releases_url":"https://api.github.com/repos/Addepar/ember-charts/releases{/id}","created_at":"2013-10-23T01:27:05Z","updated_at":"2015-10-17T03:16:53Z","pushed_at":"2015-10-18T00:39:27Z","git_url":"git://github.com/Addepar/ember-charts.git","ssh_url":"git@github.com:Addepar/ember-charts.git","clone_url":"https://github.com/Addepar/ember-charts.git","svn_url":"https://github.com/Addepar/ember-charts","homepage":null,"size":8311,"stargazers_count":646,"watchers_count":646,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":97,"mirror_url":null,"open_issues_count":17,"forks":97,"open_issues":17,"watchers":646,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Addepar/ember-charts/pulls/110"},"html":{"href":"https://github.com/Addepar/ember-charts/pull/110"},"issue":{"href":"https://api.github.com/repos/Addepar/ember-charts/issues/110"},"comments":{"href":"https://api.github.com/repos/Addepar/ember-charts/issues/110/comments"},"review_comments":{"href":"https://api.github.com/repos/Addepar/ember-charts/pulls/110/comments"},"review_comment":{"href":"https://api.github.com/repos/Addepar/ember-charts/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Addepar/ember-charts/pulls/110/commits"},"statuses":{"href":"https://api.github.com/repos/Addepar/ember-charts/statuses/8e4f0b6f233611bc0fc6204e4f992d53c58e6438"}}}}