Summary
I’m having a problem changing the label font color on sankey charts even after changing font_color the color won’t change. I even updated my plotly but no changes.
Steps to reproduce
Code snippet:
import streamlit as st
import plotly.graph_objects as go
fig = go.Figure(data=[go.Sankey(
node = dict(
pad = 15,
thickness = 20,
line = dict(color = “black”, width = 0.5),
label = [“A1”, “A2”, “B1”, “B2”, “C1”, “C2”],
color = “blue”,
),
link = dict(
source = [0, 1, 0, 2, 3, 3], # indices correspond to labels, eg A1, A2, A1, B1, …
target = [2, 3, 3, 4, 4, 5],
value = [8, 4, 2, 8, 4, 2]
))])
fig.update_layout(
title_text=“Basic Sankey Diagram”,
font_family=“Courier New”,
font_color=“blue”,
font_size=12,
title_font_family=“Times New Roman”,
title_font_color=“red”,
)
fig
If applicable, please provide the steps we should take to reproduce the error or specified behavior.
Expected behavior:
I expect the label color to change to blue as shown in line 22
Actual behavior:
The label color still remains the same no change
Debug info
- Streamlit version: (get it with
$ streamlit version
) - Python version: (get it with
$ python --version
) - Using Conda? PipEnv? PyEnv? Pex?
- OS version:
- Browser version:
Requirements file
Using Conda? PipEnv? PyEnv? Pex? Share the contents of your requirements file here.
Not sure what a requirements file is? Check out this doc and add a requirements file to your app.
Links
- Link to your GitHub repo:
- Link to your deployed app:
Additional information
If needed, add any other context about the problem here.