{"action":"opened","number":416,"pull_request":{"url":"https://api.github.com/repos/ropensci/plotly/pulls/416","id":56697236,"html_url":"https://github.com/ropensci/plotly/pull/416","diff_url":"https://github.com/ropensci/plotly/pull/416.diff","patch_url":"https://github.com/ropensci/plotly/pull/416.patch","issue_url":"https://api.github.com/repos/ropensci/plotly/issues/416","number":416,"state":"open","locked":false,"title":"Send 'plotly_click' and 'plotly_selected' events to shiny when in shinyMode","user":{"login":"cpsievert","id":1365941,"avatar_url":"https://avatars.githubusercontent.com/u/1365941?v=3","gravatar_id":"","url":"https://api.github.com/users/cpsievert","html_url":"https://github.com/cpsievert","followers_url":"https://api.github.com/users/cpsievert/followers","following_url":"https://api.github.com/users/cpsievert/following{/other_user}","gists_url":"https://api.github.com/users/cpsievert/gists{/gist_id}","starred_url":"https://api.github.com/users/cpsievert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpsievert/subscriptions","organizations_url":"https://api.github.com/users/cpsievert/orgs","repos_url":"https://api.github.com/users/cpsievert/repos","events_url":"https://api.github.com/users/cpsievert/events{/privacy}","received_events_url":"https://api.github.com/users/cpsievert/received_events","type":"User","site_admin":false},"body":"@chriddyp @jp @cldougl\r\n\r\nI talked to @jcheng5 today. He suggested that we don't yet rely on crosstalk, as it's still very experimental, and may never be officially supported.\r\n\r\nLater I realized that, in #312, crosstalk is only used to send plotly event data to the shiny server. It turns out that isn't super hard to implement using shiny alone, so I've done that here.\r\n\r\n[Here](http://104.131.111.111:3838/plotlyEvents/) is a barebones example ([source](https://github.com/ropensci/plotly/blob/feature/transmit/inst/examples/events/app.R))\r\n\r\nTo see how the interface for accessing plotly user event data has changed for those older examples, see https://github.com/cpsievert/shiny_apps/commit/5633b6ebca4e8f4e141b405d5fec2cc5a011a8c8 (ignore the inline stuff, cc @pssguy)\r\n\r\nA few things left to sort through:\r\n  1. In the basic example above, notice that if you select point(s), then double click to unselect, the selection doesn't clear in the linked views. @etpinard, if possible, a 'plotly_doubleClick' event would be a _huge_ help here!\r\n  2. Do we want to support 'plotly_hover'? If so, that probably means we should clear the selection on 'plotly_unhover', but I imagine this quickly leads to glitchy behavior when hovering over a bunch of points.\r\n  3. Should we provide an option to _not_ send plotly user selections to shiny?\r\n\r\n","created_at":"2016-01-21T02:23:56Z","updated_at":"2016-01-21T02:23:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ropensci/plotly/pulls/416/commits","review_comments_url":"https://api.github.com/repos/ropensci/plotly/pulls/416/comments","review_comment_url":"https://api.github.com/repos/ropensci/plotly/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ropensci/plotly/issues/416/comments","statuses_url":"https://api.github.com/repos/ropensci/plotly/statuses/34a8af79dab2da57565842eb1ee3c6bdca1a0845","head":{"label":"ropensci:feature/transmit","ref":"feature/transmit","sha":"34a8af79dab2da57565842eb1ee3c6bdca1a0845","user":{"login":"ropensci","id":1200269,"avatar_url":"https://avatars.githubusercontent.com/u/1200269?v=3","gravatar_id":"","url":"https://api.github.com/users/ropensci","html_url":"https://github.com/ropensci","followers_url":"https://api.github.com/users/ropensci/followers","following_url":"https://api.github.com/users/ropensci/following{/other_user}","gists_url":"https://api.github.com/users/ropensci/gists{/gist_id}","starred_url":"https://api.github.com/users/ropensci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ropensci/subscriptions","organizations_url":"https://api.github.com/users/ropensci/orgs","repos_url":"https://api.github.com/users/ropensci/repos","events_url":"https://api.github.com/users/ropensci/events{/privacy}","received_events_url":"https://api.github.com/users/ropensci/received_events","type":"Organization","site_admin":false},"repo":{"id":14579179,"name":"plotly","full_name":"ropensci/plotly","owner":{"login":"ropensci","id":1200269,"avatar_url":"https://avatars.githubusercontent.com/u/1200269?v=3","gravatar_id":"","url":"https://api.github.com/users/ropensci","html_url":"https://github.com/ropensci","followers_url":"https://api.github.com/users/ropensci/followers","following_url":"https://api.github.com/users/ropensci/following{/other_user}","gists_url":"https://api.github.com/users/ropensci/gists{/gist_id}","starred_url":"https://api.github.com/users/ropensci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ropensci/subscriptions","organizations_url":"https://api.github.com/users/ropensci/orgs","repos_url":"https://api.github.com/users/ropensci/repos","events_url":"https://api.github.com/users/ropensci/events{/privacy}","received_events_url":"https://api.github.com/users/ropensci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ropensci/plotly","description":"Create interactive web graphics from R via plotly's JavaScript graphing library","fork":false,"url":"https://api.github.com/repos/ropensci/plotly","forks_url":"https://api.github.com/repos/ropensci/plotly/forks","keys_url":"https://api.github.com/repos/ropensci/plotly/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ropensci/plotly/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ropensci/plotly/teams","hooks_url":"https://api.github.com/repos/ropensci/plotly/hooks","issue_events_url":"https://api.github.com/repos/ropensci/plotly/issues/events{/number}","events_url":"https://api.github.com/repos/ropensci/plotly/events","assignees_url":"https://api.github.com/repos/ropensci/plotly/assignees{/user}","branches_url":"https://api.github.com/repos/ropensci/plotly/branches{/branch}","tags_url":"https://api.github.com/repos/ropensci/plotly/tags","blobs_url":"https://api.github.com/repos/ropensci/plotly/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ropensci/plotly/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ropensci/plotly/git/refs{/sha}","trees_url":"https://api.github.com/repos/ropensci/plotly/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ropensci/plotly/statuses/{sha}","languages_url":"https://api.github.com/repos/ropensci/plotly/languages","stargazers_url":"https://api.github.com/repos/ropensci/plotly/stargazers","contributors_url":"https://api.github.com/repos/ropensci/plotly/contributors","subscribers_url":"https://api.github.com/repos/ropensci/plotly/subscribers","subscription_url":"https://api.github.com/repos/ropensci/plotly/subscription","commits_url":"https://api.github.com/repos/ropensci/plotly/commits{/sha}","git_commits_url":"https://api.github.com/repos/ropensci/plotly/git/commits{/sha}","comments_url":"https://api.github.com/repos/ropensci/plotly/comments{/number}","issue_comment_url":"https://api.github.com/repos/ropensci/plotly/issues/comments{/number}","contents_url":"https://api.github.com/repos/ropensci/plotly/contents/{+path}","compare_url":"https://api.github.com/repos/ropensci/plotly/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ropensci/plotly/merges","archive_url":"https://api.github.com/repos/ropensci/plotly/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ropensci/plotly/downloads","issues_url":"https://api.github.com/repos/ropensci/plotly/issues{/number}","pulls_url":"https://api.github.com/repos/ropensci/plotly/pulls{/number}","milestones_url":"https://api.github.com/repos/ropensci/plotly/milestones{/number}","notifications_url":"https://api.github.com/repos/ropensci/plotly/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ropensci/plotly/labels{/name}","releases_url":"https://api.github.com/repos/ropensci/plotly/releases{/id}","created_at":"2013-11-21T05:56:51Z","updated_at":"2016-01-20T18:59:09Z","pushed_at":"2016-01-21T01:27:18Z","git_url":"git://github.com/ropensci/plotly.git","ssh_url":"git@github.com:ropensci/plotly.git","clone_url":"https://github.com/ropensci/plotly.git","svn_url":"https://github.com/ropensci/plotly","homepage":"https://plot.ly/r/","size":50518,"stargazers_count":308,"watchers_count":308,"language":"R","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":103,"mirror_url":null,"open_issues_count":53,"forks":103,"open_issues":53,"watchers":308,"default_branch":"master"}},"base":{"label":"ropensci:master","ref":"master","sha":"1530880f9c63c7f2b2a4237d48ca330bc17a47d0","user":{"login":"ropensci","id":1200269,"avatar_url":"https://avatars.githubusercontent.com/u/1200269?v=3","gravatar_id":"","url":"https://api.github.com/users/ropensci","html_url":"https://github.com/ropensci","followers_url":"https://api.github.com/users/ropensci/followers","following_url":"https://api.github.com/users/ropensci/following{/other_user}","gists_url":"https://api.github.com/users/ropensci/gists{/gist_id}","starred_url":"https://api.github.com/users/ropensci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ropensci/subscriptions","organizations_url":"https://api.github.com/users/ropensci/orgs","repos_url":"https://api.github.com/users/ropensci/repos","events_url":"https://api.github.com/users/ropensci/events{/privacy}","received_events_url":"https://api.github.com/users/ropensci/received_events","type":"Organization","site_admin":false},"repo":{"id":14579179,"name":"plotly","full_name":"ropensci/plotly","owner":{"login":"ropensci","id":1200269,"avatar_url":"https://avatars.githubusercontent.com/u/1200269?v=3","gravatar_id":"","url":"https://api.github.com/users/ropensci","html_url":"https://github.com/ropensci","followers_url":"https://api.github.com/users/ropensci/followers","following_url":"https://api.github.com/users/ropensci/following{/other_user}","gists_url":"https://api.github.com/users/ropensci/gists{/gist_id}","starred_url":"https://api.github.com/users/ropensci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ropensci/subscriptions","organizations_url":"https://api.github.com/users/ropensci/orgs","repos_url":"https://api.github.com/users/ropensci/repos","events_url":"https://api.github.com/users/ropensci/events{/privacy}","received_events_url":"https://api.github.com/users/ropensci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ropensci/plotly","description":"Create interactive web graphics from R via plotly's JavaScript graphing library","fork":false,"url":"https://api.github.com/repos/ropensci/plotly","forks_url":"https://api.github.com/repos/ropensci/plotly/forks","keys_url":"https://api.github.com/repos/ropensci/plotly/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ropensci/plotly/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ropensci/plotly/teams","hooks_url":"https://api.github.com/repos/ropensci/plotly/hooks","issue_events_url":"https://api.github.com/repos/ropensci/plotly/issues/events{/number}","events_url":"https://api.github.com/repos/ropensci/plotly/events","assignees_url":"https://api.github.com/repos/ropensci/plotly/assignees{/user}","branches_url":"https://api.github.com/repos/ropensci/plotly/branches{/branch}","tags_url":"https://api.github.com/repos/ropensci/plotly/tags","blobs_url":"https://api.github.com/repos/ropensci/plotly/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ropensci/plotly/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ropensci/plotly/git/refs{/sha}","trees_url":"https://api.github.com/repos/ropensci/plotly/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ropensci/plotly/statuses/{sha}","languages_url":"https://api.github.com/repos/ropensci/plotly/languages","stargazers_url":"https://api.github.com/repos/ropensci/plotly/stargazers","contributors_url":"https://api.github.com/repos/ropensci/plotly/contributors","subscribers_url":"https://api.github.com/repos/ropensci/plotly/subscribers","subscription_url":"https://api.github.com/repos/ropensci/plotly/subscription","commits_url":"https://api.github.com/repos/ropensci/plotly/commits{/sha}","git_commits_url":"https://api.github.com/repos/ropensci/plotly/git/commits{/sha}","comments_url":"https://api.github.com/repos/ropensci/plotly/comments{/number}","issue_comment_url":"https://api.github.com/repos/ropensci/plotly/issues/comments{/number}","contents_url":"https://api.github.com/repos/ropensci/plotly/contents/{+path}","compare_url":"https://api.github.com/repos/ropensci/plotly/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ropensci/plotly/merges","archive_url":"https://api.github.com/repos/ropensci/plotly/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ropensci/plotly/downloads","issues_url":"https://api.github.com/repos/ropensci/plotly/issues{/number}","pulls_url":"https://api.github.com/repos/ropensci/plotly/pulls{/number}","milestones_url":"https://api.github.com/repos/ropensci/plotly/milestones{/number}","notifications_url":"https://api.github.com/repos/ropensci/plotly/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ropensci/plotly/labels{/name}","releases_url":"https://api.github.com/repos/ropensci/plotly/releases{/id}","created_at":"2013-11-21T05:56:51Z","updated_at":"2016-01-20T18:59:09Z","pushed_at":"2016-01-21T01:27:18Z","git_url":"git://github.com/ropensci/plotly.git","ssh_url":"git@github.com:ropensci/plotly.git","clone_url":"https://github.com/ropensci/plotly.git","svn_url":"https://github.com/ropensci/plotly","homepage":"https://plot.ly/r/","size":50518,"stargazers_count":308,"watchers_count":308,"language":"R","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":103,"mirror_url":null,"open_issues_count":53,"forks":103,"open_issues":53,"watchers":308,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ropensci/plotly/pulls/416"},"html":{"href":"https://github.com/ropensci/plotly/pull/416"},"issue":{"href":"https://api.github.com/repos/ropensci/plotly/issues/416"},"comments":{"href":"https://api.github.com/repos/ropensci/plotly/issues/416/comments"},"review_comments":{"href":"https://api.github.com/repos/ropensci/plotly/pulls/416/comments"},"review_comment":{"href":"https://api.github.com/repos/ropensci/plotly/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ropensci/plotly/pulls/416/commits"},"statuses":{"href":"https://api.github.com/repos/ropensci/plotly/statuses/34a8af79dab2da57565842eb1ee3c6bdca1a0845"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":161,"deletions":12,"changed_files":8}}