【问题标题】:Can I make tooltips stay on click in plotly-dash?我可以让工具提示停留在 plotly-dash 中吗?
【发布时间】:2019-07-08 14:07:43
【问题描述】:

我正在尝试制作一个在标记悬停时出现的工具提示,以在单击标记时保留。或者,也许,一些其他类型的文本注释会出现并保持点击。 如果有帮助,我正在使用地图上的标记。 谢谢

【问题讨论】:

  • 很遗憾,目前无法做到这一点。

标签: python plotly plotly-dash plotly-python


【解决方案1】:

您可以使用 Dash 传单。这是一个小例子,

import dash
import dash_html_components as html
import dash_leaflet as dl

app = dash.Dash()
app.layout = html.Div([
    dl.Map(children=[dl.TileLayer(), dl.Marker(position=(56, 10), children=dl.Popup("I am a popup"))],
           style={'width': "100%", 'height': "100%"}, center=[56, 10], zoom=8),
], style={'width': '1000px', 'height': '500px'})

if __name__ == '__main__':
    app.run_server()

免责声明:我是 Dash Leaflet 的维护者。

【讨论】:

  • 感谢您制作 dash 传单,期待尝试一下,iframe 中的 Folium 不适合。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-10-18
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多