apache / apache/echarts

[Bug] graph关系图 节点x或者y相同时,关系线显示异常,出现偏移。

Open
#17,592 4 comments 0 reactions 0 assignees View on GitHub
bug topic: graph
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### Version

5.3.3

### Link to Minimal Reproduction

_No response_

### Steps to Reproduce

设置chart option(节点y值相同)

```javascript
option = {
series: [
{
type: 'graph',
data: [
{
"name": "A",
"x": 40,
"y": 10
},
{
"name": "B",
"x": 45,
"y": 10
}
],
links: [
{
"source": "A",
"target": "B",
}
],
}
]
};
```

### Current Behavior

## 上述option配置时,关系线出现偏移:
![image](https://user-images.githubusercontent.com/30168570/187340085-6cf423a9-70fa-4499-b6b4-92b55df5dd0d.png)
## 节点x值相同时,同样会出现:
![image](https://user-images.githubusercontent.com/30168570/187341127-44ec30ad-b3f2-41d1-8220-dd55651979f0.png)

## 但是当设置lineStyle(大于1.5)时,关系线位置正常:
![image](https://user-images.githubusercontent.com/30168570/187340283-bc6c6090-4e66-4186-99e3-bc2344a907cb.png)

### Expected Behavior

关系线位置应该保持正确

### Environment

```markdown
- OS: windows
- Browser: Chroem 104.0.5112.101
- 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.