We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm using sigmajs R package in a shiny app and I would like to color one node diferently than the others to highlight it.
sigmajs
I was trying:
network <- reactive({ graph_from_data_frame(d = edges(), vertices = nodes(), directed = FALSE) }) output$org_plot <- renderSigmajs( sigmajs() %>% sg_from_igraph(network()) %>% sg_settings(drawLabels = TRUE, drawEdgeLabels = FALSE) %>% sg_layout(layout = igraph::layout_nicely) %>% sg_settings( minNodeSize = 3, maxNodeSize = 9, edgeColor = "default", defaultEdgeColor = "#d3d3d3", labelThreshold = 5 ) %>% sg_neighbours() ) observeEvent(input$filter_org_list, { nodes_color <- node_size_label() %>% mutate(color = case_when( id == input$filter_org_list ~ "red", TRUE ~ "black" )) sigmajsProxy("change") %>% sg_change_nodes_p(nodes_color, color, "color") })
where input$filter_org_list is the node I want to highlight.
input$filter_org_list
The above doesn't work as expected, it changes all nodes to black.
Is it possible to do what I want? Am I doing something wrong?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm using
sigmajs
R package in a shiny app and I would like to color one node diferently than the others to highlight it.I was trying:
where
input$filter_org_list
is the node I want to highlight.The above doesn't work as expected, it changes all nodes to black.
Is it possible to do what I want? Am I doing something wrong?
The text was updated successfully, but these errors were encountered: