{"action":"created","comment":{"url":"https://api.github.com/repos/teambox/PNChart/pulls/comments/28136745","id":28136745,"diff_hunk":"@@ -124,7 +124,8 @@ - (UILabel *)descriptionLabelForItemAtIndex:(NSUInteger)index{\n     UILabel *descriptionLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 100, 60)];\n     NSString *titleText = currentDataItem.textDescription;\n     \n-    NSMutableAttributedString* attributedTitleText = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@\"%.0f%%\\n\",currentDataItem.value/ _total * 100] attributes:@{NSForegroundColorAttributeName:currentDataItem.color,NSFontAttributeName:_fontForDetailItemNumber}];\n+    int normalizedValue = (_total == 0 ? 0 : currentDataItem.value/ _total) * 100;","path":"PNChart/PNPieChart.m","position":5,"original_position":5,"commit_id":"c5733c52b33e0b18461c2121b0bebaca3d373bc2","original_commit_id":"c5733c52b33e0b18461c2121b0bebaca3d373bc2","user":{"login":"mariabernis","id":9168044,"avatar_url":"https://avatars.githubusercontent.com/u/9168044?v=3","gravatar_id":"","url":"https://api.github.com/users/mariabernis","html_url":"https://github.com/mariabernis","followers_url":"https://api.github.com/users/mariabernis/followers","following_url":"https://api.github.com/users/mariabernis/following{/other_user}","gists_url":"https://api.github.com/users/mariabernis/gists{/gist_id}","starred_url":"https://api.github.com/users/mariabernis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mariabernis/subscriptions","organizations_url":"https://api.github.com/users/mariabernis/orgs","repos_url":"https://api.github.com/users/mariabernis/repos","events_url":"https://api.github.com/users/mariabernis/events{/privacy}","received_events_url":"https://api.github.com/users/mariabernis/received_events","type":"User","site_admin":false},"body":"I wouldn't set the % to 0% when there is no value. I would print sth like \"- %\" or  another text to indicate \"empty state\". Maybe ask design or PO? ","created_at":"2015-04-10T11:03:27Z","updated_at":"2015-04-10T11:03:27Z","html_url":"https://github.com/teambox/PNChart/pull/3#discussion_r28136745","pull_request_url":"https://api.github.com/repos/teambox/PNChart/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/teambox/PNChart/pulls/comments/28136745"},"html":{"href":"https://github.com/teambox/PNChart/pull/3#discussion_r28136745"},"pull_request":{"href":"https://api.github.com/repos/teambox/PNChart/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/teambox/PNChart/pulls/3","id":33036862,"html_url":"https://github.com/teambox/PNChart/pull/3","diff_url":"https://github.com/teambox/PNChart/pull/3.diff","patch_url":"https://github.com/teambox/PNChart/pull/3.patch","issue_url":"https://api.github.com/repos/teambox/PNChart/issues/3","number":3,"state":"open","locked":false,"title":"Fix NANs in pie chart","user":{"login":"isaacroldan","id":3757193,"avatar_url":"https://avatars.githubusercontent.com/u/3757193?v=3","gravatar_id":"","url":"https://api.github.com/users/isaacroldan","html_url":"https://github.com/isaacroldan","followers_url":"https://api.github.com/users/isaacroldan/followers","following_url":"https://api.github.com/users/isaacroldan/following{/other_user}","gists_url":"https://api.github.com/users/isaacroldan/gists{/gist_id}","starred_url":"https://api.github.com/users/isaacroldan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isaacroldan/subscriptions","organizations_url":"https://api.github.com/users/isaacroldan/orgs","repos_url":"https://api.github.com/users/isaacroldan/repos","events_url":"https://api.github.com/users/isaacroldan/events{/privacy}","received_events_url":"https://api.github.com/users/isaacroldan/received_events","type":"User","site_admin":false},"body":"#### :tophat: What? Why?\r\nDon't divide by 0!\r\n\r\n#### :dart: What should QA test?\r\n\r\n\r\n#### :pushpin: Related tasks?\r\n\r\n\r\n#### :clipboard: Developer checklist\r\n- [ ] Unit Tests (if necessary)\r\n- [ ] UI Snapshot Tests (if necessary)\r\n- [ ] Added accessibility tags to any interactive element\r\n- [ ] Added reporting for GA (events + screen views) / Errors / Exceptions\r\n- [ ] Documentation\r\n\r\n#### :ghost: GIF\r\n![](http://media.tumblr.com/tumblr_m50kwsZJG81qewk6no1_400.gif)","created_at":"2015-04-10T10:57:04Z","updated_at":"2015-04-10T11:03:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d4012f1e16b0339e93fb70179c8796a0aac64bd4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/teambox/PNChart/pulls/3/commits","review_comments_url":"https://api.github.com/repos/teambox/PNChart/pulls/3/comments","review_comment_url":"https://api.github.com/repos/teambox/PNChart/pulls/comments{/number}","comments_url":"https://api.github.com/repos/teambox/PNChart/issues/3/comments","statuses_url":"https://api.github.com/repos/teambox/PNChart/statuses/c5733c52b33e0b18461c2121b0bebaca3d373bc2","head":{"label":"teambox:bug/fixNANSinPieChart","ref":"bug/fixNANSinPieChart","sha":"c5733c52b33e0b18461c2121b0bebaca3d373bc2","user":{"login":"teambox","id":46344,"avatar_url":"https://avatars.githubusercontent.com/u/46344?v=3","gravatar_id":"","url":"https://api.github.com/users/teambox","html_url":"https://github.com/teambox","followers_url":"https://api.github.com/users/teambox/followers","following_url":"https://api.github.com/users/teambox/following{/other_user}","gists_url":"https://api.github.com/users/teambox/gists{/gist_id}","starred_url":"https://api.github.com/users/teambox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teambox/subscriptions","organizations_url":"https://api.github.com/users/teambox/orgs","repos_url":"https://api.github.com/users/teambox/repos","events_url":"https://api.github.com/users/teambox/events{/privacy}","received_events_url":"https://api.github.com/users/teambox/received_events","type":"Organization","site_admin":false},"repo":{"id":29480331,"name":"PNChart","full_name":"teambox/PNChart","owner":{"login":"teambox","id":46344,"avatar_url":"https://avatars.githubusercontent.com/u/46344?v=3","gravatar_id":"","url":"https://api.github.com/users/teambox","html_url":"https://github.com/teambox","followers_url":"https://api.github.com/users/teambox/followers","following_url":"https://api.github.com/users/teambox/following{/other_user}","gists_url":"https://api.github.com/users/teambox/gists{/gist_id}","starred_url":"https://api.github.com/users/teambox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teambox/subscriptions","organizations_url":"https://api.github.com/users/teambox/orgs","repos_url":"https://api.github.com/users/teambox/repos","events_url":"https://api.github.com/users/teambox/events{/privacy}","received_events_url":"https://api.github.com/users/teambox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/teambox/PNChart","description":"A simple and beautiful chart lib used in Piner and CoinsMan for iOS","fork":true,"url":"https://api.github.com/repos/teambox/PNChart","forks_url":"https://api.github.com/repos/teambox/PNChart/forks","keys_url":"https://api.github.com/repos/teambox/PNChart/keys{/key_id}","collaborators_url":"https://api.github.com/repos/teambox/PNChart/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/teambox/PNChart/teams","hooks_url":"https://api.github.com/repos/teambox/PNChart/hooks","issue_events_url":"https://api.github.com/repos/teambox/PNChart/issues/events{/number}","events_url":"https://api.github.com/repos/teambox/PNChart/events","assignees_url":"https://api.github.com/repos/teambox/PNChart/assignees{/user}","branches_url":"https://api.github.com/repos/teambox/PNChart/branches{/branch}","tags_url":"https://api.github.com/repos/teambox/PNChart/tags","blobs_url":"https://api.github.com/repos/teambox/PNChart/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/teambox/PNChart/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/teambox/PNChart/git/refs{/sha}","trees_url":"https://api.github.com/repos/teambox/PNChart/git/trees{/sha}","statuses_url":"https://api.github.com/repos/teambox/PNChart/statuses/{sha}","languages_url":"https://api.github.com/repos/teambox/PNChart/languages","stargazers_url":"https://api.github.com/repos/teambox/PNChart/stargazers","contributors_url":"https://api.github.com/repos/teambox/PNChart/contributors","subscribers_url":"https://api.github.com/repos/teambox/PNChart/subscribers","subscription_url":"https://api.github.com/repos/teambox/PNChart/subscription","commits_url":"https://api.github.com/repos/teambox/PNChart/commits{/sha}","git_commits_url":"https://api.github.com/repos/teambox/PNChart/git/commits{/sha}","comments_url":"https://api.github.com/repos/teambox/PNChart/comments{/number}","issue_comment_url":"https://api.github.com/repos/teambox/PNChart/issues/comments{/number}","contents_url":"https://api.github.com/repos/teambox/PNChart/contents/{+path}","compare_url":"https://api.github.com/repos/teambox/PNChart/compare/{base}...{head}","merges_url":"https://api.github.com/repos/teambox/PNChart/merges","archive_url":"https://api.github.com/repos/teambox/PNChart/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/teambox/PNChart/downloads","issues_url":"https://api.github.com/repos/teambox/PNChart/issues{/number}","pulls_url":"https://api.github.com/repos/teambox/PNChart/pulls{/number}","milestones_url":"https://api.github.com/repos/teambox/PNChart/milestones{/number}","notifications_url":"https://api.github.com/repos/teambox/PNChart/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/teambox/PNChart/labels{/name}","releases_url":"https://api.github.com/repos/teambox/PNChart/releases{/id}","created_at":"2015-01-19T16:36:28Z","updated_at":"2015-02-18T14:07:55Z","pushed_at":"2015-04-10T10:57:05Z","git_url":"git://github.com/teambox/PNChart.git","ssh_url":"git@github.com:teambox/PNChart.git","clone_url":"https://github.com/teambox/PNChart.git","svn_url":"https://github.com/teambox/PNChart","homepage":"","size":554,"stargazers_count":2,"watchers_count":2,"language":"Objective-C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"teambox:master","ref":"master","sha":"4a7ad00ef8c303c751c79ecd65d5629ede80959a","user":{"login":"teambox","id":46344,"avatar_url":"https://avatars.githubusercontent.com/u/46344?v=3","gravatar_id":"","url":"https://api.github.com/users/teambox","html_url":"https://github.com/teambox","followers_url":"https://api.github.com/users/teambox/followers","following_url":"https://api.github.com/users/teambox/following{/other_user}","gists_url":"https://api.github.com/users/teambox/gists{/gist_id}","starred_url":"https://api.github.com/users/teambox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teambox/subscriptions","organizations_url":"https://api.github.com/users/teambox/orgs","repos_url":"https://api.github.com/users/teambox/repos","events_url":"https://api.github.com/users/teambox/events{/privacy}","received_events_url":"https://api.github.com/users/teambox/received_events","type":"Organization","site_admin":false},"repo":{"id":29480331,"name":"PNChart","full_name":"teambox/PNChart","owner":{"login":"teambox","id":46344,"avatar_url":"https://avatars.githubusercontent.com/u/46344?v=3","gravatar_id":"","url":"https://api.github.com/users/teambox","html_url":"https://github.com/teambox","followers_url":"https://api.github.com/users/teambox/followers","following_url":"https://api.github.com/users/teambox/following{/other_user}","gists_url":"https://api.github.com/users/teambox/gists{/gist_id}","starred_url":"https://api.github.com/users/teambox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teambox/subscriptions","organizations_url":"https://api.github.com/users/teambox/orgs","repos_url":"https://api.github.com/users/teambox/repos","events_url":"https://api.github.com/users/teambox/events{/privacy}","received_events_url":"https://api.github.com/users/teambox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/teambox/PNChart","description":"A simple and beautiful chart lib used in Piner and CoinsMan for iOS","fork":true,"url":"https://api.github.com/repos/teambox/PNChart","forks_url":"https://api.github.com/repos/teambox/PNChart/forks","keys_url":"https://api.github.com/repos/teambox/PNChart/keys{/key_id}","collaborators_url":"https://api.github.com/repos/teambox/PNChart/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/teambox/PNChart/teams","hooks_url":"https://api.github.com/repos/teambox/PNChart/hooks","issue_events_url":"https://api.github.com/repos/teambox/PNChart/issues/events{/number}","events_url":"https://api.github.com/repos/teambox/PNChart/events","assignees_url":"https://api.github.com/repos/teambox/PNChart/assignees{/user}","branches_url":"https://api.github.com/repos/teambox/PNChart/branches{/branch}","tags_url":"https://api.github.com/repos/teambox/PNChart/tags","blobs_url":"https://api.github.com/repos/teambox/PNChart/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/teambox/PNChart/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/teambox/PNChart/git/refs{/sha}","trees_url":"https://api.github.com/repos/teambox/PNChart/git/trees{/sha}","statuses_url":"https://api.github.com/repos/teambox/PNChart/statuses/{sha}","languages_url":"https://api.github.com/repos/teambox/PNChart/languages","stargazers_url":"https://api.github.com/repos/teambox/PNChart/stargazers","contributors_url":"https://api.github.com/repos/teambox/PNChart/contributors","subscribers_url":"https://api.github.com/repos/teambox/PNChart/subscribers","subscription_url":"https://api.github.com/repos/teambox/PNChart/subscription","commits_url":"https://api.github.com/repos/teambox/PNChart/commits{/sha}","git_commits_url":"https://api.github.com/repos/teambox/PNChart/git/commits{/sha}","comments_url":"https://api.github.com/repos/teambox/PNChart/comments{/number}","issue_comment_url":"https://api.github.com/repos/teambox/PNChart/issues/comments{/number}","contents_url":"https://api.github.com/repos/teambox/PNChart/contents/{+path}","compare_url":"https://api.github.com/repos/teambox/PNChart/compare/{base}...{head}","merges_url":"https://api.github.com/repos/teambox/PNChart/merges","archive_url":"https://api.github.com/repos/teambox/PNChart/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/teambox/PNChart/downloads","issues_url":"https://api.github.com/repos/teambox/PNChart/issues{/number}","pulls_url":"https://api.github.com/repos/teambox/PNChart/pulls{/number}","milestones_url":"https://api.github.com/repos/teambox/PNChart/milestones{/number}","notifications_url":"https://api.github.com/repos/teambox/PNChart/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/teambox/PNChart/labels{/name}","releases_url":"https://api.github.com/repos/teambox/PNChart/releases{/id}","created_at":"2015-01-19T16:36:28Z","updated_at":"2015-02-18T14:07:55Z","pushed_at":"2015-04-10T10:57:05Z","git_url":"git://github.com/teambox/PNChart.git","ssh_url":"git@github.com:teambox/PNChart.git","clone_url":"https://github.com/teambox/PNChart.git","svn_url":"https://github.com/teambox/PNChart","homepage":"","size":554,"stargazers_count":2,"watchers_count":2,"language":"Objective-C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/teambox/PNChart/pulls/3"},"html":{"href":"https://github.com/teambox/PNChart/pull/3"},"issue":{"href":"https://api.github.com/repos/teambox/PNChart/issues/3"},"comments":{"href":"https://api.github.com/repos/teambox/PNChart/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/teambox/PNChart/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/teambox/PNChart/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/teambox/PNChart/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/teambox/PNChart/statuses/c5733c52b33e0b18461c2121b0bebaca3d373bc2"}}}}