Incubator-echarts: Force layout - Mirror edgeLabel problem

Created on 10 Jun 2019  ·  8Comments  ·  Source: apache/incubator-echarts

Version

4.2.0-rc.2

Reproduction link

https://gallery.echartsjs.com/editor.html?c=xUhc8bMDbM&v=1

Steps to reproduce

Force layout - Mirror edgeLabel problem

  1. open the link of reproduction.
  2. drag the node which name is "父" (Father)
  3. see the edge Label, it show '父子'at first, but when you drag the node around, the mirror edge label will show '子父', but it should be '父子'

What is expected?

What ever you drag the node to anywhere, the edge label will still show 父子, instead of 子父' (read from source: 子 to the target : 父).

What is actually happening?

the mirror edge label show 子父


Because of reading habit, is from left to right, so this problem might make some people confuse the information is correct or not.


en new-feature graph wontfix

Most helpful comment

OK, I get it, you may misplace 'What is expected' and 'What is actually happening'.

All 8 comments

Hi! We've received your issue and please be patient to get responded. 🎉
The average response time is expected to be within one day for weekdays.

In the meanwhile, please make sure that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer.

Have a nice day! 🍵

Sorry, I couldn't reproduce it, the edge label is always '父子', but I'm using the latest version, maybe you should try version 4.2.1?

@susiwen8 Hi, maybe I use photo will let you easier to understand

Snipaste_2019-06-10_17-57-49
This photo show 曾國荃 link to 曾國藩, edge Label is 兄弟 which is I want.
( '弟' is closer to '曾國荃')

Snipaste_2019-06-10_17-57-26
But this one, the edge label '弟' is closer to '曾國藩', but '曾國藩' is should be closer to '兄'

@susiwen8
Is there any option can make the edgeLabel position is fixed(maybe just always show the label at one side) ?

OK, I get it, you may misplace 'What is expected' and 'What is actually happening'.

@susiwen8
Is there any option can make the edgeLabel position is fixed(maybe just always show the label at one side) ?

@DieYiSu From docs, there is none,
This is a new feature rather than bug.

  1. Mirror label is little tricky, especially for non chinese speaking user. For example 'father and son' to 'son and father'
  2. edgeLabel position we may look into it.

so currently this problem looks like doesn't have the solution ? thanks

Currently, I believe this is not possible with ECharts. And I think this is not a frequently used feature so I guess it should not be a new feature.
But for your particular need, I think you need to change the source code by yourself if you insist on this feature. Basically, you need to change the rotate of edge label. It may be related to src/chart/graph but I'm not sure. I'm afraid that's all I can help.

Was this page helpful?
0 / 5 - 0 ratings