{"action":"created","comment":{"url":"https://api.github.com/repos/chartjs/Chart.js/pulls/comments/86967766","pull_request_review_id":7597850,"id":86967766,"diff_hunk":"@@ -159,21 +166,27 @@ module.exports = function(Chart) {\n \t\t},\n \n \t\tcalculateBarWidth: function(ruler) {\n-\t\t\tvar xScale = this.getScaleForId(this.getMeta().xAxisID);\n+\t\t\tvar me = this;\n+\t\t\tvar meta = me.getMeta();\n+\t\t\tvar xScale = me.getScaleForId(meta.xAxisID);\n \t\t\tif (xScale.options.barThickness) {\n \t\t\t\treturn xScale.options.barThickness;\n \t\t\t}\n-\t\t\treturn xScale.options.stacked ? ruler.categoryWidth : ruler.barWidth;\n+\t\t\treturn (xScale.options.stacked && meta.stack === undefined) ? ruler.categoryWidth : ruler.barWidth;","path":"src/controllers/controller.bar.js","position":56,"original_position":56,"commit_id":"f3a7ba7d71d574486479d8254237b8ebb6b72658","original_commit_id":"f3a7ba7d71d574486479d8254237b8ebb6b72658","user":{"login":"potatopeelings","id":300494,"avatar_url":"https://avatars.githubusercontent.com/u/300494?v=3","gravatar_id":"","url":"https://api.github.com/users/potatopeelings","html_url":"https://github.com/potatopeelings","followers_url":"https://api.github.com/users/potatopeelings/followers","following_url":"https://api.github.com/users/potatopeelings/following{/other_user}","gists_url":"https://api.github.com/users/potatopeelings/gists{/gist_id}","starred_url":"https://api.github.com/users/potatopeelings/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/potatopeelings/subscriptions","organizations_url":"https://api.github.com/users/potatopeelings/orgs","repos_url":"https://api.github.com/users/potatopeelings/repos","events_url":"https://api.github.com/users/potatopeelings/events{/privacy}","received_events_url":"https://api.github.com/users/potatopeelings/received_events","type":"User","site_admin":false},"body":"That `&& meta.stack === undefined` was to retain the existing behaviour for (non-grouped) stacked bar widths - which are currently independent of barPercentage (and depend only on categoryPercentage). \r\n\r\nI think it would be consistent to have non grouped stacked bar widths proportional to categoryPercentage AND barPercentage. If it's ok to change to make this change, I can remove `meta.stack === undefined` from `getBarCount` and remove the entire `(xScale.options.stacked && meta.stack === undefined) ? ruler.categoryWidth : ` part from here (i.e. just use ruler.barWidth which I believe is already correctly calculated)","created_at":"2016-11-08T11:09:52Z","updated_at":"2016-11-08T11:09:52Z","html_url":"https://github.com/chartjs/Chart.js/pull/3563#discussion_r86967766","pull_request_url":"https://api.github.com/repos/chartjs/Chart.js/pulls/3563","_links":{"self":{"href":"https://api.github.com/repos/chartjs/Chart.js/pulls/comments/86967766"},"html":{"href":"https://github.com/chartjs/Chart.js/pull/3563#discussion_r86967766"},"pull_request":{"href":"https://api.github.com/repos/chartjs/Chart.js/pulls/3563"}}},"pull_request":{"url":"https://api.github.com/repos/chartjs/Chart.js/pulls/3563","id":92582914,"html_url":"https://github.com/chartjs/Chart.js/pull/3563","diff_url":"https://github.com/chartjs/Chart.js/pull/3563.diff","patch_url":"https://github.com/chartjs/Chart.js/pull/3563.patch","issue_url":"https://api.github.com/repos/chartjs/Chart.js/issues/3563","number":3563,"state":"open","locked":false,"title":"Group stacked bar charts (#2643)","user":{"login":"potatopeelings","id":300494,"avatar_url":"https://avatars.githubusercontent.com/u/300494?v=3","gravatar_id":"","url":"https://api.github.com/users/potatopeelings","html_url":"https://github.com/potatopeelings","followers_url":"https://api.github.com/users/potatopeelings/followers","following_url":"https://api.github.com/users/potatopeelings/following{/other_user}","gists_url":"https://api.github.com/users/potatopeelings/gists{/gist_id}","starred_url":"https://api.github.com/users/potatopeelings/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/potatopeelings/subscriptions","organizations_url":"https://api.github.com/users/potatopeelings/orgs","repos_url":"https://api.github.com/users/potatopeelings/repos","events_url":"https://api.github.com/users/potatopeelings/events{/privacy}","received_events_url":"https://api.github.com/users/potatopeelings/received_events","type":"User","site_admin":false},"body":"Code changes, documentation update and sample for #2643.\r\n\r\nJSFiddle: https://jsfiddle.net/Lvj2qnrp/1/\r\n(same as samples/bar/bar-stacked-group.html)","created_at":"2016-11-07T13:28:39Z","updated_at":"2016-11-08T11:09:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"326ac7963855a3ff1c8edf8cddf6537aca9ec97a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/chartjs/Chart.js/pulls/3563/commits","review_comments_url":"https://api.github.com/repos/chartjs/Chart.js/pulls/3563/comments","review_comment_url":"https://api.github.com/repos/chartjs/Chart.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/chartjs/Chart.js/issues/3563/comments","statuses_url":"https://api.github.com/repos/chartjs/Chart.js/statuses/f3a7ba7d71d574486479d8254237b8ebb6b72658","head":{"label":"potatopeelings:master","ref":"master","sha":"f3a7ba7d71d574486479d8254237b8ebb6b72658","user":{"login":"potatopeelings","id":300494,"avatar_url":"https://avatars.githubusercontent.com/u/300494?v=3","gravatar_id":"","url":"https://api.github.com/users/potatopeelings","html_url":"https://github.com/potatopeelings","followers_url":"https://api.github.com/users/potatopeelings/followers","following_url":"https://api.github.com/users/potatopeelings/following{/other_user}","gists_url":"https://api.github.com/users/potatopeelings/gists{/gist_id}","starred_url":"https://api.github.com/users/potatopeelings/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/potatopeelings/subscriptions","organizations_url":"https://api.github.com/users/potatopeelings/orgs","repos_url":"https://api.github.com/users/potatopeelings/repos","events_url":"https://api.github.com/users/potatopeelings/events{/privacy}","received_events_url":"https://api.github.com/users/potatopeelings/received_events","type":"User","site_admin":false},"repo":{"id":73077006,"name":"Chart.js","full_name":"potatopeelings/Chart.js","owner":{"login":"potatopeelings","id":300494,"avatar_url":"https://avatars.githubusercontent.com/u/300494?v=3","gravatar_id":"","url":"https://api.github.com/users/potatopeelings","html_url":"https://github.com/potatopeelings","followers_url":"https://api.github.com/users/potatopeelings/followers","following_url":"https://api.github.com/users/potatopeelings/following{/other_user}","gists_url":"https://api.github.com/users/potatopeelings/gists{/gist_id}","starred_url":"https://api.github.com/users/potatopeelings/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/potatopeelings/subscriptions","organizations_url":"https://api.github.com/users/potatopeelings/orgs","repos_url":"https://api.github.com/users/potatopeelings/repos","events_url":"https://api.github.com/users/potatopeelings/events{/privacy}","received_events_url":"https://api.github.com/users/potatopeelings/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/potatopeelings/Chart.js","description":"Simple HTML5 Charts using the <canvas> tag","fork":true,"url":"https://api.github.com/repos/potatopeelings/Chart.js","forks_url":"https://api.github.com/repos/potatopeelings/Chart.js/forks","keys_url":"https://api.github.com/repos/potatopeelings/Chart.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/potatopeelings/Chart.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/potatopeelings/Chart.js/teams","hooks_url":"https://api.github.com/repos/potatopeelings/Chart.js/hooks","issue_events_url":"https://api.github.com/repos/potatopeelings/Chart.js/issues/events{/number}","events_url":"https://api.github.com/repos/potatopeelings/Chart.js/events","assignees_url":"https://api.github.com/repos/potatopeelings/Chart.js/assignees{/user}","branches_url":"https://api.github.com/repos/potatopeelings/Chart.js/branches{/branch}","tags_url":"https://api.github.com/repos/potatopeelings/Chart.js/tags","blobs_url":"https://api.github.com/repos/potatopeelings/Chart.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/potatopeelings/Chart.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/potatopeelings/Chart.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/potatopeelings/Chart.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/potatopeelings/Chart.js/statuses/{sha}","languages_url":"https://api.github.com/repos/potatopeelings/Chart.js/languages","stargazers_url":"https://api.github.com/repos/potatopeelings/Chart.js/stargazers","contributors_url":"https://api.github.com/repos/potatopeelings/Chart.js/contributors","subscribers_url":"https://api.github.com/repos/potatopeelings/Chart.js/subscribers","subscription_url":"https://api.github.com/repos/potatopeelings/Chart.js/subscription","commits_url":"https://api.github.com/repos/potatopeelings/Chart.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/potatopeelings/Chart.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/potatopeelings/Chart.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/potatopeelings/Chart.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/potatopeelings/Chart.js/contents/{+path}","compare_url":"https://api.github.com/repos/potatopeelings/Chart.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/potatopeelings/Chart.js/merges","archive_url":"https://api.github.com/repos/potatopeelings/Chart.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/potatopeelings/Chart.js/downloads","issues_url":"https://api.github.com/repos/potatopeelings/Chart.js/issues{/number}","pulls_url":"https://api.github.com/repos/potatopeelings/Chart.js/pulls{/number}","milestones_url":"https://api.github.com/repos/potatopeelings/Chart.js/milestones{/number}","notifications_url":"https://api.github.com/repos/potatopeelings/Chart.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/potatopeelings/Chart.js/labels{/name}","releases_url":"https://api.github.com/repos/potatopeelings/Chart.js/releases{/id}","deployments_url":"https://api.github.com/repos/potatopeelings/Chart.js/deployments","created_at":"2016-11-07T12:38:46Z","updated_at":"2016-11-07T12:38:50Z","pushed_at":"2016-11-07T13:21:43Z","git_url":"git://github.com/potatopeelings/Chart.js.git","ssh_url":"git@github.com:potatopeelings/Chart.js.git","clone_url":"https://github.com/potatopeelings/Chart.js.git","svn_url":"https://github.com/potatopeelings/Chart.js","homepage":"http://www.chartjs.org/","size":7217,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"chartjs:master","ref":"master","sha":"040b0e160da689505e92e056fe4776095804adb1","user":{"login":"chartjs","id":10342521,"avatar_url":"https://avatars.githubusercontent.com/u/10342521?v=3","gravatar_id":"","url":"https://api.github.com/users/chartjs","html_url":"https://github.com/chartjs","followers_url":"https://api.github.com/users/chartjs/followers","following_url":"https://api.github.com/users/chartjs/following{/other_user}","gists_url":"https://api.github.com/users/chartjs/gists{/gist_id}","starred_url":"https://api.github.com/users/chartjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chartjs/subscriptions","organizations_url":"https://api.github.com/users/chartjs/orgs","repos_url":"https://api.github.com/users/chartjs/repos","events_url":"https://api.github.com/users/chartjs/events{/privacy}","received_events_url":"https://api.github.com/users/chartjs/received_events","type":"Organization","site_admin":false},"repo":{"id":8843683,"name":"Chart.js","full_name":"chartjs/Chart.js","owner":{"login":"chartjs","id":10342521,"avatar_url":"https://avatars.githubusercontent.com/u/10342521?v=3","gravatar_id":"","url":"https://api.github.com/users/chartjs","html_url":"https://github.com/chartjs","followers_url":"https://api.github.com/users/chartjs/followers","following_url":"https://api.github.com/users/chartjs/following{/other_user}","gists_url":"https://api.github.com/users/chartjs/gists{/gist_id}","starred_url":"https://api.github.com/users/chartjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chartjs/subscriptions","organizations_url":"https://api.github.com/users/chartjs/orgs","repos_url":"https://api.github.com/users/chartjs/repos","events_url":"https://api.github.com/users/chartjs/events{/privacy}","received_events_url":"https://api.github.com/users/chartjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/chartjs/Chart.js","description":"Simple HTML5 Charts using the <canvas> tag","fork":false,"url":"https://api.github.com/repos/chartjs/Chart.js","forks_url":"https://api.github.com/repos/chartjs/Chart.js/forks","keys_url":"https://api.github.com/repos/chartjs/Chart.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chartjs/Chart.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chartjs/Chart.js/teams","hooks_url":"https://api.github.com/repos/chartjs/Chart.js/hooks","issue_events_url":"https://api.github.com/repos/chartjs/Chart.js/issues/events{/number}","events_url":"https://api.github.com/repos/chartjs/Chart.js/events","assignees_url":"https://api.github.com/repos/chartjs/Chart.js/assignees{/user}","branches_url":"https://api.github.com/repos/chartjs/Chart.js/branches{/branch}","tags_url":"https://api.github.com/repos/chartjs/Chart.js/tags","blobs_url":"https://api.github.com/repos/chartjs/Chart.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chartjs/Chart.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chartjs/Chart.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/chartjs/Chart.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chartjs/Chart.js/statuses/{sha}","languages_url":"https://api.github.com/repos/chartjs/Chart.js/languages","stargazers_url":"https://api.github.com/repos/chartjs/Chart.js/stargazers","contributors_url":"https://api.github.com/repos/chartjs/Chart.js/contributors","subscribers_url":"https://api.github.com/repos/chartjs/Chart.js/subscribers","subscription_url":"https://api.github.com/repos/chartjs/Chart.js/subscription","commits_url":"https://api.github.com/repos/chartjs/Chart.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/chartjs/Chart.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/chartjs/Chart.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/chartjs/Chart.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/chartjs/Chart.js/contents/{+path}","compare_url":"https://api.github.com/repos/chartjs/Chart.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chartjs/Chart.js/merges","archive_url":"https://api.github.com/repos/chartjs/Chart.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chartjs/Chart.js/downloads","issues_url":"https://api.github.com/repos/chartjs/Chart.js/issues{/number}","pulls_url":"https://api.github.com/repos/chartjs/Chart.js/pulls{/number}","milestones_url":"https://api.github.com/repos/chartjs/Chart.js/milestones{/number}","notifications_url":"https://api.github.com/repos/chartjs/Chart.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chartjs/Chart.js/labels{/name}","releases_url":"https://api.github.com/repos/chartjs/Chart.js/releases{/id}","deployments_url":"https://api.github.com/repos/chartjs/Chart.js/deployments","created_at":"2013-03-17T23:56:36Z","updated_at":"2016-11-08T10:30:20Z","pushed_at":"2016-11-08T04:58:03Z","git_url":"git://github.com/chartjs/Chart.js.git","ssh_url":"git@github.com:chartjs/Chart.js.git","clone_url":"https://github.com/chartjs/Chart.js.git","svn_url":"https://github.com/chartjs/Chart.js","homepage":"http://www.chartjs.org/","size":12060,"stargazers_count":26107,"watchers_count":26107,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":7068,"mirror_url":null,"open_issues_count":238,"forks":7068,"open_issues":238,"watchers":26107,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/chartjs/Chart.js/pulls/3563"},"html":{"href":"https://github.com/chartjs/Chart.js/pull/3563"},"issue":{"href":"https://api.github.com/repos/chartjs/Chart.js/issues/3563"},"comments":{"href":"https://api.github.com/repos/chartjs/Chart.js/issues/3563/comments"},"review_comments":{"href":"https://api.github.com/repos/chartjs/Chart.js/pulls/3563/comments"},"review_comment":{"href":"https://api.github.com/repos/chartjs/Chart.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/chartjs/Chart.js/pulls/3563/commits"},"statuses":{"href":"https://api.github.com/repos/chartjs/Chart.js/statuses/f3a7ba7d71d574486479d8254237b8ebb6b72658"}}}}
{"actor":{"display_login":"potatopeelings"}}