Hilfe:Zeitleisten/Barset

aus Wikipedia, der freien Enzyklopädie
Zur Navigation springen Zur Suche springen

Komplizierte Darstellung einer Zeitleiste mit barset[Bearbeiten | Quelltext bearbeiten]

Nehmen wir an, dass folgende Daten dargestellt werden sollen:

Name Von Bis
Huber 1/1/1985 8/1/1986
Maier 3/2/1987 8/21/1993
Hans 10/15/1993 4/15/1996
Karl 10/15/1991 4/15/1995
Ruth 3/15/1994 11/15/1996
Michi 7/15/1996 3/15/1997
Gerd 11/15/1997 1/15/2000
Bert 4/15/1999 8/15/1999
Gisi 7/15/2000 7/15/2001
Caja 8/15/2000 6/15/2004
Tutu 4/15/2002 9/15/2006
Timo 5/15/2002 1/15/2003
Otto 1/15/2004 9/15/2006
Susi 6/15/2005 9/15/2006

Man stellt fest, dass sich mit einer Balkenzeile diese Daten nicht darstellen lassen. Es müssen insgesamt 3 Balkenzeilen verwendet werden. Dies wird mit einem barset erreicht: (auto advancement to next bar on every event) and repositioning on first bar with barset:break (a bar can be skipped with barset:skip)
In der 3. Zeile wird hier absichtlich Bert (blau) über Gerd (gelb) angezeigt.


DateFormat=mm/dd/yyyy                      # Datenformat
Period = from:01/01/1984 till:04/01/2008   # Darstellung von bis
Define $now = 09/15/2006                   # Jetzt
ImageSize= width:800 height:auto barincrement:35 # Bildgröße
TimeAxis = orientation:horizontal          # Horizontal
PlotArea = right:5 left:20 bottom:80 top:5 # Plotarea bestimmt über die Ränder
Legend = orientation:vertical position:bottom columns:4 # Legende unterhalb in 4 Spalten

Colors =                                                     # Farben mit Legendenerklärung
     id:bg            value:white                            # Hintergrund
     id:erste         value:rgb(1,0.85,0.85) legend:Etwas
     id:zweite        value:rgb(1,1,0.6)     legend:Etwas_anderes
     id:dritte        value:rgb(0.8,1,0.8)   legend:Nochmal_etwas_anderes
     id:header        value:rgb(0.8,0.8,0.9)                 # Überschrift

BackgroundColors = canvas:bg
ScaleMajor = gridcolor:blue       unit:year increment:5 start:01/01/1985
ScaleMinor = gridcolor:powderblue unit:year increment:1 start:01/01/1984

BarData = 
  Bar:    header
  Bar:    lehr
  Barset: daten

PlotData=
  width:25    anchor:middle  align:center
  bar:header  color:header   textcolor:darkblue
  fontsize:m  shift:(,-6)

  from:start till:05/01/1998 text:"Alt"
  at:05/15/1998 mark:(line,red)                     # Rote Linie bei 15.5.1998

  color:header textcolor:red
  fontsize:l   shift:(,-8)

  from:05/01/1998 till:01/10/2006 text:"Neu"

  anchor:from  align:left
  fontsize:s   shift:(5,-4)
  color:zweite textcolor:black

  barset:daten   # after every event ('''from/till''' or '''at''') the next event will be placed one bar lower,
                 # until barset:break resets to the first bar in this barset
  from:01/01/1985 till:08/01/1986 text:"Huber"

  barset:break
  from:03/02/1987 till:10/21/1993 text:"Maier" color:dritte

  barset:break
  from:10/15/1990 till:04/15/1996 text:"Hans"  color:orange
  from:10/15/1991 till:04/15/1995 text:"Karl"  color:coral
  from:03/15/1994 till:11/15/1996 text:"Ruth"  color:tan2

  barset:break
  barset:skip
  from:07/15/1996 till:03/15/1997 text:"Michi" color:dullyellow
  from:11/15/1997 till:01/15/2000 text:"Gerd"  color:yelloworange

  barset:break
  at:05/15/1998 mark:(line,red)
  at:05/15/1998 mark:(line,red)

  barset:break
  barset:skip
  from:07/15/2000 till:07/15/2001 text:"Gisi" color:skyblue
  from:03/15/1999 till:08/15/1999 text:"Bert" color:powderblue

  barset:break
  from:04/15/2002 till:$now       text:"Tutu" color:yellowgreen
  barset:skip
  from:08/15/2000 till:06/15/2004 text:"Caja" color:drabgreen

  barset:break
  barset:skip
  from:05/15/2002 till:01/15/2003 text:"Timo" color:oceanblue
  from:06/15/2005 till:$now       text:"Susi" color:limegreen

  barset:break
  barset:skip
  from:01/15/2004 till:$now       text:"Otto" color:lavender

TextData =
  fontsize:S
  textcolor:coral
  pos:(10,55)
  text:Erklärungen_(Legende)

Das gleiche Resultat lässt sich auch mit dem folgenden einfacheren Verfahren erreichen. Allerdings hat das Verfahren oben den Vorteil, dass es etwas leichter ist, neue Vorgänge hinzuzufügen oder die Daten umzustellen.

DateFormat=mm/dd/yyyy                      # Datenformat
Period = from:01/01/1984 till:04/01/2008   # Darstellung von bis
Define $now = 09/15/2006                   # Jetzt
ImageSize= width:800 height:auto barincrement:35 # Bildgröße
TimeAxis = orientation:horizontal          # Horizontal
PlotArea = right:5 left:20 bottom:80 top:5 # Plotarea bestimmt über die Ränder
Legend = orientation:vertical position:bottom columns:4 # Legende unterhalb in 4 Spalten

Colors =                                                     # Farben mit Legendenerklärung
     id:bg            value:white                            # Hintergrund
     id:erste         value:rgb(1,0.85,0.85) legend:Etwas
     id:zweite        value:rgb(1,1,0.6)     legend:Etwas_anderes
     id:dritte        value:rgb(0.8,1,0.8)   legend:Nochmal_etwas_anderes
     id:header        value:rgb(0.8,0.8,0.9)                 # Überschrift

BackgroundColors = canvas:bg
ScaleMajor = gridcolor:blue       unit:year increment:5 start:01/01/1985
ScaleMinor = gridcolor:powderblue unit:year increment:1 start:01/01/1984

BarData = 
  Bar: header
  Bar: ehr
  Bar: eins
  Bar: zwei
  Bar: drei

PlotData=
  width:25    anchor:middle  align:center
  bar:header  color:header   textcolor:darkblue
  fontsize:m  shift:(,-6)

  from:start till:05/01/1998 text:"Alt"
  at:05/15/1998 mark:(line,red)                     # Rote Linie bei 15.5.1998

  color:header textcolor:red
  fontsize:l   shift:(,-8)

  from:05/01/1998 till:01/10/2006 text:"Neu"

  anchor:from  align:left
  fontsize:s   shift:(5,-4)
  color:zweite textcolor:black

  bar:eins
  from:01/01/1985 till:08/01/1986 text:"Huber"
  from:03/02/1987 till:10/21/1993 text:"Maier" color:dritte
  from:10/15/1990 till:04/15/1996 text:"Hans"  color:orange
  at:05/15/1998 mark:(line,red)
  from:04/15/2002 till:$now text:"Tutu"        color:yellowgreen

  bar:zwei
  from:10/15/1991 till:04/15/1995 text:"Karl"  color:coral
  from:07/15/1996 till:03/15/1997 text:"Michi" color:dullyellow
  at:05/15/1998 mark:(line,red)
  from:07/15/2000 till:07/15/2001 text:"Gisi"  color:skyblue
  from:05/15/2002 till:01/15/2003 text:"Timo"  color:oceanblue
  from:01/15/2004 till:$now       text:"Otto"  color:lavender

  bar:drei
  from:03/15/1994 till:11/15/1996 text:"Ruth"  color:tan2
  from:11/15/1997 till:01/15/2000 text:"Gerd"  color:yelloworange
  from:03/15/1999 till:08/15/1999 text:"Bert"  color:powderblue
  from:08/15/2000 till:06/15/2004 text:"Caja"  color:drabgreen
  from:06/15/2005 till:$now       text:"Susi"  color:limegreen

TextData =
  fontsize:S
  textcolor:coral
  pos:(10,55)
  text:Erklärungen_(Legende)