kellirichardson / biofeedback-vis

Interactive Sankey diagram for biofeedback scoping review
MIT License
4 stars 0 forks source link

Placement of labels #43

Open kellirichardson opened 2 years ago

kellirichardson commented 2 years ago

Can we place the Domain labels to the left, and the Outcome labels to the right? @Aariq, below is the code we used for the static image.

geom_sankey_label(size = 3, fill = "white", hjust = c(rep(1.1, 14), rep(-0.01, 22)))

Where 14 was the number of Domains, and 22 was the number of Theories.

Aariq commented 2 years ago

I can try to figure this out. I suspect it might be more trouble than it's worth so I think it should be a low priority.

kellirichardson commented 2 years ago

Hey @Aariq! At end of the sankey, for "Behavior" and "Outcome," the labels overlap making them unreadable. If at least outcome could switch sides, that would be helpful!

Aariq commented 2 years ago

Ah, ok. I see what you're talking about now.

Aariq commented 2 years ago

a workaround that I don't particularly like: https://stackoverflow.com/questions/71045646/plotly-sankey-is-it-able-to-put-the-node-labels-to-the-right-for-last-layerco

Aariq commented 2 years ago

Well, unfortunately this is something that can't be done currently in plotly as far as I can tell. Very weird! I think putting the node name back in the tooltip will help with this issue though.