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

Feature request - disappearing background edges #98

Closed
jcarlen opened this issue Sep 28, 2016 · 5 comments
Closed

Feature request - disappearing background edges #98

jcarlen opened this issue Sep 28, 2016 · 5 comments

Comments

@jcarlen
Copy link

jcarlen commented Sep 28, 2016

Hi, hopefully this is the right place to leave a feature request. I created a graph (you can see here: http://www.stat.ucla.edu/~jane.carlen/pages/movie_net.html) and because of its density I would like background edges to disappear (instead of just being grayed out) when I select a node. Alternatively, the highlighted edges could be moved to the front, but I think that would be more difficult. If this feature is already available, please let me know. And also let me know if any further info/clarification/replication example is needed. Thank you!

@bthieurmel
Copy link
Contributor

Hi, I'll add this parameter soon, to be enabled to choose the color/opacity of edges and nodes using this feature.

@bthieurmel
Copy link
Contributor

Hi,

I've just add a new argument in visOptions. You can now choose the color abd the opacity of hidden edges and nodes. This is an example :

nodes <- data.frame(id = 1:15, label = paste("Label", 1:15),
 group = sample(LETTERS[1:3], 15, replace = TRUE))

edges <- data.frame(from = trunc(runif(15)*(15-1))+1,
 to = trunc(runif(15)*(15-1))+1)
 
# don't show nodes/edges
visNetwork(nodes, edges) %>% visOptions(highlightNearest = list(enabled = TRUE, 
 hover = TRUE, hideColor = 'rgba(200,200,200,0)'))

@Taarnborg
Copy link

Hi,

This is a great option. However, It doesn't seem to work when I set edge color manually by providing a color column in the edges data.frame.

@bthieurmel
Copy link
Contributor

Hi,
Yes, at moment, highlightNearest / selectedBy unfortunately don't support edge color. Working well if edge color depends of nodes...

It's on my to do list.

@g-pires
Copy link

g-pires commented Feb 23, 2024

Hi, it appears that highlightNearest / selectedBy still don't support edge color, have you managed to work on that ?

Thank you

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

4 participants