Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

title on top of nodes #19

Open
Krisselack opened this issue Dec 5, 2018 · 2 comments
Open

title on top of nodes #19

Krisselack opened this issue Dec 5, 2018 · 2 comments

Comments

@Krisselack
Copy link

I used the title option; but unlike in the docs (topright corner) it moved to the topleft corner (per default) on top of a node. Would be nice to have some vertical distance between title and diagram.

@j-johanness
Copy link

First of all, I think this is an amazing package. Thank you so much @fbreitwieser . There are so much more ways to customize the Sankey now, as opposed to when it was first introduced in the 'networkD3' package.

However, I am encountering a similar issue as well, where the title is situated in the top-left hand corner of the plot, and overlapping completely with the nodes/links found there. I have attempted to resolve this using the 'margin' argument, but was unsuccessful.

I share a cropped snapshot of my Sankey.

Capture

My code is as follows;

`margin <- c(top=50,right=50,bottom=50,left=50)

plot3 <- sankeyNetwork(Links = links, Nodes = nodes,
Source = "source", Target = "target", Value = "value", NodeID = "name",
NodePosX = NULL, NodeValue = NULL, NodeColor = NULL,
NodeFontColor = NULL, NodeFontSize = NULL,
colourScale = my_color,
fontSize = 10, fontFamily = "times-new-roman", fontColor = NULL, nodeWidth = 15,
nodePadding = 10, nodeStrokeWidth = 1, nodeCornerRadius = 0,
margin = margin, title = "Region 01",
orderByPath = FALSE, highlightChildLinks = FALSE,
doubleclickTogglesChildren = FALSE, xAxisDomain = NULL,
dragX = FALSE, dragY = FALSE,
height = NULL, width = NULL, iterations = 0,
zoom = FALSE, align = "none", showNodeValues = FALSE,
linkType = "path1",
curvature = 0.5,
nodeLabelMargin = 5, linkOpacity = 0.3, linkGradient = FALSE,
nodeShadow = FALSE, scaleNodeBreadthsByString = FALSE,
xScalingFactor = 1, yOrderComparator = FALSE)
plot3`

@Nodeswitch
Copy link

Does anyone know if there's a fix or workaround for this? I'm able to replicate the above.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants