साँचा:Simple Horizontal timeline/doc

मुक्त ज्ञानकोश विकिपीडिया से
नेविगेशन पर जाएँ खोज पर जाएँ

साँचा:lua This is a Lua implementation of साँचा:tl. It has all the functionality of the legacy one with few more features added to it.

Parameters

Basic Plot settings

  • साँचा:para Border of the plot
  • साँचा:para Background color of the plot
  • साँचा:para Width of the timeline plot. Defaults to साँचा:code, can be in साँचा:code or साँचा:code 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 साँचा:para should be positive and vice versa. If not the outcome is undetermined.

The rowसाँचा:sub parameter

|rowसाँचा:sub= 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:

Generic Parameters

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

Scale Row

  • |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 साँचा:code.

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

Example Usage

Example without |axis-nudge=
ऐसा लिखें ऐसा दिखायी देगा
{{Simple Horizontal timeline
|from=-2000
|to=2000
|inc=500
|row1=scale
}}
−2000
−1500
−1000
−500
0
500
1000
1500
2000

साँचा:markup

साँचा:markup

Timeline Row

Note: साँचा:code or साँचा:code both are acceptable variations for the whole module.
Note on Subscripts:

Style Parameter of the Timeline Row

Example Usage

साँचा:cot साँचा:code साँचा:cob साँचा:cot

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)
1003
1015
1027
1039
1051
1063
1075
1087
1099
1111
1123
1135
1147
1159
1171
1183
1195
1207
1219
1231
1243
1255
1267
1279

Popes and Antipopes of the Catholic Church from 1003 - 1254

साँचा:cob

Note Row

Example Usage

ऐसा लिखें ऐसा दिखायी देगा
{{Simple Horizontal timeline

|from=-600
|to=0

|row1=note
|row1-1-text='''Minor events'''
|row1-1-shift=-2.8em
|row1-1-arrow= 
|row1-1-at=-590
|row1-2-at=-542
|row1-2-text=[[End-Ediacaran extinction|End-Ediacaran?]]
|row1-3-at=-420
|row1-3-text=[[Lau event]]
|row1-4-at=-183
|row1-4-text=[[Toarcian turnover]]
|row1-4-lift=-1em
|row1-4-shift=-4.8
|row1-6-at=-91.5
|row1-6-text=[[Cenomanian-Turonian boundary event|Cenomanian-Turonian]]
|row1-6-lift=-1.3em
|row1-6-shift=-5.1

|row2=scale
|axis-nudge=-0.8em
|caption=Millions of years before present

}}
−600
−480
−360
−240
−120
0

Millions of years before present

Note: साँचा:para is missing. Same as n, i does not have to be continuous.

Usage Tips

Examples

Known Issues

  • 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