Visual Timeline Template

Note from Lottie: The annotation is still ongoing but if there's a specific thing you think needs annotating, let me know and I will make sure to include it

date format options:

* yyyy - just years,
	+ integers from -9999 to 9999 without leading zeros
* dd/mm/yyyy - date/month/year format,
	+ year has to be min 1800
	+ (see issues below)
* mm/dd/yyyy - month/day/year format, same as above
	+ as the timelines I have already done on this wiki use dd/mm format rather than mm/dd, please use dd/mm when possible for internal consistency if nothing else)
* x.y - years with months and days as decimals
	+ means that you can have several chapters covering one day total and no awkward gaps such as below
	+ use a day in the year calculator to find the day, then divde by 365 (or 366)
	+ remember that the number given will represent the end of the day (ie 15 is midnight 15/01, so for midday 15/01 you want 14.5)
	+ doesn't do smaller scale marks than one year, so has to be done manually
	+ could potentially be used for days - using day count for x and time as a decimal for y - something to try? might fix the scales problem

see Category:Pages using Timeline for a list of all pages with timelines

## Timeline over several years

Source code

```
<timeline>
ImageSize  = width:840px height:auto barincrement:25px
PlotArea   = left:10px bottom:30px top:10px right:30px

DateFormat = dd/mm/yyyy
Period     = from:01/01/1971 till:31/12/1995
TimeAxis   = orientation:hor
AlignBars  = justify

Colors =
 #legends
 id:even  value:rgb(0.1,0.5,1)
 id:odd  value:rgb(0.5,0.9,1)
 id:grid1 value:gray(0.7)
 id:grid2 value:gray(0.95)

 id:span value:gray(0.3)

ScaleMajor  = unit:year increment:5 start:01/01/1975
ScaleMinor  = unit:year increment:1 start:01/01/1971

Define $span = color:span
Define $even = color:even
Define $odd = color:odd
Define $lshift = shift:(8,-4)
Define $jwidth = width:0.1

BarData=
 bar:space1
 bar:p
 bar:space2

PlotData=
  align:center fontsize:S width:15
 bar:p
 from:01/09/1971	till:28/02/1972		$odd    shift:(0,10)	text:I.1
 from:01/03/1972	till:31/07/1993		$even   shift:(0,10)	text:I.2
 from:01/08/1993	till:30/10/1995		$odd    shift:(0,10)	text:I.3
 from:31/10/1995	till:04/12/1995		$even   shift:(0,10)	text:I.4 - I.16

#LineData=
# at:11/11/1995
#
# points:(70,15)(80,15) $span

#TextData=
# pos:(280,10) text:show subparts.

</timeline>

```

## Timeline over months/days

### example 1 - dd/mm/yyyy format

As you can see, I.8 is a line and I.4 and I.6 are covered by the following chapter as they only cover a day

Source code

```
<timeline>
ImageSize  = width:834px height:auto barincrement:25px
PlotArea   = left:10px bottom:30px top:10px right:10px

DateFormat = dd/mm/yyyy
Period     = from:29/10/1995 till:05/12/1995
TimeAxis   = orientation:hor
AlignBars  = justify

Colors =
 #legends
 id:one  value:rgb(0.2,0.6,1)
 id:two  value:rgb(0.5,0.9,1)
 id:three value:rgb(0.5,0.5,1)
 id:grid1 value:gray(0.7)
 id:grid2 value:gray(0.95)

 id:span value:gray(0.3)

ScaleMajor  = unit:month increment:1 start:01/11/1995
ScaleMinor  = unit:day increment:1 start:29/10/1995

Define $span = color:span
Define $one = color:one
Define $two = color:two
Define $three = color:three

BarData=
 bar:space1
 bar:p
 bar:space2

PlotData=
  align:center fontsize:S width:15
 bar:p
 from:29/10/1995	till:30/10/1995		$one    shift:(10,-5)	text:I.3 #29/10=302= .8274 30/10 = 303 = .8301
 from:31/10/1995	till:31/10/1995		$two    shift:(-1,10)	text:I.4 #1995.8301 1995.8322
 from:31/10/1995	till:01/11/1995		$three  shift:(10,-5)	text:I.5 #1995.8322
 from:01/11/1995	till:01/11/1995		$one    shift:(0,10)	text:I.6 #work out end times here!
 from:01/11/1995	till:02/11/1995		$two    shift:(15,-5)	text:I.7
 from:03/11/1995	till:03/11/1995 	$three  shift:(0,10)	text:I.8
 from:04/11/1995	till:06/11/1995		$one    shift:(0,-5)	text:I.9
 from:06/11/1995	till:19/11/1995		$two    shift:(0,-5)	text:I.10
 from:20/11/1995	till:24/11/1995		$three  shift:(0,-5)	text:I.11
 from:24/11/1995	till:26/11/1995		$one    shift:(0,-5)	text:I.12
 from:26/11/1995	till:28/11/1995		$two    shift:(0,-5)	text:I.13
 from:29/11/1995	till:01/12/1995		$three  shift:(0,-5)	text:I.14
 from:02/12/1995	till:04/12/1995		$one    shift:(0,-5)	text:I.15
 from:04/12/1995	till:04/12/1995		$two    shift:(0,10)	text:I.16 #and here!

LineData=
# at:11/11/1995
#
# at:01/05/1996
 layer:back color:grid1 width:0.1
 at:30/10/1995
 at:06/11/1995
 at:13/11/1995
 at:20/11/1995
 at:27/11/1995
 at:04/12/1995
# points:(70,15)(80,15) $span

#TextData=
# pos:(280,10) text:show subparts.

</timeline>

```

### Example 2 - x.y format

.

Source code

```
<timeline>
ImageSize  = width:834px height:auto barincrement:25px  # barincrement is the width of the bar and surrounding whitespace - the bar width is set under PlotData
                                                        # so make sure there is some whitespace between bars, especially when you have more than one bar
PlotArea   = left:10px bottom:30px top:10px right:10px  # 834 chosen as timeline covers 37 days: 37*22+2*10=834 (somewhere between 800-840 is good)

DateFormat = x.y
Period     = from:1995.82466 till:1995.92603
TimeAxis   = orientation:hor
AlignBars  = justify

Colors =
 #legends
 id:even  value:rgb(0.2,0.6,1)
 id:odd  value:rgb(0.5,0.9,1)
 id:grid1 value:gray(0.5)
 id:grid2 value:gray(0.9)

 id:span value:gray(0.3)

#ScaleMajor  = unit:month increment:1 start:1995.8274	# these don't work with the x.y date system
#ScaleMinor  = unit:day increment:1 start:1995.8274  	# unless integer years - patch below

Define $even = color:even
Define $odd = color:odd
Define $lshift = shift:(8,-4)
Define $jwidth = width:0.1

BarData=
 bar:space1  	# space1 and space2 work with justify to ensure whitespace
 bar:p			# between the edges of the plot and the bars
 bar:space2

PlotData=
  align:center fontsize:S width:15
 bar:p
 from:1995.82466	till:1995.83014		$odd    shift:(0,-5)	text:I.3 #302-303 (30/10)
 from:1995.83014	till:1995.83219		$even   shift:(2,10)	text:I.4 #303-303.75 (31/10)
 from:1995.83219	till:1995.83356		$odd    shift:(0,-20)	text:I.5 #303.75-304.25 (31-01)
 from:1995.83356	till:1995.83493		$even   shift:(2,10)	text:I.6 #work out end times here! 304.25-304.75 (01/11)
 from:1995.83493	till:1995.83836		$odd    shift:(0,-5)	text:I.7 #304.75-306 (01-02)
 from:1995.83836	till:1995.84110		$even   shift:(0,-5)	text:I.8 #306-307 (03-03)
 from:1995.84110	till:1995.84794		$odd    shift:(0,-5)	text:I.9 #307-309.5 (04-06)
 from:1995.84795	till:1995.88493		$even   shift:(0,-5)	text:I.10 #309.5-323 (06-19)
 from:1995.88493	till:1995.89726		$odd    shift:(0,-5)	text:I.11 #323-327.5 (20-24)
 from:1995.89726	till:1995.90274		$even   shift:(0,-5)	text:I.12 #327.5-329.5 (24-26)
 from:1995.90274	till:1995.90959		$odd    shift:(0,-5)	text:I.13 #329.5-332 (26-28)
 from:1995.90959	till:1995.91781		$even   shift:(0,-5)	text:I.14 #332-335 (29-01)
 from:1995.91781	till:1995.92397		$odd    shift:(0,-5)	text:I.15 #335-337.25 (02-04)
 from:1995.92397	till:1995.92603		$even   shift:(0,10)	text:I.16 #337.25-338 (04-04) and here!

LineData=
 layer:back color:grid2 width:0.1
 at:1995.83014
 at:1995.83288 #304
 at:1995.83562 #305
 at:1995.83836 #306
 at:1995.84110 #307
 at:1995.84384 #308
 at:1995.84658 #309
 at:1995.84932 #310
 at:1995.85205 #311
 at:1995.85479 #312
 at:1995.85753 #313
 at:1995.86027 #314
 at:1995.86301 #315
 at:1995.86575 #316
 at:1995.86849 #317
 at:1995.87123 #318
 at:1995.87397 #319
 at:1995.87671 #320
 at:1995.87945 #321
 at:1995.88219 #322
 at:1995.88493 #323
 at:1995.88767 #324
 at:1995.89041 #325
 at:1995.89315 #326
 at:1995.89589 #327
 at:1995.89863 #328
 at:1995.90137 #329
 at:1995.90411 #330
 at:1995.90685 #331
 at:1995.90959 #332
 at:1995.91233 #333
 at:1995.91507 #334
 at:1995.91781 #335
 at:1995.92055 #336
 at:1995.92329 #337
 at:1995.92603 #338

 layer:back color:grid1 width:0.1
 at:1995.82740
 at:1995.84658
 at:1995.86575
 at:1995.88493
 at:1995.90411
 at:1995.92329

 layer:front color:black width:0.1
 points:(10,30)(824,30)
 points:(21,30)(21,27)
 points:(43,30)(43,27)
 points:(65,30)(65,27)
 points:(87,30)(87,25) #01/11
 points:(109,30)(109,27)
 points:(131,30)(131,27)
 points:(153,30)(153,27)
 points:(175,30)(175,27)
 points:(197,30)(197,27)
 points:(219,30)(219,27)
 points:(241,30)(241,27)
 points:(263,30)(263,27)
 points:(285,30)(285,27)
 points:(307,30)(307,27)
 points:(329,30)(329,27)
 points:(351,30)(351,27)
 points:(373,30)(373,27)
 points:(395,30)(395,27)
 points:(417,30)(417,27)
 points:(439,30)(439,27)
 points:(461,30)(461,27)
 points:(483,30)(483,27)
 points:(505,30)(505,27)
 points:(527,30)(527,27)
 points:(549,30)(549,27)
 points:(571,30)(571,27)
 points:(593,30)(593,27)
 points:(615,30)(615,27)
 points:(637,30)(637,27)
 points:(659,30)(659,27)
 points:(681,30)(681,27)
 points:(703,30)(703,27)
 points:(725,30)(725,27)
 points:(747,30)(747,25) #01/12
 points:(769,30)(769,27)
 points:(791,30)(791,27)
 points:(813,30)(813,27)
TextData=
 fontsize:S
 pos:(76,14) text:01/11
 pos:(736,14) text:01/12
</timeline>

```

do ticks in middle or ticks at start/end of day look better?