cantino/huginn — pull request #134 by mascott (2014-01-16 03:36:40+00:00)
Title: Convert agent flow graphs to cytoscape

Just fair warning this is my first pull request to an open source project.

I've started implementing cytoscape.js for agent flow graphs to address Issue #59.

This is my first experience with cytoscape.js so I didn't venture far from the basics. I tried a few layout options and the 'breadthfirst' layout tended to be the most readable as you can see below.

![screen shot 2014-01-15 at 8 45 32 pm](https://f.cloud.github.com/assets/1326142/1927516/21142840-7e5e-11e3-8b2c-8010468ace0c.png)

I am having one issue with the conversion. As you can see in the graph above, all nodes, regardless of the presence of a link, are being treated as one large graph. The Google API on the other hand respects the relationships between nodes and groups them visually as separate graphs.

I haven't found a method in cytoscape.js that currently provides similar behavior. I did find an issue, https://github.com/cytoscape/cytoscape.js/issues/295, that will provide a method to apply layouts to groups of nodes which may accomplish what the Google API is currently providing.