ArangoDB:图形查看器中边和顶点的自定义标签
ArangoDB: Custom labels for edges and vertices in Graph Viewer
我有一个 collection 'presidents':
{"_key": "1", "name": "George Washington"},
{"_key": "2","name": "John Adams"},
{"_key": "3", "name": "Thomas Jefferson"},
{"_key": "4", "name": "James Madison"}
和一条边 collection 'presidents_relations':
{"_from": "presidents/1", "_to": "presidents/4", "linkType": "likes"},
{"_from": "presidents/3", "_to": "presidents/1", "linkType": "likes"},
{"_from": "presidents/2", "_to": "presidents/4", "linkType": "hates"},
{"_from": "presidents/1", "_to": "presidents/2", "linkType": "likes"},
{"_from": "presidents/1", "_to": "presidents/3", "linkType": "hates"}
如果我将这些导入图表查看器,我会得到以下结果:
这不是很有用。我想要的是这样的:
有没有办法在图表查看器中执行此操作?最好使用 AQL 命令?
您可以使用图形查看器实现此目的:
1.) 创建图表
边缘定义“presidents_relations”和从&到集合为“presidents”
2.) 修改显示设置
打开图形显示设置菜单(右上角的菜单图标)并设置
节点标签为“name”,边缘标签为“linkType”。按 "Save" 按钮应用这些设置。
目前无法提供仅 AQL 的解决方案,但将来可能会包含在内。
我有一个 collection 'presidents':
{"_key": "1", "name": "George Washington"},
{"_key": "2","name": "John Adams"},
{"_key": "3", "name": "Thomas Jefferson"},
{"_key": "4", "name": "James Madison"}
和一条边 collection 'presidents_relations':
{"_from": "presidents/1", "_to": "presidents/4", "linkType": "likes"},
{"_from": "presidents/3", "_to": "presidents/1", "linkType": "likes"},
{"_from": "presidents/2", "_to": "presidents/4", "linkType": "hates"},
{"_from": "presidents/1", "_to": "presidents/2", "linkType": "likes"},
{"_from": "presidents/1", "_to": "presidents/3", "linkType": "hates"}
如果我将这些导入图表查看器,我会得到以下结果:
这不是很有用。我想要的是这样的:
有没有办法在图表查看器中执行此操作?最好使用 AQL 命令?
您可以使用图形查看器实现此目的:
1.) 创建图表
边缘定义“presidents_relations”和从&到集合为“presidents”
2.) 修改显示设置
打开图形显示设置菜单(右上角的菜单图标)并设置 节点标签为“name”,边缘标签为“linkType”。按 "Save" 按钮应用这些设置。
目前无法提供仅 AQL 的解决方案,但将来可能会包含在内。