简体   繁体   English

ArangoDB Graph Viewer选项:使用多个属性进行标签

[英]ArangoDB Graph Viewer Options: Label using more than one attribute

In Arango's Game of Thrones example dataset, they show a graph view where character nodes are labeled with two attributes: name and surname. 在Arango的《权力的游戏》示例数据集中,它们显示了一个图形视图,其中角色节点被标记了两个属性:名称和姓氏。 How is this done? 怎么做?

Arango graph viewer example with Game of Thrones character data 具有权力游戏角色数据的Arango图形查看器示例

The help doesn't explain it. 帮助没有解释。

Graph Viewer Options 图表查看器选项
Nodes Options Menu: 节点选项菜单:
Label (string): Nodes will be labeled by this attribute. 标签(字符串):节点将用此属性标记。 If node attribute is not found, no label will be displayed. 如果未找到节点属性,则不会显示标签。

That makes it sound like only a single attribute can be used, yet their example shows the use of two attributes. 这听起来好像只能使用一个属性,但是他们的示例显示了两个属性的使用。

Luckily it's ArangoDB open source, so it's possible to achieve it and quite easily 幸运的是,它是ArangoDB开源的,因此可以很容易地实现它

here's quick and dirty commit adding such a functionality 这是添加此类功能快速而肮脏的提交

to test it, not deploying it into production as it can cause unexpected security issues 进行测试,而不是将其部署到生产中,因为它可能会导致意外的安全问题

clone on linux https://github.com/pavelsevcik/arangodb , cd into it, switch branch to feature/graph-viewer-config-labels--quick-and-dirty and run 在Linux上进行克隆https://github.com/pavelsevcik/arangodb ,将其插入cd,将分支切换到feature/graph-viewer-config-labels--quick-and-dirty并运行

cd js/apps/system/_admin/aardvark/APP
npm install
npm run grunt
mv node_modules ..
zip -r ../app.zip .
mv .. /node_modules .

then deploy created js/apps/system/_admin/aardvark/app.zip via services > add service > upload > set mount point to /aardvark 然后通过services > add service > upload >将挂载点设置为/aardvark来部署创建的js/apps/system/_admin/aardvark/app.zip

then change in url _admin/aardvark to aardvark and test it 然后将网址_admin/aardvark更改为aardvark并对其进行测试

here's Feature Request: Support of multiple attributes for displaying labels in Graph Viewer 这是功能请求:支持多种属性以在Graph Viewer中显示标签

The Graph Viewer does not support multiple attributes for displaying labels. Graph Viewer不支持用于显示标签的多个属性。

I took a screenshot of the graph without any labels and edited it in Paint.NET, that's the whole secret. 我拍摄了没有任何标签的图形屏幕截图,并在Paint.NET中对其进行了编辑,这就是全部秘密。 This was for full control about the font face, size and placement. 这是为了完全控制字体的外观,大小和位置。 This combination was the easiest way to do it when I wrote the AQL tutorial . 当我编写AQL教程时,这种组合是最简单的方法。

Feel free to open a feature request on GitHub nonetheless. 仍然可以在GitHub上打开功能请求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM