apache / apache/echarts

[Bug] Connected charts ignore `excludeComponents` when using `saveAsImage` when connected manually

Open
#20,978 0 comments 0 reactions 0 assignees View on GitHub
bug en pending
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### Version

5.6.0

### Link to Minimal Reproduction

https://jsfiddle.net/qkgnfcj8/

### Steps to Reproduce

1. Click on the button to save the graph image
2. Open the image and you will see the toolbox, but you shouldn't

### Current Behavior

Setting `excludeComponents: ['tooltip', 'toolbox']` gets ignored

### Expected Behavior

The excluded compoents should't be visible

### Environment

```markdown
- OS:Arch Linux
- Browser: Google Chrome Version 135.0.7049.84 (Official Build) (64-bit)
- Framework: React 19
```

### Any additional comments?

As far as I can see in the source code, the function `getDataURL()` in `src/core/echarts.ts` properly implemnts the excludeComponet functionallity, while `getConnectedDataURL()` in the same file is missing the `each` block that iterates over excludedComponents. I think that just adding it should fix the problem, but I couldn't get it to compile properly to test.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.