Skip to content

Sankey chart: Nodes are not connected with edges after dragging  #13866

@paulputter

Description

@paulputter

Version

4.9.0

Reproduction link

https://echarts.apache.org/examples/en/editor.html?c=sankey-simple

Steps to reproduce

Change "series.data" array to "series.nodes" array.

What is expected?

Nodes and edges are connected while dragging the nodes

What is actually happening?

Dragging the nodes "disconnects" them from the edges


Error is in the setNodePosition function. It looks for option.data and not additionally for option.nodes:

setNodePosition: function (dataIndex, localPosition) {
    var dataItem = this.option.data[dataIndex];
    dataItem.localX = localPosition[0];
    dataItem.localY = localPosition[1];
  },

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdifficulty: easyIssues that can be fixed more easily than the average.enThis issue is in Englishtopic: graph

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions