Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
05-07-2021 11:02 PM
I'm displaying nodes with 3 properties using a grass file. Everything is displaying, but I'd like a line feed between the properties displayed in the caption to get uniformity. Since the text length varies, the wrapping is inconsistent. I've tried
, \n, \r but they just show up as text.
Here's the grass element ...
node.Person {
color: #569480;
border-color: #447666;
text-color-internal: #FFFFFF;
defaultCaption: "<id>";
caption: "{fullname} [{RN}] {tgs}";
diameter: 100px;
}
I'd like the line feed between the fullname , RN and tgs properties.
Thanks!
Dave
05-15-2021 12:41 PM
this is eventually rendered by the browser, so you might try
<br>
interesting side note, if you put a url address into the label (without adding the <a href=) they become clickable links... something in the rendering process recognizes them and adds the <a href..
05-24-2021 08:47 PM
did not work. It shows up as text. Still looking for a solution!
05-28-2021 12:18 PM
Ok, so I spent some time trying all the things I could think of but I was unable to cajole the neo4j browser to render a new line, I also observe this is a somewhat futile endeavor anyway, since the text is clipped by the circle. Note, sometime back I spent considerable time trying to disable that circle clipping behavior, and could not find a clean way around it. Today I render interesting graphs using a flask backend and render the graph with cytoscape.js in the UI. Both clipping and new lines are easier to deal with when using cytoscape.js.
If you really (really) want it in the neo4j browser, the code is open source
so
Personally I have found that using cytoscape.js (or other viz library) is faster, easer and a more practical approach than those options though.
02-27-2022 02:26 PM
Hi
I looked at the html generated by the neo4j browser. The text to be displayed is inside a text tag, which is inside a g tag, which is inside an svg tag. However only the text that can fit is actually included inside the html, so it appears that you cannot trick the browser into displaying more than one line. The really weird thing is that I have seen some nodes where the text is displayed in two lines.
Phil
All the sessions of the conference are now available online