Hi All,
I am trying to show the top 10 node in the graph and below is the query I tried in neo4j browser,
MATCH (p1:Username)-[r:sent]->(p2:Username)
RETURN p1, count(*) AS count
ORDER BY count DESC LIMIT 10
As below image shows the top 10 nodes with their relationship
Similarly I am trying to show the graph using neovis.js and I can able to show the top 10 nodes in the visualization but not sure why the relationships are not showing in the graph.
Below is the response,
neovis javascript function,
function draw() {
var config = {
container_id: "viz",
server_url: "bolt://localhost:7687",
arrows: true,
labels: {
"Username": {
"caption": "mail_id",
"size": "pagerank",
"community": "partition"
}
},
relationships: {
"sent": {
"thickness": "count",
"caption": false
}
},
initial_cypher: "MATCH (p1:Username)-[r:sent]->(p2:Username) RETURN p1, count(*) AS count ORDER BY count DESC LIMIT 10"
};
viz = new NeoVis.default(config);
viz.render();
}
Please correct me If am doing anything wrong in the query and let me know your thoughts.
Regards,
Ganeshbabu R