christophergandrud / networkD3

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

Count in boxes instead of using tooltip in R #279

Closed Fatjetaa closed 3 years ago

Fatjetaa commented 3 years ago

Is it possible to add the number of count in the flow instead of using the tooltip in R?

cjyetman commented 3 years ago

please provide a minimal reproducible example, or at the very least specify which function/plot you're talking about

Fatjetaa commented 3 years ago

I am talking about the sankeyNetwork() function.

sankeyNetwork(Links = links, Nodes = nodes, Source = "IDsource", Target = "IDtarget", Value = "n", NodeID = "name", sinksRight=FALSE)

cjyetman commented 3 years ago

If I understand your question correctly, that is not a current feature, and to achieve it one would have to do substantial modification to the underlying JavaScript. New text elements would need to be generated, and they would need to placed appropriately according to the path, as well as auto-update their position when the path changes.

Fatjetaa commented 3 years ago

Okay, thankyou