GraphViz

From PKC
Jump to navigation Jump to search

GraphViz is a software package for rendering graph diagrams, it also has an extension designed to enable diagram generation in MediaWiki. Since GraphViz as an extension is no long support, PKC uses Diagrams as a replacement to support GraphViz features.

To create GraphViz diagrams, one can use the following website: Graphviz Visual Editor.

The documentation of GraphViz can be found on their website[1].


Example

<mscgen caption="Message sequence chart for example no. 4"> msc {

 a,b,c;
 a->b  [label="abc DANNISA()"];
 b->c  [label="bc(TRUE)"];
 c=>c  [label="process(1)"];
 c=>c  [label="process(2)"];
 ...;
 c=>c  [label="process(n)"];
 c=>c  [label="process(END)"];
 a<<=c [label="callback()"];
 ---   [label="If more to run", ID="*"];
 a->a  [label="next()"];
 a->c  [label="ac()"];
 b<-c  [label="cb(TRUE)"];
 b->b  [label="stalled(...)"];
 a<-b  [label="ab() = FALSE"];

} </mscgen>

GraphViz Demo

<graphviz> graph {

 bgcolor="lightblue"
 label="Home BUTTON Rizki"
 subgraph cluster_ground_floor {
   bgcolor="green"
   label="Ground Floor"
   Lounge
   Bathroom
 }
 subgraph cluster_top_floor {
   bgcolor="lightpink"
   label="Top Floor"
   Bedroom
   Bathroom
 }

} </graphviz>

References