Neo4j 中的气泡大小 [英] Bubble size in Neo4j

查看:23
本文介绍了Neo4j 中的气泡大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法根据节点属性值调整 Neo4j 中节点的气泡大小(或颜色)?例如,如果每个节点都有一个 size: "xxx" 属性,我如何让每个节点缩放到这个大小?

Is there a way to adjust the bubble size (or colour) of nodes in Neo4j in relation to a node property value? For example, if each node has a size: "xxx" property, how would I make each node scale to this size?

有没有类似的方法来调整关系线?我知道节点和关系都可以同时调整为不同的颜色或大小,但我无法根据它们的属性弄清楚如何做到这一点.

Is there a similar way to adjust relation lines? I know both nodes and relations can be adjusted to different colours or sizes all at once, but I can't figure out how to do this based on their properties.

我尝试创建自定义 GRASS 文件,但发生了奇怪的事情.这是我用的:

I tried creating a custom GRASS file, but weird things happened. This is what I used:

node
{
    diameter: 50px;
    color: #A5ABB6;
    border-color: #9AA1AC;
    border-width: 2px;
    text-color-internal: #FFFFFF;
    font-size: 10px;
}

relationship
{
    color: #A5ABB6;
    shaft-width: 1px;
    font-size: 8px;
    padding: 3px;
    text-color-external: #000000;
    text-color-internal: #FFFFFF;
}

node.person
{
    /* Node diameter is based on value. */
    diameter: {value};
}

当我将它拖放到浏览器中时会出现这个:

And this is what appears when I drag and drop it into the browser:

node {
  diameter: 50px;
  color: #A5ABB6;
  border-color: #9AA1AC;
  border-width: 2px;
  text-color-internal: #FFFFFF;
  font-size: 10px;
}

relationship {
  color: #A5ABB6;
  shaft-width: 1px;
  font-size: 8px;
  padding: 3px;
  text-color-external: #000000;
  text-color-internal: #FFFFFF;
}

node.person {
  /* Node diameter is based on value. */
    diameter: value;
  color: #68BDF6;
  border-color: #5CA8DB;
  text-color-internal: #FFFFFF;
  caption: '{person_name}';
}

; {
}

它不仅添加了标题罐颜色,并忽略了 {value} 变量,而且还在末尾添加了额外的 ;{}.图形窗口中没有显示任何内容.我搞砸了语法,还是这是一个错误?

Not only does it add the caption can colours, and ignore the {value} variable, but it also adds the extra ;{} at the end. Nothing shows up in the graph window. Am I screwing up the syntax, or is this a bug?

推荐答案

neo4j 浏览器可以配置为通过节点标签之一自定义节点,并通过其类型自定义关系.请参阅此处此处 了解两种方法.

The neo4j browser can be configured to customize a node by one of its labels, and to customize a relationship by its type. See here and here for the 2 ways to do that.

但是,浏览器不支持通过属性值进行动态自定义.

However, the browser has no support for dynamic customization by property value.

这篇关于Neo4j 中的气泡大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆