yoheinakajima / prettygraph

An experimental UI for text-to-knowledge-graph generation
MIT License
591 stars 40 forks source link

[BUG] Cannot set properties of undefined (setting 'color') #6

Open JoieStark opened 3 weeks ago

JoieStark commented 3 weeks ago

Hi, I have test the code and find a bug, it probably in the file index.html lin 97

cy.elements().remove(); // Assign colors to nodes and edges data.nodes.forEach(node => { node.data.color = colors[colorIndex % colors.length]; colorIndex++; });

the log show that

TypeError: Cannot set properties of undefined (setting 'color') at (index):97:41 at Array.forEach () at (index):96:32