Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Library for Canvas/SVG web-based tree graphs with layout algorithm? [closed]

I'm looking for a library that can draw interactive (i.e. clickable nodes) tree graphs.

Something like this but with text in the node boxes (i.e. the nodes would be of variable width and height).

Tree Layout

Canviz doesn't have a stable release, and from what I can tell ProtoVis can't do text nodes and can only do single-parent nodes with tree layouts. Anyone aware of any libraries to do this in a browser?

like image 807
bcoughlan Avatar asked Jun 14 '11 00:06

bcoughlan


3 Answers

A basic tree digram tutorial (you may expand this to get what you want) http://www.codeproject.com/KB/scripting/graphic_javascript_tree.aspx

These are additional resources you may want to take a look at =)

http://www.graphviz.org/Theory.php http://directory.google.com/Top/Science/Math/Combinatorics/Software/Graph_Drawing/

Really hope to see this out in javascript in the future, i too have quite a fair bit of usage for such classes =P

like image 185
PicoCreator Avatar answered Oct 25 '22 07:10

PicoCreator


You may be interested in Cytoscape.js, an open-source JS graph visualisation and analysis library. It has built-in gestures, support for touch devices, and a rich API that you can use to integrate it into your webapp.

http://js.cytoscape.org

Cytoscape.js has a built-in breadthfirst layout for trees and DAGs, and this layout is very space efficient.

There is also the cytoscape-dagre extension for Cytoscape.js, which allows for using the excellent Dagre tree/DAG layout algorithm: https://github.com/cytoscape/cytoscape.js-dagre

Dagre produces very aesthetic results.

Disclaimer: I work on Cytoscape.js

like image 33
maxkfranz Avatar answered Oct 25 '22 07:10

maxkfranz


Have you looked at JIT yet? I did some work with their radial graph, and it was a cinch.

like image 2
Josh Avatar answered Oct 25 '22 06:10

Josh