Pomoc:Timeline
Timeline – tag umożliwiający utworzenie wykresu na podstawie podanych danych (bez konieczności ich rysowania poza wiki). Chociaż w założeniu są to wykresy zdarzeń w czasie, to timeline może być użyty do przedstawienia dowolnych danych liczbowych jako wykres słupkowy. Pełna składnia jest szerzej opisana na stronie: Extension:EasyTimeline/syntax (w języku angielskim).
Uwaga! Funkcja timeline generuje obrazki bez tekstu alternatywnego (zobacz też Wikipedia:Dostępność). Nie umożliwia również dodania takiego tekstu. Używając timeline pamiętaj, żeby omówienie wykresu zmieścić w samym artykule. Można również dodać zwykła tabelę obok wykresu.
Przykład jako wykres słupkowy
Ten timeline został wzięty ze strony Inowrocław (autorzy strony).

Kod
<timeline> ImageSize = width:630 height:330 PlotArea = left:50 right:20 top:25 bottom:30 TimeAxis = orientation:vertical AlignBars = late Colors = id:linegrey2 value:gray(0.9) id:linegrey value:gray(0.7) id:cobar value:rgb(0.2,0.7,0.8) id:cobar2 value:rgb(0.6,0.9,0.6) DateFormat = yyyy Period = from:0 till:80000 ScaleMajor = unit:year increment:5000 start:0 gridcolor:linegrey ScaleMinor = unit:year increment:1000 start:0 gridcolor:linegrey2 PlotData = color:cobar width:19 align:left bar:1899 from:0 till:26000 bar:1931 from:0 till:34531 bar:1939 from:0 till:41000 bar:1946 from:0 till:35808 bar:1950 from:0 till:38005 bar:1955 from:0 till:42827 bar:1960 from:0 till:47267 bar:1965 from:0 till:51074 bar:1970 from:0 till:54911 bar:1975 from:0 till:59704 bar:1980 from:0 till:66114 bar:1985 from:0 till:72266 bar:1990 from:0 till:77688 bar:1997 color:cobar2 from:0 till:79571 bar:2002 from:0 till:77936 bar:2007 from:0 till:79489 PlotData= textcolor:black fontsize:S bar:1899 at: 26000 text: 26.000 shift:(-14,5) bar:1931 at: 34531 text: 34.531 shift:(-14,5) bar:1939 at: 41000 text: 41.000 shift:(-14,5) bar:1946 at: 35808 text: 35.808 shift:(-14,5) bar:1950 at: 38005 text: 38.005 shift:(-14,5) bar:1955 at: 42827 text: 42.827 shift:(-14,5) bar:1960 at: 47267 text: 47.267 shift:(-14,5) bar:1965 at: 51074 text: 51.074 shift:(-14,5) bar:1970 at: 54911 text: 54.911 shift:(-14,5) bar:1975 at: 59704 text: 59.704 shift:(-14,5) bar:1980 at: 66114 text: 66.114 shift:(-14,5) bar:1985 at: 72266 text: 72.266 shift:(-14,5) bar:1990 at: 77688 text: 77.688 shift:(-14,5) bar:1997 at: 79571 text: 79.571 shift:(-14,5) bar:2002 at: 77936 text: 77.936 shift:(-14,5) bar:2007 at: 79489 text: 79.489 shift:(-14,5) TextData= fontsize:S pos:(20,20) text: XXX 000 999 </timeline>
Elementy kodu
- <timeline> - znacznik otwierający i zamykający wykres
| Element kodu | Parametry | Opis |
|---|---|---|
|
width:630 height:330
|
oznacza odpowiednio szerokość i wysokość wykresu |
|
left:50 right:20 top:25 bottom:30
|
oznacza wolny obszar z lewej, prawej strony, z góry i z dołu |
|
orientation:vertical lub orientation:horizontal |
oznacza czy wykres jest ułożony wertykalnie czy horyzontalnie (poprzeczny/pionowy) |
|
late
|
|
|
spis oznaczeń (id) zdefiniowanych kolorów i wartości (value) ich składowych w skali RGB | |
|
yyyy
|
|
|
from:0 till:80000
|
oznacza od jakich do jakich wartości będzie skala |
|
unit:year increment:5000 start:0 gridcolor:linegrey
|
Linie główne na skali co ile (np. co 5000), kolor |
|
unit:year increment:1000 start:0 gridcolor:linegrey2
|
Linie pomocnicze na skali co ile (np. co 2000), color |
|
||
|
color:cobar width:19 align:left bar:1899 from:0 till:26000 |
dla roku 1899 wysokość słupka od 0 do 26000 |
|
textcolor:black fontsize:S bar:1899 at: 26000 text: 26.000 shift:(-14,5) |
dla słupka z roku 1899 tekst nad nim 26.000, jeśli po at: wpiszemy mniejszą bądź większa wartość, tekst 26.000 znajdzie się wyżej lub niżej |
| TextData= |
fontsize:S pos:(20,20) text: XXX 000 999 |
tekst pod wykresem (np. XXX 000 999) |
Skumulowany wykres słupkowy
Timeline można również wykorzystać jako skumulowany wykres słupkowy.
Wykres

Elementy kodu
// dane podstawowe wykresu
ImageSize = width:630 height:330
PlotArea = left:50 right:20 top:25 bottom:40
TimeAxis = orientation:vertical
AlignBars = late
// kolory z podanym „legend:” tworzą legendę
Colors =
id:linegrey2 value:gray(0.9)
id:linegrey value:gray(0.7)
id:col_k value:rgb(0.2,0.7,0.8) legend:kobiety
id:col_m value:rgb(0.6,0.9,0.6) legend:mężczyźni
Legend = left:70 top:290 columns:2 columnwidth:70
DateFormat = yyyy
Period = from:0 till:100000
ScaleMajor = unit:year increment:5000 start:0 gridcolor:linegrey
ScaleMinor = unit:year increment:1000 start:0 gridcolor:linegrey2
// dane dla kobiet od 0
PlotData =
color:col_k width:25 align:center shift:(0,5)
bar:1899 from:0 till:26000
at:26000 text: 26~(tys.) shift:(0,15)
bar:1931 from:0 till:34531
at:34531 text: 34,5
bar:1939 from:0 till:41000
at:41000 text: 41
bar:1946 from:0 till:35808
at:35808 text: 35,8
bar:1950 from:0 till:38005
at:38005 text: 38
bar:1955 from:0 till:42827
at:42827 text: 42,8
bar:1960 from:0 till:47267
at:47267 text: 47,3
bar:1965 from:0 till:51074
at:51074 text: 51,1
bar:1970 from:0 till:54911
at:54911 text: 54,9
bar:1975 from:0 till:59704
at:59704 text: 59,7
bar:1980 from:0 till:66114
at:66114 text: 66,1
// dane dla mężczyzn
PlotData =
color:col_m width:25 align:center shift:(0,5)
bar:1899 from:26000 till:37700
at:37700 text: 11,7
bar:1931 from:34531 till:50069
at:50069 text: 15,5
bar:1939 from:41000 till:59450
at:59450 text: 18,5
bar:1946 from:35808 till:51921
at:51921 text: 16,1
bar:1950 from:38005 till:55107
at:55107 text: 17,1
bar:1955 from:42827 till:62099
at:62099 text: 19,3
bar:1960 from:47267 till:68537
at:68537 text: 21,3
bar:1965 from:51074 till:74057
at:74057 text: 23
bar:1970 from:54911 till:79620
at:79620 text: 24,7
bar:1975 from:59704 till:86570
at:86570 text: 26,9
bar:1980 from:66114 till:95865
at:95865 text: 29,8
// dodatkowa etykieta pod wykresem; pos(x,y) liczone od lewego, dolnego rogu
TextData=
fontsize:S pos:(20,15)
text: Populacja w latach
Tak na marginesie można zwrócić uwagę, że dla Timeline dane „bar:1899 from:26000 till:37700” to jakaś wartość 1899 w latach 26000 do 37700. To taki trick i w dużej mierze nie ma znaczenia. Ma to jednak parę konsekwencji:
- Wartości „from:26000 till:37700” muszą być liczbami całkowitymi.
- Wartości we „from:” „till:” muszą być zawarte w okresie czasu podanym jako „Period”.
- Jako „bar:” możesz wpisać cokolwiek (nawet tekst).
- Słupki zawsze są rozłożone równomiernie (nawet jeśli jako „bar:” wpiszesz odległe od siebie liczby).
Przykład jako linia czasu
Ze strony Wikipedia:Komitet Arbitrażowy/skład autorstwa Leinada

Kod
<timeline>
DateFormat = dd/mm/yyyy
ImageSize = width:850 height:auto barincrement:22
Period = from:01/09/2007 till:31/12/2010
TimeAxis = orientation:horizontal format:yyyy
PlotArea = right:20 left:20 bottom:60 top:6
Legend = position:bottom orientation:horizontal
Colors =
id:bg value:rgb(0.953,0.953,1)
id:current value:rgb(0.7,0.9,0.7) legend:Obecni_członkowie
id:recurrent value:rgb(0.8,0.9,0.8) legend:Członek_obecnej_kadencji
id:previous value:rgb(0.9,0.8,0.5) legend:Byli_członkowie
id:line value:black
id:lightline value:rgb(0.8,0.8,0.8)
id:header value:rgb(0.6,0.6,0.9)
BackgroundColors = canvas:bg
ScaleMajor = gridcolor:line unit:year increment:1 start:01/01/2008
ScaleMinor = gridcolor:lightline unit:month increment:1 start:01/09/2007
BarData =
Bar:T1
Barset:MainBar
PlotData =
width:15 textcolor:black
bar:T1 color:header textcolor:white width:20 shift:(-140,-5) fontsize:m from:01/09/2007 till:end text:"Członkowie Komitetu Arbitrażowego"
barset:MainBar
barset:break
shift:(5,-5) anchor:from fontsize:m
color:previous from:22/09/2007 till:21/09/2008 text:"[[Wikipedysta:Aegis Maelstrom|Aegis Maelstrom]]"
color:previous from:22/09/2007 till:21/03/2008 text:"[[Wikipedysta:Cień|Cień]]"
color:recurrent from:22/09/2007 till:21/03/2008 text:"[[Wikipedysta:Gytha|Gytha]]"
color:recurrent from:22/09/2007 till:21/03/2008 text:"[[Wikipedysta:Ludmiła Pilecka|Ludmiła Pilecka]]"
color:previous from:22/09/2007 till:21/09/2008 text:"[[Wikipedysta:Maire|Maire]]"
color:previous from:22/09/2007 till:21/09/2008 text:"[[Wikipedysta:Pimke|Pimke]]"
color:previous from:22/09/2007 till:21/03/2008 text:"[[Wikipedysta:Polimerek|Polimerek]]"
color:previous from:22/09/2007 till:21/09/2008 text:"[[Wikipedysta:Wpedzich|Wpedzich]]"
color:previous from:22/09/2007 till:21/09/2008 text:"[[Wikipedysta:Wulfstan|Wulfstan]]"
barset:break
at:01/09/2007
color:previous from:22/03/2008 till:21/03/2009 text:"[[Wikipedysta:ABX|ABX]]"
color:previous from:22/03/2008 till:21/03/2009 text:"[[Wikipedysta:Eteru|Eteru]]"
color:recurrent from:22/03/2008 till:11/05/2008 text:"[[Wikipedysta:Margoz|Margoz]]"
at:01/09/2007
at:01/09/2007
color:previous from:22/03/2008 till:21/03/2009 text:"[[Wikipedysta:Paterm|Paterm]]"
at:01/09/2007
at:01/09/2007
barset:break
at:01/09/2007
at:01/09/2007
at:01/09/2007
color:previous from:13/05/2008 till:21/03/2009 text:"[[Wikipedysta:Masti|Masti]]"
at:01/09/2007
at:01/09/2007
at:01/09/2007
at:01/09/2007
at:01/09/2007
barset:break
color:previous from:22/09/2008 till:21/09/2009 text:"[[Wikipedysta:Bukaj|Bukaj]]"
at:01/09/2007
at:01/09/2007
at:01/09/2007
color:previous from:22/09/2008 till:21/09/2009 text:"[[Wikipedysta:Filip em|Filip em]]"
color:current from:22/09/2008 till:21/09/2010 text:"[[Wikipedysta:Karol007|Karol007]]"
at:01/09/2007
color:previous from:22/09/2008 till:21/09/2009 text:"[[Wikipedysta:Maikking|Maikking]]"
color:previous from:22/09/2008 till:21/09/2009 text:"[[Wikipedysta:Wiktoryn|Wiktoryn]]"
barset:break
at:01/09/2007
color:current from:22/03/2009 till:21/03/2010 text:"[[Wikipedysta:Awersowy|Awersowy]]"
color:current from:22/03/2009 till:21/03/2010 text:"[[Wikipedysta:Elfhelm|Elfhelm]]"
color:current from:22/03/2009 till:21/03/2010 text:"[[Wikipedysta:Ludmiła Pilecka|Ludmiła Pilecka]]"
at:01/09/2007
at:01/09/2007
color:previous from:22/03/2009 till:21/09/2009 text:"[[Wikipedysta:Przykuta|Przykuta]]"
at:01/09/2007
at:01/09/2007
barset:break
color:current from:22/09/2009 till:21/09/2010 text:"[[Wikipedysta:Gytha|Gytha]]"
at:01/09/2007
at:01/09/2007
at:01/09/2007
color:current from:22/09/2009 till:21/09/2010 text:"[[Wikipedysta:Loraine|Loraine]]"
at:01/09/2007
color:current from:22/09/2009 till:21/03/2010 text:"[[Wikipedysta:Kicior99|Kicior99]]"
color:current from:22/09/2009 till:21/09/2010 text:"[[Wikipedysta:Margoz|Margoz]]"
color:current from:22/09/2009 till:21/09/2010 text:"[[Wikipedysta:Pablo000|Pablo000]]"
</timeline>
Elementy kodu
- <timeline> - znacznik otwierający i zamykający wykres
| Element kodu | Parametry | Opis |
|---|---|---|
|
width:850 height:auto barincrement:22 oznacza...
| |
|
right:20 left:20 bottom:60 top:6 oznacza...
| |
|
orientation:horizontal format:yyyy oznacza...
| |
|
Bar:T1 Barset:MainBar | |
|
||
|
yyyy
| |
|
from:01/09/2007 till:31/12/2010
| |
|
gridcolor:line unit:year increment:1 start:01/01/2008
| |
|
gridcolor:lightline unit:month increment:1 start:01/09/2007
| |
|
width:15 textcolor:black
| |
|
position:bottom orientation:horizontal
|
Zobacz też
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.