Wgraph:Example Timebar

From FollowTheScore
Jump to: navigation, search

Timebar Demo

This is a very simple demo for the use of absolute node positions. It uses nodetypes which assign a person to an epoch (and derive the color from that).

{{#wgraph:wgl|svg|thumb=120|gdl|
  xfactor 8 yfactor 4 node.height 10 xoffset 1685
  
  {{Wgraph:Timeline Person|Wolfgang Amadeus Mozart|born=1756|died=1791|row=10|epoch=classic}}
  ...
  {{Wgraph:Timeline Person|Ludwig van Beethoven   |born=1770|died=1827|row=20|epoch=classic}}

  {{Wgraph:Timeline Tick|1700|10|30}}
  ...
  nodetype classic { color lightred }
  ...
}}

{{#wgraph:svg|thumb=120|

 xfactor 8 yfactor 4 node.height 10 xoffset 1685
 node "Johann Sebastian Bach  " { label "Johann Sebastian Bach  \n(1685 - 1750)" x 1685 width 65 y 10 type "barock" }
 node "Joseph Haydn           " { label "Joseph Haydn           \n(1732 - 1809)" x 1732 width 77 y 20 type "classic" }
 node "Georg Friedrich Händel " { label "Georg Friedrich Händel \n(1685 - 1759)" x 1685 width 74 y 30 type "barock" }
 node "Ludwig van Beethoven   " { label "Ludwig van Beethoven   \n(1770 - 1827)" x 1770 width 57 y 30 type "classic" }
 node "Wolfgang Amadeus Mozart" { label "Wolfgang Amadeus Mozart\n(1756 - 1791)" x 1756 width 35 y 40 type "classic" }
 node "Franz Schubert         " { label "Franz Schubert         \n(1797 - 1828)" x 1797 width 31 y 40 type "romantic" }
 node "Felix Mendelssohn      " { label "Felix Mendelssohn      \n(1809 - 1847)" x 1809 width 38 y 50 type "romantic" }
 node "Anton Bruckner         " { label "Anton Bruckner         \n(1824 - 1896)" x 1824 width 72 y 60 type "romantic" }
 node "Peter Tschaikowsky     " { label "Peter Tschaikowsky     \n(1840 - 1893)" x 1840 width 53 y 70 type "romantic" }
 node 1700a {label 1700 bordercolor white x 1695 y 0 width 10 height 6}

node 1700b {label 1700 bordercolor white x 1695 y 164 width 10 height 6} edge 1700a 1700b {}

 node 1750a {label 1750 bordercolor white x 1745 y 0 width 10 height 6}

node 1750b {label 1750 bordercolor white x 1745 y 164 width 10 height 6} edge 1750a 1750b {}

 node 1800a {label 1800 bordercolor white x 1795 y 0 width 10 height 6}

node 1800b {label 1800 bordercolor white x 1795 y 164 width 10 height 6} edge 1800a 1800b {}

 node 1850a {label 1850 bordercolor white x 1845 y 0 width 10 height 6}

node 1850b {label 1850 bordercolor white x 1845 y 164 width 10 height 6} edge 1850a 1850b {}

 node 1900a {label 1900 bordercolor white x 1895 y 0 width 10 height 6}

node 1900b {label 1900 bordercolor white x 1895 y 164 width 10 height 6} edge 1900a 1900b {}

 nodetype barock   { color #ccffcc }
 nodetype classic  { color #ffcccc }
 nodetype romantic { color #ccccff }
 nodetype * { textwidth 30 }
 edgetype * { arrowstyle none color lightgray }

}}