christophergandrud / networkD3

D3 JavaScript Network Graphs from R
http://christophergandrud.github.io/networkD3
652 stars 268 forks source link

Replace Node with PNG #265

Closed bkellman closed 5 years ago

bkellman commented 5 years ago

Would it be possible to replace the nodes with PNGs? Perhaps raster objects?

cjyetman commented 5 years ago

It is possible in JavaScript/D3, but nor directly with this package.

bkellman commented 5 years ago

Terrific! Please pardon my unfamiliarity but I saw that the output network on ln 16/20: <script type="application/json" data-for="htmlwidget-5a0c8348763c3da03edb">{"x":{"links":{"source":[69,62,86,69,86,62,12,1,5,90,88,90,88,91,89,95,87,8,91,90,100,93,88,94,98,89... is approximately a json. Is there a simle way I can modify this object to add the file names of some png objects?

cjyetman commented 5 years ago

no... modifying that data would not make the nodes change to images

bkellman commented 5 years ago

I'd really appreciate a pointer in the right direction. I'm pretty unfamiliar with d3

cjyetman commented 5 years ago

frankly, you will not be able to achieve it without substantial knowledge of D3