Difference between revisions of "Wgraph:Sample Genealogy"

From FollowTheScore
Jump to: navigation, search
(New page: This examples 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 wher...)
 
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
This examples demonstrates the power of ''wgraph'' in combination with  
+
This example demonstrates the power of ''wgraph'' in combination with  
 
# mediawiki templates
 
# mediawiki templates
 
# the ''Dynamic Page List'' extension (DPL).
 
# the ''Dynamic Page List'' extension (DPL).
  
We will guide you through a series of steps where a small genealogy tree is used.
+
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.
 
We start with a straight forward approach and show how a very high level of abstraction can be reached.
Line 14: Line 14:
 
* We concentrate on the semantics
 
* We concentrate on the semantics
 
* We do not use any coordinates or size attributes for the shapes
 
* We do not use any coordinates or size attributes for the shapes
* we we use nodetypes (''male, female, info'') to share common properties
+
* we use nodetypes (''male, female, info'') to share common properties
 
* we use edgetypes (''mother, father, married to, info'') for the same purpose
 
* we use edgetypes (''mother, father, married to, info'') for the same purpose
 
* we mark undefined nodes in a special way
 
* we mark undefined nodes in a special way
Line 20: Line 20:
  
 
{{#wgraph: svg | wgl | thumb = 80 |
 
{{#wgraph: svg | wgl | thumb = 80 |
   node Gero_Scholz      { type male  label "Gero Scholz\n*'' 24.09.1956''" }
+
   node John_Smith      { type male  label "John Smith\n*'' 21.06.1952''" }
   node Rosa_Scholz     { type female label "Rosa Scholz\n*'' 05.07.1949''" }
+
   node Bella_Smith     { type female label "Bella Smith\n*'' 03.04.1955''" }
   node Bernhard_Scholz  { type male  label "Bernhard Scholz\n*'' 31.07.1987''" }
+
   node Dave_Smith      { type male  label "Dave Smith\n*'' 30.05.1986''" }
   node Andreas_Scholz  { type male  label "Andreas Scholz\n*'' 18.01.1989''" }
+
   node Paul_Smith      { type male  label "Paul Smith\n*'' 28.02.1988''" }
   node Lena_Scholz     { type female label "Lena Scholz\n*'' 14.03.1994''" }
+
   node Susan_Smith     { type female label "Susan Smith\n*'' 04.06.1995''" }
  
   edge Lena_Scholz        Gero_Scholz       { type father }
+
   edge Susan_Smith       John_Smith        { type father }
   edge Andreas_Scholz    Gero_Scholz        { type father }
+
   edge Paul_Smith        John_Smith        { type father }
   edge Bernhard_Scholz    Gero_Scholz        { type father }
+
   edge Dave_Smith        John_Smith        { type father }
   edge Lena_Scholz       Rosa_Scholz       { type mother }
+
   edge Susan_Smith       Bella_Smith       { type mother }
   edge Andreas_Scholz    Rosa_Scholz       { type mother }
+
   edge Paul_Smith        Bella_Smith       { type mother }
   edge Bernhard_Scholz    Rosa_Scholz       { type mother }
+
   edge Dave_Smith        Bella_Smith       { type mother }
  
   edge Rosa_Scholz        Gero_Scholz       { type marriage label 02.01.1987 }
+
   edge Bella_Smith       John_Smith        { type marriage label 01.03.1985 }
  
   edge Rosa_Scholz       Rosa_Scholz_info   { type info }
+
   edge Bella_Smith       Bella_Smith_info   { type info }
   edge Gero_Scholz        Gero_Scholz_info   { type info }
+
   edge John_Smith        John_Smith_info   { type info }
   node Gero_Scholz_info  { type info label "that & this" }
+
   node John_Smith_info    { type info label "that & this" }
   node Rosa_Scholz_info   { type info label "this and that" }
+
   node Bella_Smith_info   { type info label "this And that" }
  
 
   nodetype male    { shape box color #ddddff bordercolor #9999ff width 140 textwidth 20 }
 
   nodetype male    { shape box color #ddddff bordercolor #9999ff width 140 textwidth 20 }
 
   nodetype female  { shape box color #ffdddd bordercolor #ff9999 width 140 textwidth 20 }
 
   nodetype female  { shape box color #ffdddd bordercolor #ff9999 width 140 textwidth 20 }
  
   edgetype father  { color #7777ff }
+
   edgetype father  { color #7777ff backarrowsize 10 backarrowstyle solid arrowsize 0 }
   edgetype mother  { color #ff7777 }
+
   edgetype mother  { color #ff7777 backarrowsize 10 backarrowstyle solid arrowsize 0 }
 
   edgetype marriage { kind rightnear arrowstyle line  backarrowstyle line backarrowsize 10 color #ff77ff }
 
   edgetype marriage { kind rightnear arrowstyle line  backarrowstyle line backarrowsize 10 color #ff77ff }
  

Latest revision as of 11:17, 25 February 2015

This example demonstrates the power of wgraph in combination with

  1. mediawiki templates
  2. 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 John_Smith       { type male   label "John Smith\n* 21.06.1952" }
 node Bella_Smith      { type female label "Bella Smith\n* 03.04.1955" }
 node Dave_Smith       { type male   label "Dave Smith\n* 30.05.1986" }
 node Paul_Smith       { type male   label "Paul Smith\n* 28.02.1988" }
 node Susan_Smith      { type female label "Susan Smith\n* 04.06.1995" }
 edge Susan_Smith        John_Smith         { type father }
 edge Paul_Smith         John_Smith         { type father }
 edge Dave_Smith         John_Smith         { type father }
 edge Susan_Smith        Bella_Smith        { type mother }
 edge Paul_Smith         Bella_Smith        { type mother }
 edge Dave_Smith         Bella_Smith        { type mother }
 edge Bella_Smith        John_Smith         { type marriage label 01.03.1985 }
 edge Bella_Smith        Bella_Smith_info   { type info }
 edge John_Smith         John_Smith_info   { type info }
 node John_Smith_info    { type info label "that & this" }
 node Bella_Smith_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 backarrowsize 10 backarrowstyle solid arrowsize 0 }
 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 ..