Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make widgets communicate together #227

Closed
FrancoisGuillem opened this issue Aug 19, 2016 · 3 comments
Closed

Make widgets communicate together #227

FrancoisGuillem opened this issue Aug 19, 2016 · 3 comments

Comments

@FrancoisGuillem
Copy link

It would be awesome if this package provided a simple and unified mechanism to let widgets communicate together so the final user has not to write some javascript code to manage interactions between widgets (At least the most simple ones).

Use case

Imagine a shiny app with a world map and a time series chart containing one line per country. When the user hovers a country on the map, the javascript of the widget sends the id of the hovered polygon (for instance country name) to a global javascript object provided by htmlwidgets. Then this object sends this id to the other widgets of the page, here the time series chart which then highlights the series with the corresponding id.

The only job for the user would be to pass to the two functions that generate the widgets the ids of the polygons and the time series and the link between widgets would be automatically created. It would be magical ! (*o*)

htmlwidget developers would have to actualize their javascript code to send messages to the object provided by htmlwidget and they would have to provide an additional function ("highlight" or something like this) that would be called when a message is sent by another widget.

@jjallaire
Copy link
Collaborator

Check out the crosstalk package: https://github.com/rstudio/crosstalk/blob/master/README.md

@timelyportfolio
Copy link
Collaborator

@cuche27 we are working on it. For a very long discussion see #86.

@FrancoisGuillem
Copy link
Author

Ho ok. Sorry for duplication. I am eager to see the final result :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants