[Question] HowTo to make a color of link relative to src or target node color
What problem does this feature solve?
Hi. I want to make edge color relative to the target (or source) node. Nodes color is dynamically set by echarts based on the theme. How can I do a config like this :
series-graph.links.lineStyle.color: {source}
Or
series-graph.links.lineStyle.color: {target}
What does the proposed API look like?
If no option exists currently,
series-graph.links.lineStyle.color: {source}
Or
series-graph.links.lineStyle.color: {target}
Like as legend items and nodes colors are related
is this what you want - Demo Code ?
please close issue if problem solved
Not exactly.
In the attached image, Each category of node is in the same color as the corresponding legend item. Node category color as well as legend item color are automatically set by echarts according to the chosen theme. They are NOT set via itemStyle option. What I need is a way to indicate a category for a link, so that its color can be set by echarts according to the theme and with the same value as the nodes et legends items sharing the same category. Specifically I want each link to have the same categoy as the target node. For instance, ':THING', ':CLASS', ':SYSTEM-CLASS', ':STANDARD-CLASS', etc are nodes with the same 'SUPER-TYPES' category, which is the name of the corresponding legend item. On this base, echarts sets the same color for these nodes and the corresponding legend item (when selected). But unfortunately, it seems to be no way to indicate a category for links. How can I tell echarts that the corresponding links with the same label as the legend item name must have the same color as the target nodes ':THING', ':CLASS' etc..
The result will be a more easily readable graph, when a lot of nodes are selected
This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.
This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!