Skip to content

[Bug] saveAsImage with pixelRatio > 1 renders 3D / echarts-gl components blank #21700

Open

Description

@dmunish

Version

6.1.0

Link to Minimal Reproduction

https://codepen.io/Danish-Munib/pen/raWzBYG

Steps to Reproduce

  1. Create a 3D chart using echarts-gl (e.g., line3D, surface, or bar3D).
  2. Add the toolbox.feature.saveAsImage configuration.
  3. Set pixelRatio in saveAsImage to a value greater than 1 (e.g., pixelRatio: 2).
  4. Trigger saveAsImage via the toolbox button or programmatically using chart.getDataURL().

Current Behavior

When pixelRatio is set to 1, the exported image renders correctly.

However, setting pixelRatio > 1 results in an exported image where the WebGL viewport/3D canvas content is entirely blank. Only 2d elements (such as the visualMap legend) are rendered.

Image Image

Expected Behavior

The exported image should render the complete 3D chart at high resolution corresponding to the specified pixelRatio.

Environment

- OS: Windows 10 Pro 22H2
- Browser: Brave 1.92.140 (Official Build)
- Framework: Vanilla JS

Any additional comments?

The issue appears to stem from how WebGL framebuffers handle resizing during off-screen rendering when target pixel ratios are increased.

Activity

  1. added
    enThis issue is in English
    pendingWe are not sure about whether this is a bug/new feature.
    on Jul 20, 2026
  2. plainheart commented on Jul 21, 2026

    @plainheart
    Member

    It is likely a regression in v6.1.0. I tested that it worked in v6.0.0 with echarts-gl v2.0.8.

  3. added
    regressionSomething no longer works as expected since a certain version
    on Jul 21, 2026
  4. added this to the 6.1.1 milestone on Jul 21, 2026
  5. DaZuiZui commented on Jul 22, 2026

    @DaZuiZui

    Correction: my earlier version attribution was inaccurate. I initially treated this as an ECharts 6.1.0 regression, but that comparison changed both ECharts and echarts-gl versions, so it did not isolate ECharts 6.1.0 as the cause.

    The failing behavior is more likely caused by the high-pixel-ratio export path in zrender, where non-builtin layers such as echarts-gl LayerGL are omitted. The proposed upstream fix is ecomfe/zrender#1164.

    Sorry for the earlier misclassification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugenThis issue is in EnglishglpendingWe are not sure about whether this is a bug/new feature.regressionSomething no longer works as expected since a certain version

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions