apache / apache/echarts

[Bug] Sankey图的series.edgeLabel.distance配置项设置关系边文本标签距离图形元素的距离无效

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

Description

### Version

5.5.0

### Link to Minimal Reproduction

https://echarts.apache.org/examples/zh/editor.html?c=sankey-simple

### Steps to Reproduce

![sankey](https://github.com/apache/echarts/assets/96172382/c2ed12aa-4298-43b1-801c-f40c4bbe6db7)

option = {
series: {
type: 'sankey',
// layout: 'none',
edgeLabel:{
distance:50,
show: true,
},
levels:[
{
depth: 0,
itemStyle: {
color: '#fbb4ae'
},
}
],
emphasis: {
focus: 'adjacency'
},
data: [
{
name: 'a'
},
{
name: 'b'
},
{
name: 'a1'
},
{
name: 'a2'
},
{
name: 'b1'
},
{
name: 'c'
}
],
links: [
{
source: 'a',
target: 'a1',
value: 5
},
{
source: 'a',
target: 'a2',
value: 3
},
{
source: 'b',
target: 'b1',
value: 8
},
{
source: 'a',
target: 'b1',
value: 3
},
{
source: 'b1',
target: 'a1',
value: 1
},
{
source: 'b1',
target: 'c',
value: 2
}
]
}
};

### Current Behavior

在sankey中设置series.edgeLabel.distance无效,标签一直居中

### Expected Behavior

设置series.edgeLabel.distance应该有效

### Environment

```markdown
- OS:
- Browser:
- Framework:
```

### 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.