How to display hover info on a plotly Table?

Viewed 1284

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:

  • hoverinfo
  • hoverinfosrc
  • hoverlabel
  • meta
  • metasrc
  • customdata
  • customdatasrc

Some references I've been looking at:

1 Answers
Related