【发布时间】:2020-10-13 18:39:29
【问题描述】:
我想在有情节的表格上显示悬停信息。这是我的最佳猜测,但在 jupyter 笔记本中或当图形导出为 html 并在浏览器中查看时,没有显示悬停文本:
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')
情节版本 4.5.4
有许多 go.Table() 参数看起来可能是相关的,但我没有找到显示任何内容的组合:
- 悬停信息
- hoverinfosrc
- 悬停标签
- 元
- 元数据
- 自定义数据
- customdatasrc
我一直在看的一些参考资料:
【问题讨论】: