Template:Horizontal timeline

From Atlas
Template documentation[view] [edit] [history] [purge]

Template:Horizontal timeline is used to create a horizontal timeline.


Basic plot settings[edit]

  • |border= Border of the plot. E.g. 2px solid #CFD2AA
  • |bgCol= Background color of the plot
  • |width= Width of the timeline plot. Defaults to 100%, can be in px or em too
  • |caption= shows a centered text. Can be used to show legends. Intended to be used to label the axis
  • |from= and |to= Necessary parameters which denotes the start and end of the timeline axis. The entire timeline (for the entire plot) including other type of rows are drawn to this scale. |to= may or may not be greater than |from=. (see |inc= for more on this) If any bars described using parameters shown below lie outside these values, they will be trimmed or eliminated depending on their position.
  • |inc= Optional Increment to be added to |from= to reach |to= and be displayed along the axis. If not specified it will be automatically calculated. If |to= is greater than |from= then |inc= should be positive and vice versa. If not the outcome is undetermined.

The rown parameter[edit]

|rown= specifies how horizontal rows are drawn. You can have as many rows as you want. Subscript are positive integers. They specify where the row is rendered on the plot. Lower subscript indicate higher on the plot. That is |row3= will be above |row4=

Three differenct types of rows are possible. They are:

  • scale: Specifies where the axis is drawn. (how it is drawn can be found in the Scale Row section below).
  • timeline: Specifies where and how the bars are drawn.
  • note: Row that contains arrow marked notes to give explanations to the graph.

Generic parameters[edit]

  • |height= Applies height of timeline and note rows.

Each of these types of rows have their own attributes specified with an hyphen. For example, the style of a rown can be specified as |rown-style=. Full list of available attributes and their description can be found below.

Scale row[edit]

  • |axis-negativeFmt=, |axis-positiveFmt= and |axis-zeroFmt= Formatting options for Axis scale. If you want more customization, (like completely hiding a single label on the axis) use the following:
    • |axis-value= - Used to replace the value label on the axis (It will work if and only if the exact value appears on it).
    • |axis-marker-value= - Used to replace the marker point for a label that appears on the axis. (It will work if and only if the exact value appears on it).
  • |axis-nudge= Amount of nudge to be applied to the axis label, defaults to -1.8em.

|axis-marker-1878=  |axis-1878= 

Example usage[edit]

Example without |axis-nudge=
Markup Renders as
{{Horizontal timeline
Example with |axis-nudge= and label formating
Markup Renders as
{{Horizontal timeline
|axis-negativeFmt=%s BC
|axis-positiveFmt=%s AD
|axis-zeroFmt= %s AD
2000 BC
1500 BC
1000 BC
500 BC
0 AD
500 AD
1000 AD
1500 AD
2000 AD
Example with |axis-value= and |axis-marker-value=
Markup Renders as
{{Horizontal timeline
|axis--2000=this is minus<br/>two thousand
|axis-0=Changed<br/>axis marker
axis marker

Timeline row[edit]

  • |rown-bordertop= and |rown-borderbottom= Specifies the top and bottom border for the row.
  • |rown-texttop= specifies vertical nudge for the bar labels for the entire row.
  • |rown-colour= or |rown-color= specifies the row's background color.
Note: colour or color both are acceptable variations for the whole module.
  • |rown-i-from= Starting point for the bar. This is optional, if not specified, will start from value specified in |from=.
  • |rown-i-to= Ending point for the bar.
  • |rown-i-text= Label for the bar.
  • |rown-i-fontsize= Font size for the label.
  • |rown-i-texttop= Vertical nudge for the label of ith bar.
  • |rown-i-colour= bar colour.
  • |rown-i-border= bar border (See Known Issues).
Note on Subscripts:
  • |rown-i-<attribute>= denotes the attribute value for ith bar on the nth row.
  • Here subscript n is a positive number used to group rows and their attributed. They may not occur continuous in your script, but are displayed in ascending order.
  • Subscript i is also a positive number which is used to group bar on a specific row.

Style parameter of the timeline row[edit]

  • |rown-style= and |rown-i-style= can be used to provide row specific or bar specific styles. Those styles which repeat for every bar or for every row may be grouped into styles and be applied globally. The style prefixes can be anything other than row. See example below on how |styleDefault= is used to apply style common to all rows and |stylePopes=/|styleAntiPopes= are used to specify bar specific styles.

Example usage[edit]


{{Horizontal timeline



|stylePopes-border=none;border:2px solid #D0A200

|styleAntiPopes-border=none;border:2px solid #E20000

|row1-3-text=[[Pope John XVII|John XVII]] (1003)

|row1-5-text=[[Pope Honorius II|Honorius II]] (1124–1130)

|row2-3-text=[[Pope John XVIII|John XVIII]] (1004–1009)

|row2-5-text=[[Antipope Celestine II|Celestine II]] (1124), antipope

|row3-3-text=[[Pope Sergius IV|Sergius IV]] (1009–1012)

|row3-5-text=[[Pope Innocent II|Innocent II]] (1130–1143)

|row4-3-text=[[Pope Benedict VIII|Benedict VIII]] (1012–1024)

|row4-5-text=[[Antipope Anacletus II|Anacletus II]] (1130–1138), antipope

|row5-3-text=[[Antipope Gregory VI|Gregory VI]] (1012), antipope

|row5-5-text=[[Antipope Victor IV (1138)|Victor IV]] (1138), antipope

|row6-3-text=[[Pope John XIX|John XIX]] (1024–1032)

|row6-5-text=[[Pope Celestine II|Celestine II]] (1143–1144)

|row7-3-text=[[Pope Benedict IX|Benedict IX]] (1032–1044, 1045 and 1047–1048)

|row7-5-text=[[Pope Lucius II|Lucius II]] (1144–1145)

|row8-3-text=[[Pope Silvester III|Silvester III]] (1045)

|row8-5-text=[[Pope Eugene III|Eugene III]] (1145–1153)

|row9-3-text=[[Pope Benedict IX|Benedict IX]] (1032–1044, 1045 and 1047–1048)

|row9-5-text=[[Pope Anastasius IV|Anastasius IV]] (1153–1154)

|row10-3-text=[[Pope Gregory VI|Gregory VI]] (1045–1046)

|row10-5-text=[[Pope Hadrian IV|Hadrian IV]] (1154–1159)

|row11-3-text=[[Pope Clement II|Clement II]] (1046–1047)

|row11-5-text=[[Pope Alexander III|Alexander III]] (1159–1181)

|row12-3-text=[[Pope Benedict IX|Benedict IX]] (1032–1044, 1045 and 1047–1048)

|row12-5-text=[[Antipope Victor IV (1159-1164)|Victor IV]] (1159–1164), antipope

|row13-3-text=[[Pope Damasus II|Damasus II]] (1048)

|row13-5-text=[[Antipope Paschal III|Paschal III]] (1164–1168), antipope

|row14-3-text=[[Pope Leo IX|Leo IX]] (saint) (1049–1054)

|row14-5-text=[[Antipope Callixtus III|Callixtus III]] (1168–1178), antipope

|row15-3-text=[[Pope Victor II|Victor II]] (1055–1057)

|row15-5-text=[[Antipope Innocent III|Innocent III]] (1179–1180), antipope

|row16-3-text=[[Pope Stephen IX|Stephen IX]] (1057–1058)

|row16-5-text=[[Pope Lucius III|Lucius III]] (1181–1185)

|row17-3-text=[[Pope Nicholas II|Nicholas II]] (1058–1061)

|row17-5-text=[[Pope Urban III|Urban III]] (1185–1187)

|row18-3-text=[[Antipope Benedict X|Benedict X]] (1058–1059), antipope

|row18-5-text=[[Pope Gregory VIII|Gregory VIII]] (1187)

|row19-3-text=[[Antipope Honorius II|Honorius II]] (1061–1064), antipope

|row19-5-text=[[Pope Clement III|Clement III]] (1187–1191)

|row20-3-text=[[Pope Alexander II|Alexander II]] (1061–1073)

|row20-5-text=[[Pope Celestine III|Celestine III]] (1191–1198)

|row21-3-text=[[Pope Gregory VII|Gregory VII]] (saint) (1073–1085)

|row21-5-text=[[Pope Innocent III|Innocent III]] (1198–1216)

|row22-3-text=[[Antipope Clement III|Clement III]] (1084–1100), antipope

|row22-5-text=[[Pope Honorius III|Honorius III]] (1216–1227)

|row23-3-text=[[Pope Victor III|Victor III]] (1085–1087)

|row23-5-text=[[Pope Gregory IX|Gregory IX]] (1227–1241)

|row24-3-text=[[Pope Urban II|Urban II]] (1088–1099)

|row24-5-text=[[Pope Celestine IV|Celestine IV]] (1241)

|row25-3-text=[[Pope Paschal II|Paschal II]] (1099–1118)

|row25-5-text=[[Pope Innocent IV|Innocent IV]] (1243–1254)

|row26-3-text=[[Antipope Theodoric|Theodoric]] (1100), antipope

|row27-3-text=[[Antipope Adalbert|Adalbert]] (1102), antipope

|row28-3-text=[[Antipope Silvester IV|Silvester IV]] (1105–1111), antipope

|row29-3-text=[[Pope Gelasius II|Gelasius II]] (1118–1119)

|row30-3-text=[[Antipope Gregory VIII|Gregory VIII]] (1118–1121), antipope

|row31-3-text=[[Pope Callixtus II|Callixtus II]] (1119–1124)

|caption=Popes and Antipopes of the Catholic Church from 1003 - 1254
Renders as
John XVII (1003)
Honorius II (1124–1130)
John XVIII (1004–1009)
Celestine II (1124), antipope
Sergius IV (1009–1012)
Innocent II (1130–1143)
Benedict VIII (1012–1024)
Anacletus II (1130–1138), antipope
Gregory VI (1012), antipope
Victor IV (1138), antipope
John XIX (1024–1032)
Celestine II (1143–1144)
Benedict IX (1032–1044, 1045 and 1047–1048)
Lucius II (1144–1145)
Eugene III (1145–1153)
Benedict IX (1032–1044, 1045 and 1047–1048)
Anastasius IV (1153–1154)
Gregory VI (1045–1046)
Hadrian IV (1154–1159)
Clement II (1046–1047)
Alexander III (1159–1181)
Benedict IX (1032–1044, 1045 and 1047–1048)
Victor IV (1159–1164), antipope
Damasus II (1048)
Paschal III (1164–1168), antipope
Leo IX (saint) (1049–1054)
Callixtus III (1168–1178), antipope
Victor II (1055–1057)
Innocent III (1179–1180), antipope
Stephen IX (1057–1058)
Lucius III (1181–1185)
Nicholas II (1058–1061)
Urban III (1185–1187)
Benedict X (1058–1059), antipope
Honorius II (1061–1064), antipope
Clement III (1187–1191)
Alexander II (1061–1073)
Celestine III (1191–1198)
Gregory VII (saint) (1073–1085)
Innocent III (1198–1216)
Clement III (1084–1100), antipope
Honorius III (1216–1227)
Victor III (1085–1087)
Gregory IX (1227–1241)
Urban II (1088–1099)
Paschal II (1099–1118)
Innocent IV (1243–1254)
Theodoric (1100), antipope
Adalbert (1102), antipope
Silvester IV (1105–1111), antipope
Gelasius II (1118–1119)
Gregory VIII (1118–1121), antipope
Callixtus II (1119–1124)
Popes and Antipopes of the Catholic Church from 1003 - 1254

Note row[edit]

  • |rown-i-at= Necessary parameter. Specifies where the note is placed
  • |rown-i-text= Specifies the content of the note
  • |rown-i-shift= and |rown-i-lift= Specifies the nudge applied to the note. Defaults to 0em
  • |rown-i-arrow= Specifies the arrow Character. Defaults to . Nullify with &nbsp;.

Example usage[edit]

{{Horizontal timeline


|row1-1-text='''Minor events'''
|row1-2-text=[[End-Ediacaran extinction|End-Ediacaran?]]
|row1-3-text=[[Lau event]]
|row1-4-text=[[Toarcian turnover]]
|row1-6-text=[[Cenomanian-Turonian boundary event|Cenomanian-Turonian]]

|caption=Millions of years before present

Renders as
Millions of years before present

Note: |row1-5-lift= is missing. Same as n, i does not have to be continuous.

Usage tips[edit]


Known issues[edit]

  • Left and bottom border for bars (not rows) will not render properly in old browsers which lacks support for CSS3 Box-sizing.(Refer here for full supported browser list) All modern browsers provides at-least minimal support for this. Also only in extereme circumstances you will need to set bar border. Most of the time row border will be sufficient. Hence this should not be a problem.

See also[edit]

Template:Sandbox other