eisman / neo4jd3 Goto Github PK
View Code? Open in Web Editor NEWNeo4j graph visualization using D3.js
Home Page: https://eisman.github.io/neo4jd3/
License: MIT License
Neo4j graph visualization using D3.js
Home Page: https://eisman.github.io/neo4jd3/
License: MIT License
So the nodes circles can't be outside of the screen.
Just created a fork, will be proposing a PR soon.
when i input the commend "gulp", I get the error "events,js 141 throw er;// unhandled error event" and Error; Gem undefined is not installed. How can I fix this problem.
@eisman Thanks for the neo4jd3 you make, very helpful for me, but can i add label for each node?
thanks...
I'd like to use nodes with a custom image, i.e. without using standard circle (or a transparent circle) and overlaying in top of them a custom image. Or the standard circle, but with a custom image in the center, without the font awesome icon.
Just created a fork, will be proposing a PR soon.
Hi,
Its not working in IE 11.
What I see is only white screen. There are no js errors in the console.
Too much texts make the graph noisy. Is it possible to hide them on the lines?
Drawing multiple edges between two nodes with neo4jd3,thanks!
I am trying to replace my old 3Djs visualization with neo4jd3 plugin and in my old code I am using D3js data format and when switching to your plugin using the same format I am getting the error below:
neo4jd3.min.js?v=0.0.1:1
Uncaught TypeError: Cannot read property 'forEach' of undefined
at P (neo4jd3.min.js?v=0.0.1:1)
at fe (neo4jd3.min.js?v=0.0.1:1)
at neo4jd3.min.js?v=0.0.1:1
at Object. (d3.min.js:7)
at d.call (d3.min.js:4)
at XMLHttpRequest.e (d3.min.js:7)
in my init I am setting data url option as below:
neo4jDataUrl: 'assets/json/test.json'
where test.json is in D3.js format.
please help or provide an example using D3.js format.
Thanks.
Hello @eisman I am going to create a TypeScript Library using the code from neo4jd3.js, since there is no code of support provided in this library
Currently it looks like I cannot pass the velocityDecay
parameter via the options
of neo4jd3
. It'd be a nice feature to include the ability to have velocityDecay
as options
which can then be sent to the forceSimulation()
call in d3
Also, an added nice feature would be to ensure that the edges between the nodes do not overlap when the velocityDecay
is closer to 1
Additionally, it might be better to pre-render the entire simulation if possible 👍
Thanks for the great tool.
I have adjust the neo4jd3.js to meet my use case.
Code changes can be found in this commit.
henryyang-aeolus@f16b4c9
I'll make a PR when I get familiar with JS development work flow.
gulp generates an error.
throw er; // Unhandled 'error' event
Error: spawn /home/bilal/Desktop/testprojects/neo4jd3/node_modules/optipng-bin/vendor/optipng ENOENT
at _errnoException (util.js:1022:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
Versions:
node 8.9.4
npm 5.6.0
ruby 2.3.1p112
gem 2.5.2.1
sass 3.5.5
gulp 3.9.1
I get new neo4j json data from websocket, and I want to repalce the old data with the new data, but updateWithNeo4jData or updateWithD3Data always append the new data to the old one , how can I clear the old data before it render the new ones?
When support More than one relationship between two nodes?
Text nodes + Font Awesome icon nodes + SVG image nodes (e.g. using Twitter Emoji)).
But how to defined a text node? Please guide me, thank's!
Hi all,
As I'm dynamically change the root node based on the user's click I'd need to reset the data along with its data.
When I try to load a new function by setting: neo4j = new Neo4J(...)
nothing really happens.
Is there a alway to reset the data before calling updateWithNeo4jData
?
thanks.
zoomFit() is not working with Chrome browser. Tested on version 55.0.2883.87 m (64-bit). While it is working fine with FireFox, Tested version 51.0.1 (32-bit).
Replaced:
svg.attr('transform', 'translate(' + svgTranslate[0] + ', ' + svgTranslate[1] + ') scale(' + svgScale + ')');
with:
g.attr('transform', 'translate(' + svgTranslate[0] + ', ' + svgTranslate[1] + ') scale(' + svgScale + ')');
where
var g = svg.append("g");
and it worked !
I'm having the need to close all nodes / reset graph to empty state, i.e. attaching new nodes to an empty arraying instead of pushing them to existent nodes array.
Just created a fork, will be contributing with a PR soon.
Are you planning to add functionality for creating/updating nodes and relationships and push that back to neo4j?
Hi,
I've tried to read through the source to find some hints to where I need to adjust/patch the code so that not every graph in the view restarts the force-based simulation/layout.
Is this normal D3 behavior, or is it something you have added to this particular component @eisman ?
d3.min.js:2 GET http://localhost:8080/[object%20Object] 404 (Not Found)
send @ d3.min.js:2
get @ d3.min.js:2
(anonymous) @ d3.min.js:2
loadNeo4jDataFromUrl @ neo4jd3.js:570
init @ neo4jd3.js:500
Neo4jD3 @ neo4jd3.js:959
init @ (index):36
load (async)
(anonymous) @ (index):121
neo4jd3.js:572 Uncaught ProgressEvent {isTrusted: true, lengthComputable: true, loaded: 156, total: 156, type: "load", …}bubbles: falsecancelBubble: falsecancelable: falsecomposed: falsecurrentTarget: XMLHttpRequest {onreadystatechange: null, readyState: 4, timeout: 0, withCredentials: false, upload: XMLHttpRequestUpload, …}defaultPrevented: falseeventPhase: 0isTrusted: truelengthComputable: trueloaded: 156path: []returnValue: truesrcElement: XMLHttpRequest {onreadystatechange: null, readyState: 4, timeout: 0, withCredentials: false, upload: XMLHttpRequestUpload, …}target: XMLHttpRequest {onreadystatechange: null, readyState: 4, timeout: 0, withCredentials: false, upload: XMLHttpRequestUpload, …}timeStamp: 621.3299999944866total: 156type: "load"proto: ProgressEvent
(anonymous) @ neo4jd3.js:572
call @ d3.min.js:2
e @ d3.min.js:2
load (async)
nu @ d3.min.js:2
(anonymous) @ d3.min.js:2
loadNeo4jDataFromUrl @ neo4jd3.js:570
init @ neo4jd3.js:500
Neo4jD3 @ neo4jd3.js:959
init @ (index):36
load (async)
(anonymous) @ (index):121
After fully completion of graph loads, I want to call a callback function which I passed
I want to change the icon to image link. Is it possible?
Hi there,
I'm querying Neo4J 3.3.5 with the following query:
MATCH (n) OPTIONAL MATCH (n)-[r]-() RETURN n, r;
This returns me data which looks like this:
{
"results":[
{
"columns":[
"n",
"r"
],
"data":[
{
"row":[
{
"phone_number":"079574290174"
},
{
}
],
"meta":[
{
"id":0,
"type":"node",
"deleted":false
},
{
"id":3,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079574290174"
},
{
}
],
"meta":[
{
"id":0,
"type":"node",
"deleted":false
},
{
"id":2,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079574290174"
},
{
}
],
"meta":[
{
"id":0,
"type":"node",
"deleted":false
},
{
"id":1,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079574290174"
},
{
}
],
"meta":[
{
"id":0,
"type":"node",
"deleted":false
},
{
"id":0,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079929592107"
},
{
}
],
"meta":[
{
"id":1,
"type":"node",
"deleted":false
},
{
"id":13,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079929592107"
},
{
}
],
"meta":[
{
"id":1,
"type":"node",
"deleted":false
},
{
"id":7,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079929592107"
},
{
}
],
"meta":[
{
"id":1,
"type":"node",
"deleted":false
},
{
"id":6,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079929592107"
},
{
}
],
"meta":[
{
"id":1,
"type":"node",
"deleted":false
},
{
"id":5,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079929592107"
},
{
}
],
"meta":[
{
"id":1,
"type":"node",
"deleted":false
},
{
"id":4,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079755449190"
},
{
}
],
"meta":[
{
"id":2,
"type":"node",
"deleted":false
},
{
"id":17,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079755449190"
},
{
}
],
"meta":[
{
"id":2,
"type":"node",
"deleted":false
},
{
"id":14,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079755449190"
},
{
}
],
"meta":[
{
"id":2,
"type":"node",
"deleted":false
},
{
"id":13,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079755449190"
},
{
}
],
"meta":[
{
"id":2,
"type":"node",
"deleted":false
},
{
"id":12,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079755449190"
},
{
}
],
"meta":[
{
"id":2,
"type":"node",
"deleted":false
},
{
"id":11,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079755449190"
},
{
}
],
"meta":[
{
"id":2,
"type":"node",
"deleted":false
},
{
"id":10,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079755449190"
},
{
}
],
"meta":[
{
"id":2,
"type":"node",
"deleted":false
},
{
"id":9,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079755449190"
},
{
}
],
"meta":[
{
"id":2,
"type":"node",
"deleted":false
},
{
"id":8,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079574308199"
},
{
}
],
"meta":[
{
"id":3,
"type":"node",
"deleted":false
},
{
"id":22,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079574308199"
},
{
}
],
"meta":[
{
"id":3,
"type":"node",
"deleted":false
},
{
"id":20,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079574308199"
},
{
}
],
"meta":[
{
"id":3,
"type":"node",
"deleted":false
},
{
"id":21,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079574308199"
},
{
}
],
"meta":[
{
"id":3,
"type":"node",
"deleted":false
},
{
"id":18,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079574308199"
},
{
}
],
"meta":[
{
"id":3,
"type":"node",
"deleted":false
},
{
"id":19,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079574308199"
},
{
}
],
"meta":[
{
"id":3,
"type":"node",
"deleted":false
},
{
"id":16,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079574308199"
},
{
}
],
"meta":[
{
"id":3,
"type":"node",
"deleted":false
},
{
"id":17,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079574308199"
},
{
}
],
"meta":[
{
"id":3,
"type":"node",
"deleted":false
},
{
"id":15,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079142653631"
},
{
}
],
"meta":[
{
"id":4,
"type":"node",
"deleted":false
},
{
"id":30,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079142653631"
},
{
}
],
"meta":[
{
"id":4,
"type":"node",
"deleted":false
},
{
"id":31,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079142653631"
},
{
}
],
"meta":[
{
"id":4,
"type":"node",
"deleted":false
},
{
"id":28,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079142653631"
},
{
}
],
"meta":[
{
"id":4,
"type":"node",
"deleted":false
},
{
"id":29,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079142653631"
},
{
}
],
"meta":[
{
"id":4,
"type":"node",
"deleted":false
},
{
"id":26,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079142653631"
},
{
}
],
"meta":[
{
"id":4,
"type":"node",
"deleted":false
},
{
"id":27,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079142653631"
},
{
}
],
"meta":[
{
"id":4,
"type":"node",
"deleted":false
},
{
"id":24,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079142653631"
},
{
}
],
"meta":[
{
"id":4,
"type":"node",
"deleted":false
},
{
"id":25,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079142653631"
},
{
}
],
"meta":[
{
"id":4,
"type":"node",
"deleted":false
},
{
"id":23,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079142653631"
},
{
}
],
"meta":[
{
"id":4,
"type":"node",
"deleted":false
},
{
"id":14,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"07994590507"
},
{
}
],
"meta":[
{
"id":5,
"type":"node",
"deleted":false
},
{
"id":16,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"07994590507"
},
{
}
],
"meta":[
{
"id":5,
"type":"node",
"deleted":false
},
{
"id":0,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079890024638"
},
{
}
],
"meta":[
{
"id":6,
"type":"node",
"deleted":false
},
{
"id":1,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"07900202872"
},
{
}
],
"meta":[
{
"id":7,
"type":"node",
"deleted":false
},
{
"id":15,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"07900202872"
},
{
}
],
"meta":[
{
"id":7,
"type":"node",
"deleted":false
},
{
"id":4,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"07900202872"
},
{
}
],
"meta":[
{
"id":7,
"type":"node",
"deleted":false
},
{
"id":2,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"07938441428"
},
{
}
],
"meta":[
{
"id":8,
"type":"node",
"deleted":false
},
{
"id":5,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"07938441428"
},
{
}
],
"meta":[
{
"id":8,
"type":"node",
"deleted":false
},
{
"id":3,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079562763146"
},
{
}
],
"meta":[
{
"id":9,
"type":"node",
"deleted":false
},
{
"id":6,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079460723019"
},
{
}
],
"meta":[
{
"id":10,
"type":"node",
"deleted":false
},
{
"id":22,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079460723019"
},
{
}
],
"meta":[
{
"id":10,
"type":"node",
"deleted":false
},
{
"id":7,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079114044356"
},
{
}
],
"meta":[
{
"id":11,
"type":"node",
"deleted":false
},
{
"id":8,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079930902463"
},
{
}
],
"meta":[
{
"id":12,
"type":"node",
"deleted":false
},
{
"id":29,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079930902463"
},
{
}
],
"meta":[
{
"id":12,
"type":"node",
"deleted":false
},
{
"id":9,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079970530368"
},
{
}
],
"meta":[
{
"id":13,
"type":"node",
"deleted":false
},
{
"id":20,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079970530368"
},
{
}
],
"meta":[
{
"id":13,
"type":"node",
"deleted":false
},
{
"id":10,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079441013326"
},
{
}
],
"meta":[
{
"id":14,
"type":"node",
"deleted":false
},
{
"id":11,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079119808095"
},
{
}
],
"meta":[
{
"id":15,
"type":"node",
"deleted":false
},
{
"id":12,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079341469140"
},
{
}
],
"meta":[
{
"id":16,
"type":"node",
"deleted":false
},
{
"id":18,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079742230649"
},
{
}
],
"meta":[
{
"id":17,
"type":"node",
"deleted":false
},
{
"id":19,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079545781483"
},
{
}
],
"meta":[
{
"id":18,
"type":"node",
"deleted":false
},
{
"id":23,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079545781483"
},
{
}
],
"meta":[
{
"id":18,
"type":"node",
"deleted":false
},
{
"id":21,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079781624770"
},
{
}
],
"meta":[
{
"id":19,
"type":"node",
"deleted":false
},
{
"id":24,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079448132402"
},
{
}
],
"meta":[
{
"id":20,
"type":"node",
"deleted":false
},
{
"id":25,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079516166315"
},
{
}
],
"meta":[
{
"id":21,
"type":"node",
"deleted":false
},
{
"id":26,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079810540025"
},
{
}
],
"meta":[
{
"id":22,
"type":"node",
"deleted":false
},
{
"id":27,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079506051500"
},
{
}
],
"meta":[
{
"id":23,
"type":"node",
"deleted":false
},
{
"id":28,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079885330165"
},
{
}
],
"meta":[
{
"id":24,
"type":"node",
"deleted":false
},
{
"id":30,
"type":"relationship",
"deleted":false
}
]
},
{
"row":[
{
"phone_number":"079259791034"
},
{
}
],
"meta":[
{
"id":25,
"type":"node",
"deleted":false
},
{
"id":31,
"type":"relationship",
"deleted":false
}
]
}
]
}
],
"errors":[
]
}
I'm seeing an error in neo4jd3 Cannot read property 'nodes' of undefined
where it seems to be expecting to find nodes
under another property graph
(as per this doc: https://www.npmjs.com/package/neo4jd3#neo4j-data-format) but as you can see from my data, I don't get that nested graph
property mine just hangs straight out of data[]
.
Any ideas how I can reformat things? or is this a version issue?
hi,how can i set the node's name?,now it is still use icon or title?thank you
Hi,
I would like to get data from Neo4J server directly when i click on each node. how can i do that.
Hi ,
I have tried to implment the neo4jd3 with simple jquery but it is not working , whenever you try to debug , it always jump to src/main/script/neo4jd3.js even though that path does not exists in my project. it is creating that file dynamically.
I want to modify the neo4jd3.js to create my own version but not able to do so
Can you guide how to make it work with jquery. no angular or other stuff
Hi May i know how to get the Neo4j data format using the CQL? Thanks a lot
1.I only see onRelationshipDoubleClick Did not see click。
2.Can I put an icon on the relationship line?
If my relationship between is a hyperlink,
then how to make it clickable in web page?
And I also want to make node clickable,Thanks for your help
events.js:160
throw er; // Unhandled 'error' event
^
Error: spawn /vagrant/neo4jd3/node_modules/optipng-bin/vendor/optipng ENOENT
at exports._errnoException (util.js:1022:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:359:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
While connected to a Neo4J endpoint and when double-clicking a node, the graph is duplicating the expanded node, instead of connecting children nodes directly to existent node.
In this example, I had a single node returned by initial query, and when double clicked this node, the graph is updated with a new node with the children nodes, instead of connecting the relations to the existent, double-clicked node.
Just to be clear: in the example it works fine, but when connected to a real Neo4J server, this happens.
Just created a fork, will be proposing a PR soon.
Hi,
In the library, there is a double click function can be used to expand the graph. Does exist other function to support collapse the expanded graph as well?
BR
How can I change the displayed id value by the node's name?
I am trying to integrate neo4jd3 with my reactjs app. i also tried this
#10.
but getting lots of error.
please help me
Hi all.
Im trying to figure out how to run this as a function without that window.load = init
.
Can anyone help me clarify this?
Thanks.
C.
Can I connect it to my neo4j data.
I already has a MySql db with my inventory and from my PHP site I can generate the json array (json_encode). How can I make it available as an input?
Thanks
Is there a way to use neo4jd3 with React app ?
Hi,
I want to know if have a component Neo4jD3 for Angular 2/4?
Or will be implemented?
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.