Wgraph:Sample Genealogy
From FollowTheScore
This example demonstrates the power of wgraph in combination with
- mediawiki templates
- the Dynamic Page List extension (DPL).
We will guide you through a series of steps where a small genealogy tree is built.
We start with a straight forward approach and show how a very high level of abstraction can be reached.
Please go carefully through each step to understand the architecture of the final result.
First we define a small genealogy tree directly in WGL
- We concentrate on the semantics
- We do not use any coordinates or size attributes for the shapes
- we use nodetypes (male, female, info) to share common properties
- we use edgetypes (mother, father, married to, info) for the same purpose
- we mark undefined nodes in a special way
Thus we reach a fair level of abstraction.
{{#wgraph: svg | wgl | thumb = 80 |
node Gero_Scholz { type male label "Gero Scholz\n* 24.09.1956" } node Rosa_Scholz { type female label "Rosa Scholz\n* 05.07.1949" } node Bernhard_Scholz { type male label "Bernhard Scholz\n* 31.07.1987" } node Andreas_Scholz { type male label "Andreas Scholz\n* 18.01.1989" } node Lena_Scholz { type female label "Lena Scholz\n* 14.03.1994" }
edge Lena_Scholz Gero_Scholz { type father } edge Andreas_Scholz Gero_Scholz { type father } edge Bernhard_Scholz Gero_Scholz { type father } edge Lena_Scholz Rosa_Scholz { type mother } edge Andreas_Scholz Rosa_Scholz { type mother } edge Bernhard_Scholz Rosa_Scholz { type mother }
edge Rosa_Scholz Gero_Scholz { type marriage label 02.01.1987 }
edge Rosa_Scholz Rosa_Scholz_info { type info } edge Gero_Scholz Gero_Scholz_info { type info } node Gero_Scholz_info { type info label "that & this" } node Rosa_Scholz_info { type info label "this and that" }
nodetype male { shape box color #ddddff bordercolor #9999ff width 140 textwidth 20 } nodetype female { shape box color #ffdddd bordercolor #ff9999 width 140 textwidth 20 }
edgetype father { color #7777ff backarrowsize 10 backarrowstyle solid arrowsize 0 } edgetype mother { color #ff7777 } edgetype marriage { kind rightnear arrowstyle line backarrowstyle line backarrowsize 10 color #ff77ff }
nodetype info { color #f0f0f0 borderstyle dashed bordercolor #e0e0e0 } edgetype info { kind near arrowstyle none linestyle dotted color lightgray }
nodetype 'undefined node' { bordercolor red label '%%?' }
orientation bottom_to_top splines yes
}}
continue with Wgraph:Sample Genealogy 2 ..