Open Dekermanjian opened 3 years ago
I think I can work on this.
Hi, were able to reproduce the error? Is this a bug?
Having the same problem!
For now, as a an alternative, you can override the text class attributes in HTML/CSS in order to style your text. For example, in my styles.css file, I have added the following :
.node-label-text-path {
fill: rgb(250, 250, 250) !important;
text-shadow: none
}
Works well for me !
Btw issue is duplicate of https://github.com/plotly/plotly.py/issues/2741
The issue is open, but it is working in plotly 5.3.1
Just curious, is this still an issue or am I just bad at setting the font? Below is my code which sets the font properly if I use show() but not when I convert it to JSON and add it to my Flask dashboard. fig = go.Figure()
fig.add_trace(go.Sankey(valuesuffix=value_suffix,
node=dict(label=labels, color=label_colors),
link=dict(
source=links["source"],
target=links["target"],
value=links["value"],
color=links["link_c"],
),
textfont={'color': 'pink'}))
# Customize plot based on earlier values
fig.update_layout(
title_text=title,
font_size=font_size,
font_family=font_family,
font_color=font_color,
#width=1000,
#height=600,
paper_bgcolor=bg_color, # (use color name or hex code)
title={"y": 0.9, "x": 0.5, "xanchor": "center", "yanchor": "top"} # Centers title
)
Hello, I am not sure if this is a bug, but the textfont property is not allowing me to change the text color of the Sankey diagram. The size and family arguments work as expected.