Scattergl does not fill (`tonexty`) if another Scattergl trace is present
未关闭
还没有人认领这个 Issue。
bug
P3
- 主要语言
- JavaScript
- 星标
- 18.3k
- 派生
- 2k
- 平均合并
- 2 天 12 小时
- 30 天内合并 PR
- 28
描述
When attempting to fill the area between two lines using Scattergl, no filled area is showing up when another Scattergl trace is present before the two traces I'm trying to fill between. See the example below.
I'm not sure if this issue is related to some of the other issues posted about Scattergl and filling but none of those seem to mention the filled area not showing up, so I figured I'd post a new issue.
plotly version 5.18.0
Not working
This example shows what i mean:
import plotly.graph_objects as go
import numpy as np
upper_trace = go.Scattergl(
x=np.arange(10),
y=np.ones(10),
mode="lines",
line_color="blue",
fill="tonexty",
legendgroup="area",
)
lower_trace = go.Scattergl(
x=np.arange(10),
y=-np.ones(10),
mode="lines",
line_color="blue",
fill="tonexty",
legendgroup="area",
showlegend=False,
)
other = go.Scattergl(
x=np.arange(10),
y=2 * np.ones(10),
mode="lines+markers",
line_color="red",
)
go.Figure([other, upper_trace, lower_trace])
Output:
Working
go.Figure([upper_trace, lower_trace, other])
Thanks in advance for taking a look.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
使用 Plotly 5.18.0 重现两个 Python 示例,重点关注 Scattergl 轨迹及其顺序。跟踪 fill="tonexty" 的 Scattergl 渲染路径;当另一条 Scattergl 轨迹位于这两条轨迹之前时,填充区域会出现,并且在更改顺序后仍然正确,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- data-visualization
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100