apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.82k stars 19.63k forks source link

[Bug] `labelLayout.draggable` in series of type `graph` doesn't affect edge labels. #18752

Open bk-m opened 1 year ago

bk-m commented 1 year ago

Version

5.4.2

Link to Minimal Reproduction

Link

Steps to Reproduce

  1. Create a series of type graph
  2. set labelLayout.draggable to true

Current Behavior

labelLayout.draggable works for node labels but not for edge labels.

Expected Behavior

Since labelLayout's position parameters (x, y, dx, dy) DO affect the edge label, I would assume that draggable should work too.

Environment

- OS: Manjaro
- Browser: Firefox
- Framework: eCharts 5.4.2

Any additional comments?

No response

echarts-bot[bot] commented 1 year ago

This issue is labeled with difficulty: easy. @bk-m Would you like to debug it by yourself? This is a quicker way to get your problem fixed. Or you may wait for the community to fix.

Please have a look at How to debug ECharts if you'd like to give a try. 🤓

TLahnor commented 1 year ago

Hello @Ovilia, I was taking a look at this issue and would be interested in working on it. However, I am not quite certain whether this is actually a bug or a lack of a feature. As far as I can see, it is not possible to configure the position of edge labels directly. The labelLayout function seems to have some effect on the edge labels as well, but the x and y position do not affect the edge labels, only the dx and dy properties (unsure whether this is intentional).

Maybe I am missing something, but it does not seem like an easy task to me. Making edge labels draggable would probably be doable but this would not be particularly useful if you couldn't save and restore a label's position in the graph.