Documentation of :style?

(Rsworden59) #1

The styles in Neo4j Browser (I use Mac) seem to have changed over time, and old training materials and documentation don't seem to be accurate anymore. Where is it currently documented? It does not seem to be in the Operations Guide, the Cypher guide, or anywhere else I have looked. Here are some of the issues and questions I would like to understand:

  1. In the past there was a place to drag a .grass file into the popup of a node. That doesn't exist anymore. There is an area to chose node size, color etc. manually. Any way to import into that? Any way to copy styles between nodes?

  2. In a recent upgrade the colors one can pick changed... colors I used in the past went away. Yet nodes I had previously colored kept their old colors. So now I have a mish-mash and no way to fix it other than changing all old node types to use the new colors.

  3. The :style keyword displays all the current styles. I can save that as a .grass file. If I edit that file, I do not see how to import it. Someone said to drag it into the top browser window. That pastes it there, but when I run it I get a syntax error.

  4. I've also tried entering small parts of a .grass file into the window, and always get syntax error.

  5. I tried prefacing all the .grass info with ":style " and entering it in the window but that doesn't help.

  6. Someone said you can import it from a URL. They had put a .grass file on a web server. Not wanting to do that, I tried a local URL like "file://~/Downloads/my.grass" but that got the same error. Should that work?

  7. ":style rest" clears out all the styles. :style then says "No style generated or set yet. Run a query and return a few nodes and relationships to generate some styling." After running a basic query there are indeed some default styles loaded. Where is it getting the defaults? Are they in a file somewhere that I can influence?

  8. Where are custom styles I set persisted? Obviously they are saved from session to session. I'm not finding a .grass file saved somewhere. All this experimenting has lost the styles I had set. I could restore them from backups... if I knew where they were.

(Rsworden59) #2

The "one line hack" method does not seem to be working. I can get :style to execute a minimal command:

:style node.EFSDirectory { defaultCaption: ""}

but not any structures with multiple options (I tried various deliimters):

:style node.EFSDirectory { defaultCaption: ""; text-color-internal: #604A0E;}

And since :style seems to do a total replacement, I don't see how to load a custom set of styles... all I can do is :style reset, and then manual styling by hand with the mouse.

What am I missing?

(Rsworden59) #3

OK, I found where to import .grass files: in the Favorites tab, Import window. Odd place, but OK, that works.

Now where does the Browser persist what I imported? If I know that, maybe I can restore that data from my backup from before it got damaged.