Directory

GaeGraphVizForVaadin - Vaadin Add-on Directory

Vaadin and Google App Engine compatible graphing GaeGraphVizForVaadin - Vaadin Add-on Directory
There are a lot of good java graphing libraries out there - Jgraph, JGraphT and Jung among others. However, for various reasons, none will play nicely with Google App Engine because it disallows using a lot of java classes (e.g. java.awt.*) that these, or related libraries (like Batik for converting to SVG) require. I tried using the various Vaadin SVG add-ons but they didn't work well with GAE either. Note: By graphing I mean graph theory type connectivity graphs and not ordinary charting that can be accomplished through something like JFreeChart (which also doesn't play well with GAE for similar reasons). The only thing I could find to work (without enormous amounts of work) was an experimental Google Charts API GraphViz offering (see: http://code.google.com/apis/chart/docs/gallery/graphviz.html). It took me a full week to figure out that 1) none of the existing libraries could be made to work with Vaadin and 2) to figure out how to make this specific Charts API work with Vaadin. This add-in shows 3 ways to display these GraphViz charts in Vaadin: 1) Getting the Google Chart API provided PNG file As an ExternalResource in an Embedded object. 2) Getting the Google Chart API provided PNG file in a VisualizationsForVaadin ImageChart. 3) Getting the Google Chart API provided JSON string, converting to an HTML image map and displaying in a UsemapImage add-on object. The third approach enables an action to be taken in response to a click on a graph node. However, I am not sure how much further this approach can be taken. I ultimately wanted drag-and-drop map arrangement capabilities which the full libraries that don't work with GAE provide. It will be difficult, if possible at all, to get the image map approach to provide this. A fourth approach I may implement is to convert the Google JSON to Open Flash Chart JSON using the ofcvaadin project (http://code.google.com/p/ofcvaadin/) but am not sure how well OFC can support graphs as opposed to charts.