{"action":"created","comment":{"url":"https://api.github.com/repos/chartjs/Chart.js/pulls/comments/61078583","id":61078583,"diff_hunk":"@@ -205,7 +205,8 @@ module.exports = function(Chart) {\n \t\t\t\t\t\tunitDefinition = time.units[unitDefinitionIndex];\n \n \t\t\t\t\t\tthis.tickUnit = unitDefinition.name;\n-\t\t\t\t\t\tthis.scaleSizeInUnits = this.lastTick.diff(this.firstTick, this.tickUnit, true);\n+\t\t\t\t\t\tthis.leadingUnitBuffer = this.firstTick.diff(this.firstTick.clone().startOf(this.tickUnit), this.tickUnit, true);\n+\t\t\t\t\t\tthis.scaleSizeInUnits = this.lastTick.diff(this.firstTick, this.tickUnit, true) + (this.leadingUnitBuffer > 0 ? 2 : 0);","path":"src/scales/scale.time.js","position":6,"original_position":6,"commit_id":"da90e2f670a8ea2c07033013917597a439f52489","original_commit_id":"da90e2f670a8ea2c07033013917597a439f52489","user":{"login":"etimberg","id":6757853,"avatar_url":"https://avatars.githubusercontent.com/u/6757853?v=3","gravatar_id":"","url":"https://api.github.com/users/etimberg","html_url":"https://github.com/etimberg","followers_url":"https://api.github.com/users/etimberg/followers","following_url":"https://api.github.com/users/etimberg/following{/other_user}","gists_url":"https://api.github.com/users/etimberg/gists{/gist_id}","starred_url":"https://api.github.com/users/etimberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etimberg/subscriptions","organizations_url":"https://api.github.com/users/etimberg/orgs","repos_url":"https://api.github.com/users/etimberg/repos","events_url":"https://api.github.com/users/etimberg/events{/privacy}","received_events_url":"https://api.github.com/users/etimberg/received_events","type":"User","site_admin":false},"body":"is 2 always the right number in this case? I was thinking about this more and I think it could introduce the possibility of having 1 to many ticks in certain cases","created_at":"2016-04-26T12:48:06Z","updated_at":"2016-04-26T12:48:06Z","html_url":"https://github.com/chartjs/Chart.js/pull/2371#discussion_r61078583","pull_request_url":"https://api.github.com/repos/chartjs/Chart.js/pulls/2371","_links":{"self":{"href":"https://api.github.com/repos/chartjs/Chart.js/pulls/comments/61078583"},"html":{"href":"https://github.com/chartjs/Chart.js/pull/2371#discussion_r61078583"},"pull_request":{"href":"https://api.github.com/repos/chartjs/Chart.js/pulls/2371"}}},"pull_request":{"url":"https://api.github.com/repos/chartjs/Chart.js/pulls/2371","id":67801275,"html_url":"https://github.com/chartjs/Chart.js/pull/2371","diff_url":"https://github.com/chartjs/Chart.js/pull/2371.diff","patch_url":"https://github.com/chartjs/Chart.js/pull/2371.patch","issue_url":"https://api.github.com/repos/chartjs/Chart.js/issues/2371","number":2371,"state":"open","locked":false,"title":"Time scale now compensates for rounded tick units","user":{"login":"tannerlinsley","id":5580297,"avatar_url":"https://avatars.githubusercontent.com/u/5580297?v=3","gravatar_id":"","url":"https://api.github.com/users/tannerlinsley","html_url":"https://github.com/tannerlinsley","followers_url":"https://api.github.com/users/tannerlinsley/followers","following_url":"https://api.github.com/users/tannerlinsley/following{/other_user}","gists_url":"https://api.github.com/users/tannerlinsley/gists{/gist_id}","starred_url":"https://api.github.com/users/tannerlinsley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tannerlinsley/subscriptions","organizations_url":"https://api.github.com/users/tannerlinsley/orgs","repos_url":"https://api.github.com/users/tannerlinsley/repos","events_url":"https://api.github.com/users/tannerlinsley/events{/privacy}","received_events_url":"https://api.github.com/users/tannerlinsley/received_events","type":"User","site_admin":false},"body":"Closes #2277","created_at":"2016-04-25T22:48:57Z","updated_at":"2016-04-26T12:48:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cae00cf53f1cb44a50b49a55f8e6fb537f1abd0d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/chartjs/Chart.js/pulls/2371/commits","review_comments_url":"https://api.github.com/repos/chartjs/Chart.js/pulls/2371/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/2371/comments","statuses_url":"https://api.github.com/repos/chartjs/Chart.js/statuses/da90e2f670a8ea2c07033013917597a439f52489","head":{"label":"chartjs:fix-time-scale-cutoff-bug","ref":"fix-time-scale-cutoff-bug","sha":"da90e2f670a8ea2c07033013917597a439f52489","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-04-26T12:47:53Z","pushed_at":"2016-04-26T10:48:27Z","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":8753,"stargazers_count":20220,"watchers_count":20220,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":6051,"mirror_url":null,"open_issues_count":206,"forks":6051,"open_issues":206,"watchers":20220,"default_branch":"master"}},"base":{"label":"chartjs:master","ref":"master","sha":"b28f8d2fb1acdc68f2eb42dbce96dff81069acb9","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-04-26T12:47:53Z","pushed_at":"2016-04-26T10:48:27Z","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":8753,"stargazers_count":20220,"watchers_count":20220,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":6051,"mirror_url":null,"open_issues_count":206,"forks":6051,"open_issues":206,"watchers":20220,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/chartjs/Chart.js/pulls/2371"},"html":{"href":"https://github.com/chartjs/Chart.js/pull/2371"},"issue":{"href":"https://api.github.com/repos/chartjs/Chart.js/issues/2371"},"comments":{"href":"https://api.github.com/repos/chartjs/Chart.js/issues/2371/comments"},"review_comments":{"href":"https://api.github.com/repos/chartjs/Chart.js/pulls/2371/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/2371/commits"},"statuses":{"href":"https://api.github.com/repos/chartjs/Chart.js/statuses/da90e2f670a8ea2c07033013917597a439f52489"}}}}