16

I need a javascript/jquery library to dynamically create graphs. Most libraries I found is only for visualization.

I need one where I can add node nodes, remove nodes, trace paths, etc.

Renato Dinhani
  • 35,057
  • 55
  • 139
  • 199
  • 7
    Everyone: He said graphs with NODES and EDGES. He isn't trying to plot a function or draw a pie chart -_- – hugomg Oct 07 '11 at 18:03
  • You said most of the libraries you found are only for visualization. Can you expand on that? What libraries did you find and what didn't they have that you're looking for? Most of the ones I've used/found are labelled as visualization tools, but are ideal for building graphs. – Rob Hruska Oct 07 '11 at 18:29
  • @RobHruska The most only takes data as input and generate some diagram. To add a new node, you need to add the new data and regenerate the graph. I want a way to add and remove elements from graph dinamically, withou these need of regeneration. – Renato Dinhani Oct 07 '11 at 18:47
  • 1
    Just ran across this question today: http://stackoverflow.com/questions/7034/graph-visualization-code-in-javascript – Rob Hruska Oct 19 '11 at 19:25

2 Answers2

17

jsPlumb

Page excerpt: jsPlumb provides a means for a developer to visually connect elements on their web pages. It uses SVG or Canvas in modern browsers, and VML for stone-age browsers. The latest version - 1.3.3 - can be used with jQuery, MooTools and YUI3. Full transparent support for dragging is included and the API is super simple.

Project activity is pretty high. Requires one of a few other JS libraries to work (jQuery, MooTools, YUI). Here are a few demos.

mxGraph

Page excerpt: mxGraph is simple, you include it as a JavaScript link in your HTML file and you instantly have access to the cleanest, most functional native browser diagramming component available.

WireIt

Page excerpt: WireIt is an open-source javascript library to create web wirable interfaces for dataflow applications, visual programming languages, graphical modeling, or graph editors.

Cytoscape.js

Page excerpt: An open-source JavaScript graph theory library for analysis and visualisation

Rob Hruska
  • 118,520
  • 32
  • 167
  • 192
2

This might suit your needs http://www.graphdracula.net/ . It has a simple API to add nodes and edges to a graph object. I think you can easily extend on top of it.

Narendra Yadala
  • 9,554
  • 1
  • 28
  • 43