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

Is there a way visDataSet could be added #14

Closed
dockstreet opened this issue Aug 11, 2015 · 4 comments
Closed

Is there a way visDataSet could be added #14

dockstreet opened this issue Aug 11, 2015 · 4 comments

Comments

@dockstreet
Copy link

Hi!

I would like to be able to refer to nodeValues. Can the below be addressed? thx!

almende/vis#1178

@bthieurmel
Copy link
Contributor

Can you give more details of what you want to do ?

@dockstreet
Copy link
Author

What I would like to do is pass a node value to a URL instead of a node Id in javascript on a click event.

@bthieurmel
Copy link
Contributor

Something like that seems to work for me :

`
nodes <- data.frame(id = 1:3, value = c(10, 20, 30))
edges <- data.frame(from = c(1,2), to = c(1,3))

visNetwork(nodes, edges) %>%
  visEvents(click = "function(properties) {
      alert('selected nodes: ' + this.body.data.nodes.get(properties.nodes[0]).value);}")

@dockstreet
Copy link
Author

Excellent ! will work. thank you sooooo much!

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

2 participants