apache / echarts

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

[Bug] 图标类型为graph-circular-layout,设置数据系列属性后,鼠标移入显示数据与分类不匹配 #18218

Open defineconst opened 1 year ago

defineconst commented 1 year ago

Version

5.4.1,5.2.2

Link to Minimal Reproduction

https://echarts.apache.org/examples/zh/editor.html?c=graph-circular-layout&version=5.0.0

Steps to Reproduce

myChart.showLoading(); $.getJSON(ROOT_PATH + '/data/asset/data/les-miserables.json', function (graph) { myChart.hideLoading(); graph.nodes.forEach(function (node) { node.label = { show: node.symbolSize > 30 }; }); option = { title: { text: 'Les Miserables', subtext: 'Circular layout', top: 'bottom', left: 'right' }, tooltip: {}, legend: [ { data: graph.categories.map(function (a) { return a.name; }) } ], animationDurationUpdate: 1500, animationEasingUpdate: 'quinticInOut', series: [ { name: 'Les Miserables', type: 'graph', layout: 'circular', circular: { rotateLabel: true }, data: graph.nodes, links: graph.links, categories: graph.categories, roam: true, label: { position: 'right', formatter: '{b}' }, lineStyle: { color: 'source', curveness: 0.3 }, focusNodeAdjacency: true, } ] }; myChart.setOption(option); });

Current Behavior

设置focusNodeAdjacency: true之后,对于图例ABCDE,当数据移入后显示的数据与实际数据不匹配,始终都是一个分类

Expected Behavior

设置focusNodeAdjacency: true之后,移入到A上,显示A分类数据,移入到B上,显示B分类数据........

Environment

- OS:win10
- Browser:chrome
- Framework:
示例有BUG,如下,加入:focusNodeAdjacency: true
https://echarts.apache.org/examples/zh/editor.html?c=graph-circular-layout&version=5.0.0

Any additional comments?

No response

Ovilia commented 1 year ago

目前表现是符合预期的,focusNodeAdjacency 的意思是高亮和当前组有边的数据

defineconst commented 1 year ago

鼠标移动到图例ABCDEFGHI上,不是移动到chart图上。

defineconst commented 1 year ago

https://img2023.cnblogs.com/blog/37018/202302/37018-20230201223340385-797645323.png

defineconst commented 1 year ago

20230201222047

defineconst commented 1 year ago

鼠标移到A,下面显示A分类的节点,移动到B,显示B分类的节点.......,目前移动到ABCDEFGHI,都是显示同一个分类的节点。

Ovilia commented 1 year ago
image

移动到 A 显示的是这样,没有问题。例子在这里

liect commented 1 year ago

+1

y879406454 commented 11 months ago
image

移动到 A 显示的是这样,没有问题。例子在这里 可以试试把鼠标悬浮在C,D,E,F...其他的图例上,图表高亮的部分不会发生变化;