Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
11-26-2019 10:52 PM
This is the question I get asked more often: Can I color nodes in Neo4j Desktop and Bloom according to their properties?
Would you recommend this solution from stackoverflow or only under certain conditions?
11-27-2019 01:21 AM
For quick visualisations I use virtual nodes and relationships as described in your screenshot – this is not only great for colouring things differently, but also to collapse data to a more comprehensible presentation.
E.g. in a finance related DB I have accounts and payments as separate nodes like (Account)-[has sent]->(Payment)-[has received]->(Account) but presenting it it is easier to show (Account)-[payment]->(Account).
Another angle is to look at Labels, and if there is a need to colour nodes differently in presentation, it might call for "upgrading" the property in question to a Label?
E.g. in my database all transactions have a Transaction label, but also a "TransactionType" label.
11-27-2019 10:47 AM
I needed to do the same for my problem and I ended up with two alternative solutions:
match (n:Person)
with distinct n.gender as gender, collect(distinct n) as persons
call apoc.create.addLabels(persons, [apoc.text.upperCamelCase(gender)]) yield node
return *
community
property determines the color of the node.The first one is easier as you don't need another tool.
11-29-2019 01:56 PM
For Bloom, stay tuned for the upcoming version
11-29-2019 02:21 PM
Is this gonna be a Christmas present? Or do we have to be patient until 2020?
12-19-2019 12:28 AM
Unfortunately in early 2020.
02-19-2021 03:54 AM
I have something like the following:
match (n) detach delete n;
LOAD CSV WITH HEADERS FROM 'file:///data-assets.csv' AS data
Create (:Data {id: data.Id, dataName: data.Name, dataType: data.Type});
LOAD CSV WITH HEADERS FROM 'file:///data-links.csv' AS links
match (d1:Data {id:links.Source}), (d2:Data {id:links.Target})
CREate (d1)-[:Feeds]->(d2);
And I fail to connect it to your solution here. Any tips?
03-03-2021 01:38 AM
@shan this is amazing, I worked it out using a gds.wcc.create algorithm output.
My followup question is this: given I have tens of distinct communities, colors of all nodes hasn't changed, even when I see that the label is registered successfully
MATCH (n:`cluster_47`) RETURN n LIMIT 25
what am I doing wrong?
All the sessions of the conference are now available online