Skip to content

Bug in table cell font color #4288

Closed
Closed
@LuisFRoch

Description

@LuisFRoch

Hi!

It seems there's a bug when changing font color of specific values. When changing negative values to RED else keep black gives mixed results where some negative values remain black, and some positive values turn RED. I've searched and found an old issue that doesn't seem to have been updated or closed. I've spent hours searching for solutions, but all code tweaks have delivered results stated above. Any help will be appreciated.

Old issue: [https://github.com//issues/2130]

font_color=['black']*4+[['red' if boolv else 'black' for boolv in df['col4'] > 0]]
t = go.FigureWidget([go.Table( header=dict(values=['col1)','col2','col3','col4'], fill = dict(color='#386dea'), font=dict(color='#fcfcfc'), align = ['left'] * 5), cells=dict(values=[df2[col] for col in ['col1','col2','col3','col4']], fill = dict(color='#F5F8FF'), align = ['left'] * 5, font=dict(color=font_color)))])

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