Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javascript Library to dynamically create graphs?

Here is my requirement:

I need to create a visualization of links between different representations of a person. The image below I think indicates that fairly clearly.

enter image description here

Additionally, those rectangles would also contain some data about that representation of a person (such as demographics and the place). I also need to be able to handle events when clicking on the boxes or the links between them, as a sort of management tool (so, for example, double clicking a link to delete it, or something along those lines). Just as importantly, since the number of people and links will varies, I need it to be displayed by spacing out the people in a roughly equidistant fashion like the image shows.

What would be a javascript library that could accomplish this? I have done some research and have yet not found something that can cleanly do this but I'm hardly an expert in those libraries.

Here are the ones I've looked at:

Arbor js: Can dynamically create the spacing and links of the graph but I'm responsible for rendering all the visuals and there's really no hooks for things like clicking the links.

jsPlumb: Easily create connections between elements and draws them nicely enough but doesn't seem to address any layout issues. Since I don't know how many people will be on the screen, I have to be able to space them out equidistant and that doesn't seem to be a concern of jsPlumb.

D3.js: This creates a good visualization with the spacing I need but I don't see how I can show the data inside each node or do things like like mouse events on the links or box.

I'm feeling a bit lost so I'm hoping someone could point me to something that could help me or maybe point me to an example from one of these libraries that shows me that what I want is possible.

like image 267
AHungerArtist Avatar asked Nov 04 '22 16:11

AHungerArtist


1 Answers

I ended up using Arbor with Raphael as my rendering library and it's worked out very well.

like image 60
AHungerArtist Avatar answered Nov 15 '22 02:11

AHungerArtist