Resizing pie chart with tooltips misaligns it and throws error
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 18.3k
- 派生
- 2k
- 平均合并
- 2 天 12 小时
- 30 天内合并 PR
- 28
描述
When using a certain combination of settings, pie charts can become misaligned, throwing the error trace.insidetextfont is undefined:
To reproduce the bug, first hover over the pie chart to bring up a tooltip, then resize the sandbox window to make the pie chart resize itself. The bug will not appear if you resize the chart without bringing up a tooltip at some point first.
I've created a minimum reproduction here:
<Plot
data={[
{
values: [1, 2],
type: "pie",
textinfo: "none",
hovertext: ["Tooltip 1", "Tooltip 2"]
}
]}
style={{
width: "100%"
}}
useResizeHandler
/>
Note that you don't need multiple pie sections to get the error (that's for demonstrating the misalignment), but you do appear to need everything else in some form, including, interestingly, textinfo: "none".
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从链接的 CodeSandbox 复现开始,重现以下步骤:将鼠标悬停在饼图上,然后调整 sandbox 窗口的大小。跟踪调整大小与 tooltip 的交互,直到解释清楚 trace.insidetextfont is undefined 错误和错位问题;完成的标准是图表调整大小时不会出现错误或视觉位移,包括使用 textinfo: "none" 和 hovertext 的情况。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- data-visualization
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100