dynamicData = {
if (!this) {
return {
nodes: [],
links: []
}
}
let color = nodeColor || "black"
let len = this.nodes.length
if (this.nodes.length > 0) {
let randomNode = this.nodes[0];
console.log(randomNode)
this.nodes.push({id: len, color, x: randomNode.x, y: randomNode.y})
this.links.push({source: randomNode.id, target: len, value: 1})
} else {
this.nodes.push({id: len, color})
}
return this
}