plotly / plotly/plotly.py

Hover issue in subplots when adding parallel coordinates

未关闭
#1,792 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

bug P3
主要语言
Python
星标
18.8k
派生
2.8k
平均合并
16 小时 26 分钟
30 天内合并 PR
21

描述

When using combined subplot the hover for "xy" and "polar" charts does not work when combining those types with a parallel coordinates chart. The "scene" chart type is not affected. If commenting the par. coord. and uncomenting the pie chart, it works...
Python 2.7, plotly 4.1.1.

from plotly.subplots import make_subplots
import plotly.graph_objects as go

fig = make_subplots(
    rows=2, cols=2,
    specs=[[{"type": "xy"}, {"type": "polar"}],
           [{"type": "domain"}, {"type": "scene"}]],
)

fig.add_trace(go.Bar(y=[2, 3, 1]),
              row=1, col=1)

fig.add_trace(go.Barpolar(theta=[0, 45, 90], r=[2, 3, 1]),
              row=1, col=2)

fig.add_trace(go.Parcoords(dimensions = list([ dict(label = 'x', values = [1,2,-1]),
                                               dict(label = 'y', values = [1,-2,1]),
                                               dict(label = 'f_1(x,y)', values = [-1,2,1]),
                                               dict(label = 'f_2(x,y)', values = [-1,-2,1])])
                          ),
              row=2, col=1)

#fig.add_trace(go.Pie(values=[2, 3, 1]),
#              row=2, col=1)

fig.add_trace(go.Scatter3d(x=[2, 3, 1], y=[0, 0, 0], z=[0.5, 1, 2], mode="lines"),
              row=2, col=2)

fig.update_layout(height=700, showlegend=False)

fig.show()

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先,使用指定的 Plotly 版本运行提供的 Python 复现,并比较包含和不包含 parallel coordinates trace 时 xy 和 polar 子图的 hover 行为。跟踪这些子图类型所使用的 hover 处理方式;当 xy 和 polar 图表与 parallel coordinates 结合时 hover 能正常工作,且不会导致 scene charts 回归时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
data-visualization
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。