echarts icon indicating copy to clipboard operation
echarts copied to clipboard

Add labels to Tree series chart lines

Open rgomesf opened this issue 7 years ago • 12 comments

One-line summary [问题简述]

This is a feature request. Add the option to see labels in the lines of the Tree series chart.

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]:
  • Browser version [浏览器类型和版本]:
  • OS Version [操作系统类型和版本]:

Expected behaviour [期望结果]

ECharts option [ECharts配置项]

option = {

}

Other comments [其他信息]

rgomesf avatar Nov 06 '18 15:11 rgomesf

HI @rgomesf , can you post a shot of the example you request.

pissang avatar Nov 09 '18 04:11 pissang

Hi @pissang . Sure. Here you go

capture

Be able to format the lines as arrow would also be a nice feature.

rgomesf avatar Nov 09 '18 11:11 rgomesf

也想知道Echarts目前能不能实现这个功能

wangzhengbo avatar May 16 '19 01:05 wangzhengbo

+1

This would be a useful feature. Is there any timeline for when this will be available?

saadzah avatar Oct 30 '19 11:10 saadzah

@rgomesf hi, I would like to know how you add arrows in tree series chart, would you mind share the code ?

seekei avatar Aug 17 '20 12:08 seekei

Is this feature available or not?

mitpatel007 avatar Jun 10 '21 09:06 mitpatel007

+1

wuliupo avatar Feb 28 '22 08:02 wuliupo

Just wanted to throw this would also be valuable for me. I have a use case representing a taxonomy as a tree and it would be useful to add labels to the edges between parents and children to distinguish different types

alexresolute avatar Aug 22 '22 22:08 alexresolute

+1 for supporting edgeLabel in tree.

tobegit3hub avatar Nov 24 '22 09:11 tobegit3hub

+1

egoipse avatar Nov 13 '23 20:11 egoipse

+1

ioachim-hub avatar Jan 14 '24 13:01 ioachim-hub

I found a workaround! :) I hope it is good enough for you all.

image

I made the relationships to be nodes and I set the symbol of those nodes to "none".

Here is my chartOption data: { "name": "somenodelabel", "children": [ { "name": "somelinelabel", "symbol": "none", "collapsed": false, "children": [ { "name": "somenodelabel", "collapsed": false, "children": [] }, { "name": "somenodelabel", "collapsed": false, "children": [] } ] } ] }

Regarding the arrow at the end of the line, the only workaround I can think of is to create your own node symbol (property "symbol", png file is supported), you could therefore create for example a circle with a preceding arrow and if angle is a problem there is also a parameter for that ("symbolRotate").

lpennec avatar Feb 07 '24 08:02 lpennec