Hover data not showing correctly for px.scatter inside go.FigureWidget
還沒有人認領這個 Issue。
- 主要語言
- Python
- 星號
- 18.8k
- 分支
- 2.8k
- 平均合併
- 16 小時 26 分鐘
- 30 天內合併 PR
- 21
描述
Environment requirements
Python 3.11 on Linux, in Jupyter Notebook inside VSCode.
Extensions:
ms-toolsai.jupyter v2024.1.1
Packages:
plotly: 5.24.1
ipywidgets: 8.1.5
jupyterlab 3.6.8
Issue description
Hello, I'm having this issue where the hover data doesn't seem to show correctly, but it instead shows "%{customdata[0}" on the hover box.
fig_scatter = go.FigureWidget(px.scatter(df,
x='some_column1', y='some_column2',
title=f'Scatterplot',
hover_data=['column_in_df']
))
If I have the px.scatter plotted using a go.Figure directly it works but with go.FigureWidget it doesn't.
x and y columns show on the hover data, while this extra column_in_df doesn't even though it's also part of the df.
Let me know if any additional information is needed. Any help is appreciated, thank you!
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
首先,在 Jupyter Notebook 中使用所述版本的 Python、Plotly 和 ipywidgets,透過將 px.scatter 包裝在 go.FigureWidget 中來重現回報的行為。將其與傳遞給 go.Figure 的相同 px.scatter 進行比較,並檢查 hover_data 的表示方式;當 hover 框顯示 column_in_df 的值,而不是字面文字 %{customdata[0} 時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- jupyter-notebook, python
- 領域
- data-visualization
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100