apache / echarts

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

[Feature] I'd like to make a legend according to the data links instead of data nodes in my graph #18916

Open gumna99 opened 1 year ago

gumna99 commented 1 year ago

What problem does this feature solve?

As title, in my graph, I'd like to make a legend according to the data links instead of data nodes. I couldn't find any parameter to achieve this. Setting my data links value as a categories of legend, so I could click certain links value, and show all nodes connected by certain links.

this is my data link as below: "nodes":[...] "links":[ 0:{ "source":"JIO1" "target":"UPD6" "value":[ 0:"data flow (low speed)" ] "lineStyle":{ "color":"lightblue" } "label":{ "show":true "fontSize":10 "formatter":"{c}" } }, 1:{ "source":"JIO1" "target":"UPD4" "value":[ 0:"control flow" ] "lineStyle":{ "color":"thistle" } "label":{ "show":true "fontSize":10 "formatter":"{c}" } }........

What does the proposed API look like?

I'm not sure. maybe, legend > Style =links > .........

helgasoft commented 3 days ago

see Demo in #20274 for possible solution to similar problem