Skip to content

Sankey text font{color} property not changing font color. #2845

@Dekermanjian

Description

@Dekermanjian

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.

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, A2, B1, ...
      target = [2, 3, 3, 4, 4, 5],
      value = [8, 4, 2, 8, 4, 2]
    ),
    textfont = dict(color="red", family = "arial", size = 20)
)])

fig.update_layout(title_text="Basic Sankey Diagram", font_size=10)
fig.show()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions