This package is a writer of DOT (the language of Graphviz) for Graphity graphs, with labels, attributes and clusters taken from your own arrays by node ID and edge index.
It is a package of Graphity for TypeScript, which is the TypeScript implementation of the Java library Graphity. Its counterpart in Java is the module graphity-dot. The README of the repository shows how to use it and how its API relates to Java's.
npm install @kobayami/graphity-dot
Licensed under the Apache License 2.0; see the files LICENSE and NOTICE in the package.
Export of graphs to DOT (the language of Graphviz) to look at them with its layout tools.
This package is the counterpart of the Java module
graphity-dot, released with@kobayami/graphity-coreat the same version. DotWriter writes a graph as DOT text. A graph holds no data, so the writer takes labels and attributes from hooks that receive a node ID or an edge index and read the caller's arrays. AttributeHook is the hook for the attributes of one node or edge. The clusters come from a partition of the nodes, with a hook for their labels. Here, the packages of a small program that depend on each other in a cycle:The node filter keeps the node IDs of the graph, so the hooks read the same arrays as for the whole graph. For Markdown and documentation, the package
@kobayami/graphity-mermaidwrites Mermaid flowcharts.A hook for a label may return
nullorundefined, which means none. Errors follow the core: a plainErrorwhere Java throws anIllegalArgumentException.