When G6 graphics interacts, an error e.addEdge is not a function is reported.

Error message, as shown in the figure:

ask

nodes: [

{

id: 1, // Change it to id: '1' and it will be solved

label: 'Initiated by Beijing and Hangzhou'

}

],

edges: [

{

id: 'edge1',

target: 'node2',

source: 'node1'

}

]

The fundamental point of the question is that the Id in nides and edges must be of type String

Does it feel very simple? Or should you read more API documentation?

Guess you like

Origin blog.csdn.net/weixin_49336005/article/details/128645460