Comments (1)
I sort of figured it out. I don't think this always gets the final position, but after reading through https://github.com/datastorm-open/visNetwork/blob/master/inst/htmlwidgets/visNetwork.js I don't know that it is possible to do better:
# In module UI function:
visNetworkOutput(ns("network"), width = "100%", height = 800
# In module server function:
observeEvent(input$network_highlight_color_id, {
print(paste0("Selected items are:", input$network_highlight_color_id))
rv_session[["highlighted_items"]] = input$network_highlight_color_id
proxy <- visNetworkProxy(ns("network"))
visGetPositions(proxy)
})
observeEvent(input$network_positions, {
rv_session[["selected_positions"]] = do.call("rbind", lapply(rv_session[["highlighted_items"]], function(id) {data.frame(id=id, x=input$network_positions[[id]][["x"]], y=input$network_positions[[id]][["y"]])}))
})
Where rv_session
is a reactiveValues collection created in my app.R
server
function which I pass in to all of my modules.
from visnetwork.
Related Issues (20)
- groupname not shown in legend if many groups
- visIgraphLayout: undefined columns selected HOT 1
- Adding Two Search Bars to Networks
- Specifying Order of Points in visNetwork
- Can't change figure size in R markdown HOT 1
- Network background image
- arrows.to.type Documentation HOT 1
- Node labels cause extreme node sizes, and can't use ellipsis on node labels HOT 1
- Default colors listed in visNodes() documentation still incorrect
- Edge Labels in VisNetwork?
- Display information of the nodes when an edge is selected HOT 1
- Highlight Edges with Color Column HOT 1
- Access network instance from script
- Is it possible to rotate FontAwesome icons with visNetwork?
- Does anyone know how to save a drag and drop graph in Rshiny after drawing a flowchart with visNetwork
- `visHclust()` throws `Error in match.names(clabs, names(xi)) : names do not match previous names` when using reference manual code
- Blank visNetwork in RStudio HOT 1
- When node is selected, only label highlighted edges and only display direct edges
- problems with color of the border of nodes in visLegend
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from visnetwork.