Filled area in scatterplot does not honor null values
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 18.3k
- 派生
- 2k
- 平均合并
- 2 天 12 小时
- 30 天内合并 PR
- 28
描述
Opening a new issue as requested here: https://github.com/plotly/plotly.js/issues/1132
When the scatter plot has null values on the y axis, the line drawn by plotly.js is disconnected over this area as expected. However, with fill: 'tozeroy', the filled area still spans the area with null values instead going only from known values to zero.
Short example, can be seen here: https://www.fi.muni.cz/~kas/plots/plotly-issue-7448.html
Plotly.newPlot('somediv', [{
type: "scatter",
mode: "lines",
x: [1,2,3,4,5],
y: [1,2,null,2,1],
fill: 'tozeroy',
}]);
In this example, there is no line drawn beetween (x=2, y=2) and (x=4, y=2) points as expected. There should be no filled area between x = 2 and x = 4 as well.
Thanks!
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从提供的 Plotly.newPlot 复现示例开始,跟踪散点图对 null y 值的填充处理。当 fill: 'tozeroy' 使 x=2 和 x=4 之间的区间保持未填充,同时保留预期的断开线行为时,修复就完成了。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- data-visualization
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100