views:

112

answers:

2

I have a requirement to graphically depict relationships between a set of objects as well as their types in a PHP application. The relatinships would be previously generated. I am only looking for a tool, preferably free, that will display the nodes and their relations.

I am open to PHP or JavaScript or any thing that will work as long as it does not require (preferably) a separate plugin. I think what I am looking for is a little bit similar to Graphviz.

Some of the relationships between objects could be similar to the following. These are for example only.

Sam->(knows)->Mark    /* Relationship is explicitly defined */
Shannon->(may know)->Jennifer     /* Relationship is inferred */
Linda->(is Married to)->Neville   /* Relationship is defined but information is missing (i.e. gender) to determine which node fills which role (i.e. husband, wife) */
Carl->(is Related to)->John /* Relationship is defined but parameters are completely unknown */

Please note that two objects may also share multiple relationships.

Mary->(is Boss)->John
Mary->(is Wife)->John
Mary->(has children with)->John

The graph needs to depict not only the nodes but also their relationship. The graphics library needs to be somewhat interactive so that a node or the relationship can be clicked on to enable some action--such as the lookup (preferably through AJAX) of additional information. (Even more preferable would be to allow the action to occur on mouseover.)

The library to understand the relationships. It only needs to be able to show that there is a relationship and include the appropriate text describing the relationip that is provided when the diagram is generated.

What is the best library to accomplish this task? Even if there is no single library that fully meets the demand, if there is one that comes close but is extensible, that would be great to know too.

Thank you!

+1  A: 
Jonathan Sampson
Jonathan, this solution is not free, but it is very very nice. It looks like it would fit the requirements. If I don't find a free solution, I will definitely giving yUML a much more in-depth look. Thanks so much for recommending it.
Anthony Gatlin
@Anthony: The solution is free, or you can buy it for your own personal networks.
Jonathan Sampson
A: 

The Bidirectional Interactive Network Visualization library (for Javascript) seems to have the functionality that you are looking for. It is used to draw ontologies and your example looks a bit like an ontology. People have different and sometimes multiple relationships. In addition, the BINViz library offers neat interactivity, is relatively small, and not dependent on other libs.

DrDee