neo4j browser display nodes as images

1,580 views
Skip to first unread message

koen

unread,
Dec 26, 2016, 9:50:34 AM12/26/16
to Neo4j
Hi, i a recent post of Rik i saw that starting with neo4j 3.1 you can display a picture / icon representing a node in the browser _i.s.o. the circle)  ,, where is it documented how to do that ?

thanks koen

Tom Zeppenfeldt

unread,
Dec 26, 2016, 9:53:02 AM12/26/16
to ne...@googlegroups.com
Koen,

are you referring to this tweet of by Rik ?  https://twitter.com/rvanbruggen/status/804407817952174084


On 26 Dec 2016, at 15:50, koen <kdwykl...@gmail.com> wrote:

Hi, i a recent post of Rik i saw that starting with neo4j 3.1 you can display a picture / icon representing a node in the browser _i.s.o. the circle)  ,, where is it documented how to do that ?

thanks koen

--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Koen Kleingeld

unread,
Dec 26, 2016, 9:57:24 AM12/26/16
to ne...@googlegroups.com

2016-12-26 15:52 GMT+01:00 Tom Zeppenfeldt <tomzepp...@gmail.com>:
Koen,

are you referring to this tweet of by Rik ?  https://twitter.com/rvanbruggen/status/804407817952174084

On 26 Dec 2016, at 15:50, koen <kdwykl...@gmail.com> wrote:

Hi, i a recent post of Rik i saw that starting with neo4j 3.1 you can display a picture / icon representing a node in the browser _i.s.o. the circle)  ,, where is it documented how to do that ?

thanks koen

--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Neo4j" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/neo4j/jdHIM_OH8LE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to neo4j+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Groeten / Best Regards,

Koen

koen

unread,
Dec 28, 2016, 3:42:47 AM12/28/16
to Neo4j
hi, any ideas here ? would like to use that functionality too.. adds great value when displaying the graph imho

reg koen

Op maandag 26 december 2016 15:50:34 UTC+1 schreef koen:

Michael Hunger

unread,
Dec 28, 2016, 5:24:22 AM12/28/16
to ne...@googlegroups.com
There is an experimental feature setting in the configuration sidebar. If you check that you have the icons. 



Von meinem iPhone gesendet
--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.

Koen Kleingeld

unread,
Dec 28, 2016, 5:34:48 AM12/28/16
to ne...@googlegroups.com
switched on .. so how do i link images to labels types .. where to store images / icons .. is this already for 3.1 or for a beta of 3.2

To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Neo4j" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/neo4j/jdHIM_OH8LE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to neo4j+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Hunger

unread,
Dec 28, 2016, 5:53:04 AM12/28/16
to ne...@googlegroups.com
It is only a fixed icon set. And the label-icon mapping is done in the grass aka :style config.

There is no custom images / icons and none derived from properties unfortunately.

Michael

Michael Hunger

unread,
Dec 28, 2016, 5:56:38 AM12/28/16
to ne...@googlegroups.com
If you want to, you can patch github.com/neo4j/neo4j-browser

With some code like the attached patch, which I did a while back.

If you have an "image" property on a node it will render it as an svg image

size would come from the "grass" config also the node-size = image size etc.

you can set the size in the code
```    image
+      .attr("x", "-24px")
+      .attr("y", "-24px")
+      .attr("width", "48px")
+      .attr("height", "48px")
```
so if you want 128px or 256px pictures or larger just adopt these numbers

icon.patch
Neo4j (1).jpg

Koen Kleingeld

unread,
Dec 28, 2016, 7:01:54 AM12/28/16
to ne...@googlegroups.com
ok thanks, will try

2016-12-28 11:56 GMT+01:00 'Michael Hunger' via Neo4j <ne...@googlegroups.com>:
If you want to, you can patch github.com/neo4j/neo4j-browser

With some code like the attached patch, which I did a while back.

If you have an "image" property on a node it will render it as an svg image

size would come from the "grass" config also the node-size = image size etc.

you can set the size in the code
```    image
+      .attr("x", "-24px")
+      .attr("y", "-24px")
+      .attr("width", "48px")
+      .attr("height", "48px")
```
so if you want 128px or 256px pictures or larger just adopt these numbers

koen

unread,
Dec 29, 2016, 4:06:12 PM12/29/16
to Neo4j
with some help from rik i learned that when you click on a label in the browser (with experimental switched on) you can select the type of icon image (from a few samples) that is displayed ... making it user configurable what kind of image is displayed would be a nice addition


Op maandag 26 december 2016 15:50:34 UTC+1 schreef koen:
Hi, i a recent post of Rik i saw that starting with neo4j 3.1 you can display a picture / icon representing a node in the browser _i.s.o. the circle)  ,, where is it documented how to do that ?

thanks koen

Michael Moore

unread,
May 28, 2017, 6:28:38 AM5/28/17
to Neo4j
Here's a version of the init.coffee that works with the latest 3.2 browser version - 

provides a neo4j node with an image overlay

goes here:

src/browser/modules/D3Visualization/lib/visualization/renders/init.coffee


builds on Michael's patch, with some nice circle clipping formatting to fit the image in the default large node size (80px).

Selects a node property named image_url as in:
 SET n.image_url ="http://my_node_image.png"

-Michael
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Neo4j" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/neo4j/jdHIM_OH8LE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to neo4j+un...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Groeten / Best Regards,

Koen

--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.
node-image.png
init.coffee

Michael Hunger

unread,
May 28, 2017, 9:46:04 AM5/28/17
to ne...@googlegroups.com
Real cool, I wonder if we can add this to an updated variant of https://github.com/jexp/spoon-neo4j

Michael
> <node-image.png><init.coffee>

unreal...@googlemail.com

unread,
May 30, 2017, 8:12:25 AM5/30/17
to Neo4j
I have been wondering for a while whether this was possible in Neo4j. 
Are we likely to see this functionality in main stream Neo4j (requiring no mods) ?
Could this be extended to other 'objects' such as sound and video ?

Wayne
Reply all
Reply to author
Forward
0 new messages