plotly.R
plotly.R copied to clipboard
Option to remove the white shadow in sankey type diagram
Brief description of the problem Hi I need to have a cleaner version of sankey diagram but couldn't find the option in API doc.
The dom class name is text-shadow, but in the doc There's no definition to include/exclude text shadow.
plot_ly(
type = "sankey",
domain = c(
x = c(0,1),
y = c(0,1)
),
orientation = "h",
node = node,
link = link,
width = 2000,
height = 3600) %>%
layout(
title = "TBD",
font = list(
size = 10,
color = 'white'
),
plot_bgcolor = 'black',
paper_bgcolor = 'black'
)
Hi, I'm also trying to solve the same problem. Have you been able to do it?
+1 and it would be great to be able to set the node font color
If you don't mind overriding styles with CSS, then here's the way to go:
.sankey {
.node-label-text-path {
text-shadow: none;
fill: #fff !important;
}
}
Same problem.
Hello, in R, setting the link color and the paper_bgcolor as the same worked for me.
This is also a big issue for Python. Every text label is ghosted with the label one or two labels beneath it. Multi-item Sankey plots become uninterpretable.
Any recommendations to switch this off without CSS styles sheet would be fantastic.
Still an issue for me in Python (plotly 5.10.0). Any updates?
not yet fixed in 5.11 either. Apologies, the work around from Sharq1 for overriding with CSS. How do you that?
I got it working through the comment from Sooner30, also in python. => make the background transparent 'removes the shadow'.
start code = data = go.Sankey( node = node, link = link) layout = go.Layout( paper_bgcolor='rgba(0,0,0,0)', plot_bgcolor='rgba(0,0,0,0)' ) fig = go.Figure(data, layout=layout) end code =