christophergandrud / christophergandrud/networkD3
Use custom images as nodes
- Dominant language
- R
- Stars
- 659
- Forks
- 259
- PR merge metrics
- No merged PRs in 30d
Description
Hi, thank you for the great work on networkD3!
I’m wondering if there’s any way to use custom images (e.g., PNG or SVG icons) for nodes instead of the default circles in `forceNetwork()`. My guess is that this isn’t natively supported, but I’m wondering that whether there is any workarounds—as long as they’re compatible with deploying the visualization in an interactive Shiny app.
I know this can be done by another package [visNetwork](https://datastorm-open.github.io/visNetwork/image_icon.html) but I greatly prefer the aesthetic of networkD3.
Is there any solution (e.g., injecting custom JavaScript, modifying the HTML output, or overriding node rendering) that would allow this functionality? Thanks!
A minimal [.qmd](https://github.com/user-attachments/files/19850676/test.txt) file is attached.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.