ArangoDB:Graph Viewer

时间:2017-10-09 15:02:09

标签: arangodb

我有一个'总统'系列:

{"_key": "1", "name": "George Washington"},
{"_key": "2","name": "John Adams"},
{"_key": "3", "name": "Thomas Jefferson"},
{"_key": "4", "name": "James Madison"}

和边缘集合'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"}

如果我将这些导入Graph Viewer,我会得到以下结果: Graph without labels

这不是很有用。我想要的是这样的: Graph with labels

有没有办法在Graph Viewer中执行此操作?最好使用AQL命令?

1 个答案:

答案 0 :(得分:2)

您可以使用图表查看器来实现此目的:

1。)创建图表

边缘定义“ presidents_relations ”和来自&收藏为“总统

enter image description here

2.修改显示设置

打开图形显示设置菜单(右上方菜单图标)并进行设置 节点标签为“ name ”,边缘标签为“ linkType ”。按“保存”按钮应用这些设置。

enter image description here

目前无法实现仅AQL解决方案,但未来可能会包含该解决方案。