Neo4j 2.0.1 graphstyle.grass for multiple shortcuts

I have complicated settings for nodes with multiple labels.

My graphstyle.grass file looks like this:

node {
  diameter: 40px;
  color: #aaaaaa;
  border-color: #888888;
  border-width: 1.5px;
  text-color-internal: #000000;
  caption: '{name}';
  font-size: 12px;
}

node.foo {
  color: #aaaaff;
}

node.bar {
  color: #aaffaa;
}

node.bar.a {
  border-color: #ff0000;
}

node.bar.b {
  border-color: #0000ff;
}

So the intention here is that if you have a label “bar”, the color of the node is colored in a certain way, if you also have an additional label “a” or “b”, your border will be colored accordingly. My CSS knowledge is weak, but I think it's traditional, like several class selectors.

The behavior that I see on the graphical graph of the Neo 2.0.1 browser is that if a node has several labels, it selects the first shortcut, tries to find the node.first_label selector in the grass file, if it does not find it, it simply adds for him a new selector. So, two specific examples:

  • node ['bar', 'a'] ( ), Neo4j node.bar , . .. 'node.bar.a' .
  • node ['a', 'bar'] ( ), Neo4j 'node.a' .

.

+4
2

, . Neo4j 2.0.1, . ( ) .

: 2.2, , .

+1

Alchemy SVG + CSS dataviz? ( GraphJSON) - http://neo4j.com/developer/guide-data-visualization/#_library_alchemy_js_open_source_graph_visualization

http://graphalchemist.imtqy.com/Alchemy/#/docs : " CSS , . , SVG/CSS, , . svg , , edgeTypes nodeTypes. css, css . css , "

CSS , SVG CSS-, , , , , ,

, Alchemy ( SVG) . ( node), - ( , Neo4j ). , , Popoto.js(http://www.popotojs.com/), D3

0

Source: https://habr.com/ru/post/1529082/


All Articles