I would like to display hover info over a plotly Table. This is my best guess, but no hover text shows up in a jupyter notebook or when the figure is exported to html and viewed in a browser:
import plotly.graph_objects as go
hover_text = [['hover a', 'hover b', 'hover c'],
['hover d', 'hover e', 'hover f']]
fig = go.Figure(data=[go.Table(
cells={'values': [['a', 'b', 'c'],
['d', 'e', 'f']]},
hoverinfo='text',
meta={'text': hover_text}
)])
fig.show()
fig.write_html('test.html')
plotly version 4.5.4
There are a number of go.Table() parameters that seem like they may be relevant, but I have not found a combination that displays anything:
Some references I've been looking at:
Adding Traces To Subplots If a figure was created using plotly. subplots. make_subplots() , then supplying the row and col arguments to add_trace() can be used to add a trace to a particular subplot.
It seems like its a documentation bug and hovers are currently not working with tables. You can check out the open git issue regarding this error: https://github.com/plotly/plotly.js/issues/5523
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With