JohnCoene / sigmajs

Σ sigma.js for R
http://sigmajs.john-coene.com
Other
72 stars 7 forks source link

Click events #24

Closed jwscot closed 2 years ago

jwscot commented 2 years ago

Is there any additional info on click events online? I have read the CRAN page (https://cran.r-project.org/web/packages/sigmajs/sigmajs.pdf) and followed the link for the official documentation (https://github.com/jacomyal/sigma.js/wiki/Events-API) but I don't find it clear.

I would like to highlight the adjacent nodes, and the adjacent nodes of these, i.e. I would like to highlight a path through a tripartite graph.

JohnCoene commented 2 years ago

like this?

jwscot commented 2 years ago

Unfortunately not, essentially I would like to highlight nodes that are related to each other through my own custom definition.

I.e.

for node in graph: create array of nodes in same family highlight these nodes only

Screenshot 2021-10-08 at 17 31 50 .

jwscot commented 2 years ago

Where the orange edges are those that are highlighted

JohnCoene commented 2 years ago

That's currently not possible, I could expose the interface to enable it but it would be serious JavaScript work on your end to handle this correctly: it's not as easy as it seems. Maybe easier is via Shiny if you look at the demo and docs?