Reputation: 87
What is the default font color for Plotly go.Table? This https://stackoverflow.com/a/67844390/5539732 answer references https://plotly.com/python/reference/layout/#layout-font but this does not appear correct. I'm using Plotly for python in Google Colab.
Snippet of default color below:
Upvotes: 1
Views: 439
Reputation: 61094
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'
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()
Upvotes: 1