documentation can be found on pursuit
define your model like this:
> import Data.DotLang
> import Data.DotLang.Attr (FillStyle(..))
> import Data.DotLang.Attr.Node as Node
> import Data.DotLang.Attr.Edge as Edge
> import Color.Scheme.HTML (red)
> exampleGraph = DiGraph [
node "a" [ Node.Shape Node.Diamond, Node.Style Filled, Node.FillColor red ],
node "b" [],
"a" ==> "b",
"a" =*> "d" $ [ Edge.FillColor red ],
Subgraph [
node "d" []
]
]
> -- can be turned into a dotlang using `toText`
> import Data.DotLang.Class (toText)
> toText exampleGraph
"digraph {a [shape=diamond, style=filled, fillcolor=\"#ff0000\"]; b []; a -> b; a -> d [fillcolor=\"#ff0000\"]; subgraph { d []; }}"
let additions =
{ dotlang =
{ dependencies =
[ "colors"
, "console"
, "effect"
, "generics-rep"
, "prelude"
, "psci-support"
, "strings"
, "test-unit"
]
, repo = "https://github.com/csicar/purescript-dotlang.git"
, version = "v2.0.0"
}
}
spago install dotlang
bower i purescript-dotlang
Breaking Changes:
Label
ofEdge
andNode
now support HTML and no formatting: To migrate replace old calls toLabel
with calls tolabel