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

Constructors

Instances

#NodePositioning Source

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

#Options Source

type Options = { decisionNodes :: Boolean, entryPoints :: Array StateName, fixedNodeSize :: Maybe Vec, fontSize :: Number, layout :: Layout, rawGlobalAttrs :: Maybe String, rawNodeAttrs :: Maybe (StateName -> String), theme :: Theme, title :: Maybe String, undirectedEdges :: Boolean }

Configuration options for graph generation.

#Vec Source

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

#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.