Plotly Hoverinfo 始终显示 [R Shiny]

发布于 2025-01-14 21:08:38 字数 736 浏览 2 评论 0原文

我有一个仪表板,其中包含多个 Plotly 图表 - Hoverinfo 正在按预期工作(悬停时信息会以小模式弹出),但对于较小的指标,hoverinfo 数据会永久显示。

此外,此错误仅在部署到 Docker 后发生,并且我无法在 RStudio run app 功能中复制它。有什么建议吗?

开发,悬停工作正常,没有错误: 在此处输入图像描述

prod,悬停有效,但数据也永久显示: 在此处输入图片说明

add_trace(x = ~crossprod, type = "scatter", mode = "markers", color = I("#3FA1D5"), 
          marker = list(line = list(color = "black", width = .8)),
          orientation = 'h', name = "name", xaxis = "x2",
          hoverinfo = 'text',
          text = ~paste('</br>variable name:', some_data,'</br>Data:', the_data ))

I have a dashboard with multiple Plotly graphs in it - Hoverinfo is working as expected (the info pops up in a small modal when hovering) but for smaller metrics the hoverinfo data permanently displays.

Additionally, this error only occurs after deploying to Docker, and I cannot replicate it in the RStudio run app function. Any suggestions?

development, hover works fine no error:
enter image description here

prod, hover works but data is also permanently displaying:
enter image description here

add_trace(x = ~crossprod, type = "scatter", mode = "markers", color = I("#3FA1D5"), 
          marker = list(line = list(color = "black", width = .8)),
          orientation = 'h', name = "name", xaxis = "x2",
          hoverinfo = 'text',
          text = ~paste('</br>variable name:', some_data,'</br>Data:', the_data ))

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

会傲 2025-01-21 21:08:38

这是我发现的最新版本的 Plotly 中添加的功能 - 如果您遇到同样的问题,解决方案是添加 texposition="none" 以防止悬停信息显示在较小的指标上

This was a feature added in the latest release of Plotly I found - the solution if you have the same issue is to add texposition="none" to prevent the hoverinfos from showing on smaller metrics

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文