Skip to content

[Bug] When the layout of the echarts diagram is set to 'none' and draggable is set to true, dragging a node twice or more will cause the relationship lines of other nodes to disappear #21642

@RichardDFang

Description

@RichardDFang

Version

6.1.0

Link to Minimal Reproduction

https://echarts.apache.org/examples/zh/editor.html?c=graph

Steps to Reproduce

在官网示例里面对应位置添加draggable:true,点击运行,拖拽其中某个节点几次即可复现

Current Behavior

···js
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: 'Default layout',
top: 'bottom',
left: 'right'
},
tooltip: {},
legend: [
{
// selectedMode: 'single',
data: graph.categories.map(function (a) {
return a.name;
})
}
],
animationDuration: 1500,
animationEasingUpdate: 'quinticInOut',
series: [
{
name: 'Les Miserables',
type: 'graph',
legendHoverLink: false,
layout: 'none',
draggable: true,
data: graph.nodes,
links: graph.links,
categories: graph.categories,
roam: true,
label: {
position: 'right',
formatter: '{b}'
},
lineStyle: {
color: 'source',
curveness: 0.3
},
emphasis: {
focus: 'adjacency',
lineStyle: {
width: 10
}
}
}
]
};
myChart.setOption(option);
});


如上图是官网示例,运行后,拖拽其中某个节点2次及以上,其他关系节点的连接线会逐渐消失

### Expected Behavior

拖拽时,节点间的连接线不消失

### Environment

```markdown
- OS:
- Browser:
- Framework:

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugenThis issue is in EnglishpendingWe are not sure about whether this is a bug/new feature.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions