plotly / plotly/plotly.js

[BUG]: Some plots render incorrectly when using virtual-webgl in Chromium browsers

未关闭
#7,764 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

bug P3 size: 3
主要语言
JavaScript
星标
18.3k
派生
2k
平均合并
2 天 12 小时
30 天内合并 PR
28

描述

Description

Some plots are rendering incorrectly (missing or muted colors) when using virtual-webgl in Chromium based browsers. This was originally reported in plotly/Kaleido#375.

Screenshots/Video
Without virtual-webgl With virtual-webgl
Image Image

See plotly/Kaleido#375 for more examples.

Steps to reproduce
  • Start plotly.js devtools
  • Open the mock 'gl2d_parcoords_constraints'
  • Note that there are number of dark red lines on the left side of the plot
  • Edit devtools/test_dashboard/index.html to include the following <script> tag in the body
    <script src="../../node_modules/virtual-webgl/src/virtual-webgl.js"></script>
    
  • Reload the mock
  • Note that a few of the dark red lines are now missing
Notes
  • This bug was discovered when development of Kaleido v1 started
  • The previous version of Kaleido (v0.2.1) used Chromium v88. Kaleido v1 uses the installed Chromium version (usually a pretty recent one).
  • At some point between the release of Chromium v88 and Chrome v112 (the oldest Chrome for Testing available here), the bug was introduced
  • It's unclear if it's a bug in Chromium, a bug in virtual-webgl, or a bug in plotly.js
  • Firefox doesn't have the issue, though colors do appear to render a differently for some plots when using/not using virtual-webgl
  • Chromium v147 shows the following console warnings when using virtual-webgl:
    virtual-webgl.js:389 WebGLRenderingContext.canvas is not supported
    (anonymous) @ virtual-webgl.js:389
    (anonymous) @ virtual-webgl.js:1008
    virtual-webgl.js:389 WebGLRenderingContext.drawingBufferColorSpace is not supported
    (anonymous) @ virtual-webgl.js:389
    (anonymous) @ virtual-webgl.js:1008
    virtual-webgl.js:389 WebGLRenderingContext.unpackColorSpace is not supported
    (anonymous) @ virtual-webgl.js:389
    (anonymous) @ virtual-webgl.js:1008
    virtual-webgl.js:389 WebGLRenderingContext.drawingBufferFormat is not supported
    (anonymous) @ virtual-webgl.js:389
    (anonymous) @ virtual-webgl.js:1008
    
  • Firefox v145 shows the following console warnings when using virtual-webgl:
    WebGLRenderingContext.canvas is not supported <anonymous code>:formatted:8942:27
    WebGLRenderingContext.drawingBufferColorSpace is not supported <anonymous code>:formatted:8942:27
    WebGLRenderingContext.unpackColorSpace is not supported <anonymous code>:formatted:8942:27
    
  • virtual-webgl support was added in plotly.js in #6784

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

使用添加到 devtools/test_dashboard/index.html 的 gl2d_parcoords_constraints mock 和 virtual-webgl 脚本重现该问题。将受影响的 Chromium 行为与 Firefox 以及报告中注明的 Chromium 版本进行比较,然后确定缺失的线条是源自 Chromium、virtual-webgl 还是 plotly.js;完成的标准是使用 virtual-webgl 时图表能够一致地渲染。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript
领域
data-visualization
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
冷清
描述清晰度
需要澄清
新手友好度
42/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。