What is the default font color in Plotly go.Table?

Viewed 68
1 Answers

This may vary with your Plotly version. I'm on 5.3.1, and running a go.Table() example in JupyterLab v2.1.5 produces the table below. And you can check the fontcolor of the cells if you first use f = fig.full_figure_for_development() and then

f.data[0].cells.font.color

Which returns:

'#2a3f5f'

Table:

enter image description here

Complete code:

import plotly.graph_objects as go

fig = go.Figure(data=[go.Table(header=dict(values=['A Scores', 'B Scores']),
                 cells=dict(values=[[100, 90, 80, 90], [95, 85, 75, 95]]))
                     ])
f = fig.full_figure_for_development(warn=False)
print(f.data[0].cells.font.color)
fig.show()
Related