Module

Transit.Render.Graphviz

Package
purescript-transit
Repository
m-bock/purescript-transit

Generator for Graphviz DOT language graphs from transit specifications.

This module converts state machine specifications into Graphviz graphs for visualization, supporting various rendering options including decision nodes, undirected edges, and customizable themes.

#Inch Source

newtype Inch

Measurement unit for node positions and sizes (inches).

Constructors

Instances

#Layout Source

data Layout

Graph layout algorithm to use for arranging nodes.

Constructors

#NodePositioning Source

type NodePositioning = { exact :: Boolean, node :: String, pos :: Vec }

Specifies manual positioning for a node in the graph.

#Options Source

type Options = { decisionNodes :: Boolean, entryPoints :: Array StateName, extraEdgeAttrs :: Array Attr, extraGraphAttrs :: Array Attr, extraNodeAttrs :: Array Attr, fixedNodeSize :: Maybe Vec, fontSize :: Number, layout :: Layout, theme :: Theme, title :: Maybe String, undirectedEdges :: Boolean }

Configuration options for graph generation.

#Vec Source

type Vec = { x :: Inch, y :: Inch }

2D vector type for node positioning in inches.

#defaultOptions Source

defaultOptions :: Options

Default options for graph generation.

#generate Source

generate :: TransitCore -> (Options -> Options) -> GraphvizGraph

Generates a Graphviz graph with customizable options.

#generateEither Source

generateEither :: TransitCore -> (Options -> Options) -> Either String GraphvizGraph

Generates a Graphviz graph with customizable options. Fails if the options are invalid.

#mkGraphvizGraph Source

mkGraphvizGraph :: Options -> TransitCore -> GraphvizGraph

Generates a Graphviz graph from a transit specification.