graph - ArangoDB,如何显示图表?

标签 graph arangodb

我是 arangoDB 新手。我创建文档集合“sitetestcom”和边缘集合“链接”。在 ArangoDB Web 界面中,我将图形查看器配置与顶点集合设置为 sitetestcom,将边缘集合设置为链接。但没有显示任何图形,只有 2 个顶点

Arango Graph Viewer

如何显示图表?

预先感谢您的帮助。

集合:sitetestcom,类型:文档

[ { "_id" : "sitetestcom/4156515209", "_rev" : "4156515209", "_key" : "4156515209", "url" : "http://sitetest.com/sentimancho", "titre" : "Sentimancho " }, { "_id" : "sitetestcom/4144718729", "_rev" : "4144718729", "_key" : "4144718729", "url" : "http://sitetest.com/infogerance", "titre" : "Infogérance " }, { "_id" : "sitetestcom/4153107337", "_rev" : "4153107337", "_key" : "4153107337", "url" : "http://sitetest.com/category/annuaire", "titre" : "Annuaire " }, { "_id" : "sitetestcom/4146946953", "_rev" : "4146946953", "_key" : "4146946953", "url" : "http://sitetest.com/creation-site", "titre" : "Création site" }, { "_id" : "sitetestcom/4154876809", "_rev" : "4154876809", "_key" : "4154876809", "url" : "http://sitetest.com/jardinchic", "titre" : "JardinChic " }, { "_id" : "sitetestcom/4151993225", "_rev" : "4151993225", "_key" : "4151993225", "url" : "http://sitetest.com/category/non-classe", "titre" : "Non classé " }, { "_id" : "sitetestcom/4128924553", "_rev" : "4128924553", "_key" : "4128924553", "url" : "http://sitetest.com/", "titre" : "Référencement " }, { "_id" : "sitetestcom/4135871369", "_rev" : "4135871369", "_key" : "4135871369", "url" : "http://sitetest.com/infogerance/", "titre" : "Infogérance " }, { "_id" : "sitetestcom/4140589961", "_rev" : "4140589961", "_key" : "4140589961", "url" : "http://sitetest.com/hebergement-mutualise", "titre" : "Hébergement mutualisé " }, { "_id" : "sitetestcom/4145046409", "_rev" : "4145046409", "_key" : "4145046409", "url" : "http://sitetest.com/developpeur-wordpress", "titre" : "Développeur WordPress " }, { "_id" : "sitetestcom/4131152777", "_rev" : "4131152777", "_key" : "4131152777", "url" : "http://sitetest.com/blog-devenir", "titre" : "" }, { "_id" : "sitetestcom/4139541385", "_rev" : "4139541385", "_key" : "4139541385", "url" : "http://sitetest.com/contact", "titre" : "Contact " }, { "_id" : "sitetestcom/4135543689", "_rev" : "4135543689", "_key" : "4135543689", "url" : "http://sitetest.com/creation-site/", "titre" : "Création site" }, { "_id" : "sitetestcom/4148257673", "_rev" : "4148257673", "_key" : "4148257673", "url" : "http://sitetest.com/serp-domination", "titre" : "SERP Domination " }, { "_id" : "sitetestcom/4150682505", "_rev" : "4150682505", "_key" : "4150682505", "url" : "http://sitetest.com/category/portfolio", "titre" : "portfolio " }, { "_id" : "sitetestcom/4130759561", "_rev" : "4130759561", "_key" : "4130759561", "url" : "http://sitetest.com/extension-magento-gestion-stocks", "titre" : "Extension Magento gestion des stocks " }, { "_id" : "sitetestcom/4149699465", "_rev" : "4149699465", "_key" : *"4149699465", "url" : "http://sitetest.com/devis-audit-referencement", "titre" : "Devis Audit Réferencement " }, { "_id" : "sitetestcom/4150027145", "_rev" : "4150027145", "_key" : "4150027145", "url" : "http://sitetest.com/offre-tout-compris", "titre" : "Offre tout compris " }, { "_id" : "sitetestcom/4140262281", "_rev" : "4140262281", "_key" : "4140262281", "url" : "http://sitetest.com/portfolio-large", "titre" : "Portfolio " }, { "_id" : "sitetestcom/4155401097", "_rev" : "4155401097", "_key" : "4155401097", "url" : "http://sitetest.com/communique-de-presse", "titre" : "Communiqué de presse " }, { "_id" : "sitetestcom/4150354825", "_rev" : "4150354825", "_key" : "4150354825", "url" : "http://sitetest.com/referencement", "titre" : "Référencement" }, { "_id" : "sitetestcom/4148585353", "_rev" : "4148585353", "_key" : "4148585353", "url" : "http://sitetest.com/netlinking", "titre" : "Netlinking " }, { "_id" : "sitetestcom/4154155913", "_rev" : "4154155913", "_key" : "4154155913", "url" : "http://sitetest.com/informatique", "titre" : "Informatique " }, { "_id" : "sitetestcom/4153631625", "_rev" : "4153631625", "_key" : "4153631625", "url" : "http://sitetest.com/immobilier", "titre" : "" }, { "_id" : "sitetestcom/4135216009", "_rev" : "4135216009", "_key" : "4135216009", "url" : "http://sitetest.com/referencement/", "titre" : "Référencement" }, { "_id" : "sitetestcom/4130431881", "_rev" : "4130431881", "_key" : "4130431881", "url" : "http://sitetest.com/cables", "titre" : "cables" } ]*

集合:链接,类型:边缘

[ { "_id" : "linking/4153435017", "_rev" : "4153435017", "_key" : "4153435017", "_from" : "sitetestcom/4131152777", "_to" : "sitetestcom/4153107337", "what" : 1 }, { "_id" : "linking/4155204489", "_rev" : "4155204489", "_key" : "4155204489", "_from" : "sitetestcom/4140262281", "_to" : "sitetestcom/4154876809", "what" : 1 }, { "_id" : "linking/4154483593", "_rev" : "4154483593", "_key" : "4154483593", "_from" : "sitetestcom/4140262281", "_to" : "sitetestcom/4154155913", "what" : 1 }, { "_id" : "linking/4152320905", "_rev" : "4152320905", "_key" : "4152320905", "_from" : "sitetestcom/4130759561", "_to" : "sitetestcom/4151993225", "what" : 1 }, { "_id" : "linking/4151206793", "_rev" : "4151206793", "_key" : "4151206793", "_from" : "sitetestcom/4130431881", "_to" : "sitetestcom/4150682505", "what" : 1 }, { "_id" : "linking/4153959305", "_rev" : "4153959305", "_key" : "4153959305", "_from" : "sitetestcom/4140262281", "_to" : "sitetestcom/4153631625", "what" : 1 }, { "_id" : "linking/4155728777", "_rev" : "4155728777", "_key" : "4155728777", "_from" : "sitetestcom/4148585353", "_to" : "sitetestcom/4155401097", "what" : 1 }, { "_id" : "linking/4156842889", "_rev" : "4156842889", "_key" : "4156842889", "_from" : "sitetestcom/4151993225", "_to" : "sitetestcom/4156515209", "what" : 1 } ]

最佳答案

我将您的集合导入到 ArangoDB 中。
请注意:文档集合不是有效的 JSON,因为数据中有一些星号 *,必须先将其删除。

针对当前的问题。

当您单击图表菜单时,您可以选择集合或图表,下面是一个“高级”框。如果您单击它,它将打开一个表单。有一些初始设置,您可以更改它们。 现在,无需更改此处的任何内容,单击开始
您可能会看到一个顶点或一个空图。别担心。

默认情况下,图形查看器在开始时显示随机顶点,但您可以通过单击图形窗口右上角的“过滤器”图标来选择特定顶点。

单击此图标。
在现在应该出现的过滤器表单上,单击属性名称列表框并选择_key
属性值字段中,复制并粘贴此键:4140262281(这是附加到问题的文档集合中的顶点键)。
您现在应该已经得到一个由该顶点和其他 3 个顶点组成的小图,并通过边连接。

现在,如果您的数据有更多连接,您将能够单击顶点,任何连接的顶点也会显示出来。

您在上面的屏幕截图中只看到两个顶点的原因是,没有更多的边将其他顶点连接到这些顶点。

尝试在过滤器中输入顶点键(来自屏幕截图):4130431881。您应该再次只获得这两个。

现在,假设您想将此顶点连接到我之前向您展示的顶点。

  1. 打开集合,进入链接集合并点击右上角的+按钮,以创建新的边缘文档。
  2. 创建边缘:
    _from字段中输入:sitetestcom/4140262281
    _to字段中输入:sitetestcom/4130431881
    点击创建。

现在返回图形查看器并启动图形:再次按 _key == 4140262281 过滤。

您现在应该可以看到 4140262281 顶点和新连接的 4130431881 顶点。

现在,如果您单击 4140262281 顶点,则应显示其连接的顶点 4150682505

最后,为了给顶点一个更加用户友好的命名(我采用了你的titre属性),单击过滤器旁边的滚轮按钮,然后单击“vertices”-“label” '。 将 _key 条目替换为 titre 并点击更改

您现在应该看到顶点的标题而不是 _key。

希望有所帮助。

另请观看来自 Michael 的信息丰富的截屏视频,他编写了图表查看器:https://www.youtube.com/watch?v=ASR7AX4bWjA

关于graph - ArangoDB,如何显示图表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23684181/

相关文章:

database - Neo4j read_only 不起作用

python-3.x - 我应该在哪里修改广度优先搜索算法以找到 2 个节点之间的最短路径?

arangodb - 查询数组的 ArangoDB

java - AQL-在 Arangodb 中可以实现预期连接以及如何实现?

ArangoDB uniqueVertices 全局不包括第一个和最后一个顶点

python - 如何在网络风格的 Plotly 图中设置单独的线宽(Python 3.6 | plot.ly)?

python - 在 Networkx 中映射两个图

api - 时间线图-如何处理“时间间隔”?

raspberry-pi - "moSTLy-memory"是什么意思?

database - 如何使用 VelocyPack (VPack) 在 ArangoDB 中存储图像?