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

Pass info from D3 back to [R] #272

Closed
TS404 opened this issue Apr 27, 2020 · 3 comments
Closed

Pass info from D3 back to [R] #272

TS404 opened this issue Apr 27, 2020 · 3 comments

Comments

@TS404
Copy link

TS404 commented Apr 27, 2020

Could data be passed back from the visualisation to an object in [R]?

For example. on this simple shiny app I'd ideally like to be able to populate a list in [R] based on nodes that are clicked. Currently, I have to do it via a checkbox list and clicking the nodes just calls a basic 'alert("You clicked " + d.name);'.

(Also asked at r2d3-I79)

@cjyetman
Copy link
Collaborator

cjyetman commented Apr 27, 2020

You'll need to look into Shiny Reactivity, which is not part of this package.

Here is one example of using Shiny Reactivity with a networkD3 plot.

Also in general, please provide a minimal reproducible example when asking for support.

@cjyetman
Copy link
Collaborator

Also FYI, networkD3 does not use r2d3, so they likely will not help you over there.

@TS404
Copy link
Author

TS404 commented Apr 28, 2020

Ah, thank you! That makes sense. Doubly thank you for the MRD link. I'll aim to do so in future.

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

No branches or pull requests

2 participants