A Clojure/ClojureScript library for generating Graphviz graphs using a Hiccup-style DSL.
Dorothy is a Clojure and ClojureScript library that enables programmatic generation of Graphviz graphs using a Hiccup-style domain-specific language (DSL). It solves the problem of manually writing Graphviz DOT language by providing a concise, data-driven way to define nodes, edges, and attributes, which can then be rendered into visual formats like PNG or SVG.
Clojure and ClojureScript developers who need to generate graph visualizations programmatically, such as those working on data visualization, dependency graphs, or workflow diagrams.
Developers choose Dorothy because it integrates seamlessly with Clojure's functional and data-oriented paradigms, offering a familiar Hiccup-like syntax that reduces complexity and boilerplate compared to writing raw Graphviz DOT language.
Hiccup-style generation of Graphviz graphs in Clojure
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses vectors and maps similar to Hiccup for HTML, making graph definition concise and familiar to Clojure developers, as shown in node and edge statement examples like [:start {:shape :Mdiamond}].
Works in both Clojure (JVM) and ClojureScript (JavaScript), enabling graph generation in server-side and client-side applications without switching libraries.
Includes functions like render, save!, and show! to output graphs as PNG, SVG, PDF, etc., directly from Clojure code, with a simple Swing viewer for quick debugging.
Supports (gen-id object) to create node IDs from arbitrary objects, allowing dynamic graph generation without manual ID management, as mentioned in the node statement section.
The library is labeled 'extremely alpha' with frequent breaking changes, making it risky for production use and requiring constant updates, as noted in the README warnings.
Rendering images requires the Graphviz dot tool installed on the system path, adding setup complexity and limiting portability in environments where Graphviz is not available.
ClojureScript version lacks built-in rendering; developers must manually integrate third-party libraries like viz.cljc or viz.js, which is less seamless and documented as a gap in the README.