Neo4j中的气泡大小 [英] Bubble size in 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屋!