{"action":"closed","number":1,"pull_request":{"url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/pulls/1","id":26825507,"html_url":"https://github.com/hrbrmstr/metricsgraphics/pull/1","diff_url":"https://github.com/hrbrmstr/metricsgraphics/pull/1.diff","patch_url":"https://github.com/hrbrmstr/metricsgraphics/pull/1.patch","issue_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/issues/1","number":1,"state":"closed","locked":false,"title":"dynamic sizing/resizing behavior","user":{"login":"jjallaire","id":104391,"avatar_url":"https://avatars.githubusercontent.com/u/104391?v=3","gravatar_id":"","url":"https://api.github.com/users/jjallaire","html_url":"https://github.com/jjallaire","followers_url":"https://api.github.com/users/jjallaire/followers","following_url":"https://api.github.com/users/jjallaire/following{/other_user}","gists_url":"https://api.github.com/users/jjallaire/gists{/gist_id}","starred_url":"https://api.github.com/users/jjallaire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjallaire/subscriptions","organizations_url":"https://api.github.com/users/jjallaire/orgs","repos_url":"https://api.github.com/users/jjallaire/repos","events_url":"https://api.github.com/users/jjallaire/events{/privacy}","received_events_url":"https://api.github.com/users/jjallaire/received_events","type":"User","site_admin":false},"body":"This set of changes implements automatic sizing/resizing for metrics graphics widgets. This means that they will always size themselves to the dimensions of their container (e.g. the Viewer pane in RStudio, a standalone browser window, the correct knitr figure size, or the size allocated by metricsgraphicsOutput in Shiny). This is preferable to a hard-coded approach because it removes the burden from the user of writing code to get the size just right for whatever context they are using the widget in (note that users can *always* pass an explicit width and height to override this behavior). The article on widget sizing is worth a read for additional context: http://www.htmlwidgets.org/develop_sizing.html\r\n\r\nNote that one related change is the elimination of the title and description attributes. The problem they cause for metricsgraphics is that they aren't factored into the size of the graph, so when you pass width and height of the container (e.g. knitr figure size) the space allocated to the title is **in addition to** the graph (so the bottom of the graph is clipped off). This could probably be overcome by doing some dynamic DOM text measurement but that's pretty hairy so not attempted here. My view is that the convenience of automatic sizing outweighs the nicety of having a title (and there are other ways to get titles commonly used such as text headers in Rmd or Shiny, slide headers in presentations, etc.)","created_at":"2015-01-05T14:12:24Z","updated_at":"2015-01-05T15:42:08Z","closed_at":"2015-01-05T15:42:08Z","merged_at":"2015-01-05T15:42:08Z","merge_commit_sha":"50a6c4cfe5fb4017f0a4c7f77fc82a60d108eb26","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/pulls/1/commits","review_comments_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/pulls/1/comments","review_comment_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/pulls/comments/{number}","comments_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/issues/1/comments","statuses_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/statuses/d64eff9e80587841f69e955fe18daecb31c92398","head":{"label":"jjallaire:feature/resize-handling","ref":"feature/resize-handling","sha":"d64eff9e80587841f69e955fe18daecb31c92398","user":{"login":"jjallaire","id":104391,"avatar_url":"https://avatars.githubusercontent.com/u/104391?v=3","gravatar_id":"","url":"https://api.github.com/users/jjallaire","html_url":"https://github.com/jjallaire","followers_url":"https://api.github.com/users/jjallaire/followers","following_url":"https://api.github.com/users/jjallaire/following{/other_user}","gists_url":"https://api.github.com/users/jjallaire/gists{/gist_id}","starred_url":"https://api.github.com/users/jjallaire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjallaire/subscriptions","organizations_url":"https://api.github.com/users/jjallaire/orgs","repos_url":"https://api.github.com/users/jjallaire/repos","events_url":"https://api.github.com/users/jjallaire/events{/privacy}","received_events_url":"https://api.github.com/users/jjallaire/received_events","type":"User","site_admin":false},"repo":{"id":28813870,"name":"metricsgraphics-1","full_name":"jjallaire/metricsgraphics-1","owner":{"login":"jjallaire","id":104391,"avatar_url":"https://avatars.githubusercontent.com/u/104391?v=3","gravatar_id":"","url":"https://api.github.com/users/jjallaire","html_url":"https://github.com/jjallaire","followers_url":"https://api.github.com/users/jjallaire/followers","following_url":"https://api.github.com/users/jjallaire/following{/other_user}","gists_url":"https://api.github.com/users/jjallaire/gists{/gist_id}","starred_url":"https://api.github.com/users/jjallaire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjallaire/subscriptions","organizations_url":"https://api.github.com/users/jjallaire/orgs","repos_url":"https://api.github.com/users/jjallaire/repos","events_url":"https://api.github.com/users/jjallaire/events{/privacy}","received_events_url":"https://api.github.com/users/jjallaire/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jjallaire/metricsgraphics-1","description":"An htmlwidget interface to the MetricsGraphics.js D3 chart library","fork":true,"url":"https://api.github.com/repos/jjallaire/metricsgraphics-1","forks_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/forks","keys_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/teams","hooks_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/hooks","issue_events_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/issues/events{/number}","events_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/events","assignees_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/assignees{/user}","branches_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/branches{/branch}","tags_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/tags","blobs_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/statuses/{sha}","languages_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/languages","stargazers_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/stargazers","contributors_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/contributors","subscribers_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/subscribers","subscription_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/subscription","commits_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/issues/comments/{number}","contents_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/contents/{+path}","compare_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/merges","archive_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/downloads","issues_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/issues{/number}","pulls_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/pulls{/number}","milestones_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/milestones{/number}","notifications_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/labels{/name}","releases_url":"https://api.github.com/repos/jjallaire/metricsgraphics-1/releases{/id}","created_at":"2015-01-05T13:34:56Z","updated_at":"2015-01-05T15:39:24Z","pushed_at":"2015-01-05T15:40:23Z","git_url":"git://github.com/jjallaire/metricsgraphics-1.git","ssh_url":"git@github.com:jjallaire/metricsgraphics-1.git","clone_url":"https://github.com/jjallaire/metricsgraphics-1.git","svn_url":"https://github.com/jjallaire/metricsgraphics-1","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"hrbrmstr:master","ref":"master","sha":"db007b86937a4e25dd59cb7b8c0430844964cccf","user":{"login":"hrbrmstr","id":509878,"avatar_url":"https://avatars.githubusercontent.com/u/509878?v=3","gravatar_id":"","url":"https://api.github.com/users/hrbrmstr","html_url":"https://github.com/hrbrmstr","followers_url":"https://api.github.com/users/hrbrmstr/followers","following_url":"https://api.github.com/users/hrbrmstr/following{/other_user}","gists_url":"https://api.github.com/users/hrbrmstr/gists{/gist_id}","starred_url":"https://api.github.com/users/hrbrmstr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hrbrmstr/subscriptions","organizations_url":"https://api.github.com/users/hrbrmstr/orgs","repos_url":"https://api.github.com/users/hrbrmstr/repos","events_url":"https://api.github.com/users/hrbrmstr/events{/privacy}","received_events_url":"https://api.github.com/users/hrbrmstr/received_events","type":"User","site_admin":false},"repo":{"id":28812485,"name":"metricsgraphics","full_name":"hrbrmstr/metricsgraphics","owner":{"login":"hrbrmstr","id":509878,"avatar_url":"https://avatars.githubusercontent.com/u/509878?v=3","gravatar_id":"","url":"https://api.github.com/users/hrbrmstr","html_url":"https://github.com/hrbrmstr","followers_url":"https://api.github.com/users/hrbrmstr/followers","following_url":"https://api.github.com/users/hrbrmstr/following{/other_user}","gists_url":"https://api.github.com/users/hrbrmstr/gists{/gist_id}","starred_url":"https://api.github.com/users/hrbrmstr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hrbrmstr/subscriptions","organizations_url":"https://api.github.com/users/hrbrmstr/orgs","repos_url":"https://api.github.com/users/hrbrmstr/repos","events_url":"https://api.github.com/users/hrbrmstr/events{/privacy}","received_events_url":"https://api.github.com/users/hrbrmstr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hrbrmstr/metricsgraphics","description":"An htmlwidget interface to the MetricsGraphics.js D3 chart library","fork":false,"url":"https://api.github.com/repos/hrbrmstr/metricsgraphics","forks_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/forks","keys_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/teams","hooks_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/hooks","issue_events_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/issues/events{/number}","events_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/events","assignees_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/assignees{/user}","branches_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/branches{/branch}","tags_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/tags","blobs_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/git/refs{/sha}","trees_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/statuses/{sha}","languages_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/languages","stargazers_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/stargazers","contributors_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/contributors","subscribers_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/subscribers","subscription_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/subscription","commits_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/commits{/sha}","git_commits_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/git/commits{/sha}","comments_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/comments{/number}","issue_comment_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/issues/comments/{number}","contents_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/contents/{+path}","compare_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/merges","archive_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/downloads","issues_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/issues{/number}","pulls_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/pulls{/number}","milestones_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/milestones{/number}","notifications_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/labels{/name}","releases_url":"https://api.github.com/repos/hrbrmstr/metricsgraphics/releases{/id}","created_at":"2015-01-05T12:55:35Z","updated_at":"2015-01-05T15:19:25Z","pushed_at":"2015-01-05T15:42:08Z","git_url":"git://github.com/hrbrmstr/metricsgraphics.git","ssh_url":"git@github.com:hrbrmstr/metricsgraphics.git","clone_url":"https://github.com/hrbrmstr/metricsgraphics.git","svn_url":"https://github.com/hrbrmstr/metricsgraphics","homepage":null,"size":0,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hrbrmstr/metricsgraphics/pulls/1"},"html":{"href":"https://github.com/hrbrmstr/metricsgraphics/pull/1"},"issue":{"href":"https://api.github.com/repos/hrbrmstr/metricsgraphics/issues/1"},"comments":{"href":"https://api.github.com/repos/hrbrmstr/metricsgraphics/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/hrbrmstr/metricsgraphics/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/hrbrmstr/metricsgraphics/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/hrbrmstr/metricsgraphics/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/hrbrmstr/metricsgraphics/statuses/d64eff9e80587841f69e955fe18daecb31c92398"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"hrbrmstr","id":509878,"avatar_url":"https://avatars.githubusercontent.com/u/509878?v=3","gravatar_id":"","url":"https://api.github.com/users/hrbrmstr","html_url":"https://github.com/hrbrmstr","followers_url":"https://api.github.com/users/hrbrmstr/followers","following_url":"https://api.github.com/users/hrbrmstr/following{/other_user}","gists_url":"https://api.github.com/users/hrbrmstr/gists{/gist_id}","starred_url":"https://api.github.com/users/hrbrmstr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hrbrmstr/subscriptions","organizations_url":"https://api.github.com/users/hrbrmstr/orgs","repos_url":"https://api.github.com/users/hrbrmstr/repos","events_url":"https://api.github.com/users/hrbrmstr/events{/privacy}","received_events_url":"https://api.github.com/users/hrbrmstr/received_events","type":"User","site_admin":false},"comments":7,"review_comments":0,"commits":4,"additions":53,"deletions":59,"changed_files":7}}