[Feature] Multiple parallel edges
- Dominant language
- TypeScript
- Stars
- 67.3k
- Forks
- 19.8k
- Avg merge
- 11d 14h
- Merged PRs (30d)
- 8
Description
### What problem does this feature solve?
Especially to represent network topologies it would be nice to have the possibility to create parallel lines as edges (instead of curved ones). Through this feature it would be possible to obtain such a result.

### What does the proposed API look like?
In order to achieve the result above some steps are required:
- Introduce an `offset` field in `lineStyle` option. This field can be a percentage (e.g 20% of node size) or a static value (e.g 1). As I'm trying to implement this feature I noticed that the position of the links are rounded to integer, so the percentage could be complicated.
- Introduce a field `autoOffset` to set the auto computation of offsets when the graph has multiple edges between two nodes. This alternative would ensure full backwards compatibility. Alternatively a field could be added (e.g `parallelEdges`: `curve` | `offset`) to tell Echarts how to handle multiple edges.
In case there are too many edges between two nodes in the first instance an offset may not be applied. At a later stage, a label could be introduced to indicate how many 'collapsed' edges there are.
I can try to implement this feature and then open a PR, but I'll need someone to discuss some choices and questions.
Let me know.
Best regards,
Daniele
Contributor guide
Assessment
This issue has not been assessed yet.