今天在调用neo4j大数据服务接口的时候,写前台图展示效果的时候,出现了这个错误。

本来正确展示的效果,大致如下图所示:

can not create edge 'e0' with unspecified source解决方案

但是出现了下面的错误

can not create edge 'e0' with unspecified source解决方案

问题是:不能创建指定的源‘e0’

我这个问题是因为:cytoscape.js这个js插件中对于图效果展示的时候,内定了节点的标记id,和关系的关键字

我使用的是:

can not create edge 'e0' with unspecified source解决方案can not create edge 'e0' with unspecified source解决方案

can not create edge 'e0' with unspecified source解决方案

所以才会出现上述的错误

内定的关键字是:id,source,target

can not create edge 'e0' with unspecified source解决方案

改成这样子就不会有问题了

can not create edge 'e0' with unspecified source解决方案

这几天写这种图数据库的前台页面展示,在网上搜寻了一番,好像搜来搜去,也只是一个人的博客,虽然,我就是按照这个人博客,做出来的demo,但是确实发现了好多读者会产生的疑问。

所以决定,等我做出来动态化显示模型的图数据展示,我会将neo4j借助cytoscape.js插件的具体流程和细节展示给大家,相互交流和学习。

相关文章: