Embeddable customizable graph editor (Java, Flash, HTML+Javascript)

大兔子大兔子 提交于 2020-01-06 05:48:11

问题


I have an application that uses intricate graph-like structure as a configuration. The application itself resembles a NetGraph- or netfilter firewall, thus graph nodes have types and properties (which correspond to operations) and they're interconnected with directed edges.

I'd like to have an easy-to-user configuration editor for my application that provides visualization and editing for configuration as a graph.

In my dream scenario, application would receive this configuration as a file in one of popular graph formats (for example, TGF, DOT, GraphML, etc), parse it and use.

A few requirements (not really strict, I'm open to consider various options) - graph editor should be:

  • available to be embedded in web UI - i.e. implemented in Javascript/HTML, Flash or as a Java applet
  • able to load TGF-style graph (i.e. without layouting instructions, nodes would be without coordinates) and lay it out in a somewhat decent automatically
  • able to save this graph back
  • able to load/save using requests to HTTP server, not a file directly
  • customizable to make it work with strict set of node types (so that user can't just create arbitrary node type or arbitrary properties for a given node)
  • open-source

So far I've found yEd and it's Flash version, Graphity - both look cool, but they aren't customizable (to strip them to bare-bones functionality, i.e. creation of one a few node types) and not open source, so embedding them anywhere pledges to be somewhat painful.

Another option I'm considering is trashing the whole "visual editor" idea and make user just write down bare TGF or DOT-style definitions in a plain text file and visualize them for later checking using something like GraphViz. Is it a viable way to go?


回答1:


Have you looked at InfoVis? In particular, the force-directed layout and editing may be applicable. Graph source data is analogous to DOT, albeit in json format. No layout info in the source data though.

EDIT: There's also ProtoVis which is similar.

hth.



来源:https://stackoverflow.com/questions/6128236/embeddable-customizable-graph-editor-java-flash-htmljavascript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!