apache / apache/echarts

[Bug] visualDimension has no effect on treemap

Open
#20,847 2 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://codepen.io/jbdesbas/pen/ogNdeBM

### Steps to Reproduce

1. Create a treemap chart with multi-dimension data (eg : ` data = [{value: [ 100, 50, 'a' ]}, {value: [ 200,50 ,'b' ]}, {value: [ 300,50 ,'b' ]} ] `
2. Try to select dimension to represent (0 or 1)

```js
data= [
{ value:[10,'n1',100,50]},
{value:[10,'n2',200,50]},
{value:[10,'n3',300,50]},
];

option = {
series:[
{
name:"test",
type:'treemap',
data: data,
visualDimension:2,
}
],}
```

### Current Behavior

The `visualDimension` parameter seems to have no effect, the dimension 0 is always used for area size.

### Expected Behavior

The `visualDimension` parameter should allow to select a dimension as area size.

### Environment

```markdown
- OS:Pop OS
- Browser: Firefox 129.0.2
- Framework:React@18
```

### Any additional comments?

_No response_

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.