GraphAlchemist / Alchemy

Other
517 stars 232 forks source link

the id of edge #547

Open jiangxiluning opened 9 years ago

jiangxiluning commented 9 years ago

hi, Below is my JSON data: { "nodes": [ { "id": "943774", "labels": [ "User" ], "properties": { "name": "淼淼瑾Yoyo" } }, { "id": "70440", "labels": [ "User" ], "properties": { "name": "火红烟花" } } ], "edges": [ { "id": "1108418", "type": "KINSHIP", "properties": { "mid": "3474329448835642" }, "source": "70440", "target": "943774" } ] }

This is well-formed GraphJSON data. I can succussfully display this graph without add "id" in the edge but failed with "id". what if i have multiple edges with same target and source? It seems "id" makes the alchemy crash. whats your opinion?

thiagomarzagao commented 9 years ago

Same problem here (happens on Chrome, Firefox and Safari; I haven't tested on IE). Everything works fine but if I add ids to the edges then I get this on the JavaScript console:

Uncaught TypeError: Cannot read property '_style' of undefined alchemy.min.js:12 a.svgStyles.edge.updatealchemy.min.js:12 a.EdgeUtils.edgeStylealchemy.min.js:12 (anonymous function)alchemy.min.js:6 (anonymous function)alchemy.min.js:4 Kalchemy.min.js:6 oh.eachalchemy.min.js:12 c.styleLinkalchemy.min.js:12 d.createEdgealchemy.min.js:11 a.startGraphalchemy.min.js:4 (anonymous function)alchemy.min.js:4 (anonymous function)alchemy.min.js:4 b

And nothing gets displayed.