plotly / plotly/plotly.py

make all subplots display data when hovering instead of just current subplot

Open
#4,621 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature P3
Dominant language
Python
Stars
18.8k
Forks
2.8k
Avg merge
16h 26m
Merged PRs (30d)
21

Description

【中文】
我希望 当hover在某一位置,所有子图对应的数值信息都显示出来,而不是只有当前的子图显示。

  • 所有子图已经共享x轴
  • 已经设置hovermode='x unified',

【Question】
I hope that when hovering over a specific position, all subplots display the corresponding value information, instead of only the current subplot.

  • All subplots share the x-axis.
  • hovermode='x unified' is already set.

self.figer = make_subplots(rows=nrows, cols=ncols, shared_xaxes=True,specs=specs, vertical_spacing=0.05 ) # 画布的figer
self.figer.update_layout(
# xaxis_rangeslider_visible=True,
hovermode='x unified',
spikedistance=-1
)
效果还是不行
问题-信息显示

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the make_subplots call using shared_xaxes=True and the subsequent update_layout settings with hovermode='x unified' and spikedistance=-1. Reproduce the behavior with a minimal multi-subplot example, then verify that hovering at one x position displays the corresponding values from every subplot.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.