Help:Timeline format

From semantic-mediawiki.org
Help:Timeline format时间轴格式
Timeline format
Displays query results in interactive timelines
Further Information
Provided by: Extension "Semantic Result Formats"
Added: 1.4.0
Removed: still supported
Requirements: none
Format name: timeline
Enabled? Indicates whether the result format is enabled by default upon installation of the respective extension. yes
Authors: Markus Krötzsch
Categories: time
Keywords
Table of Contents
This result format is not currently maintained. It might not work with the latest version of Semantic MediaWiki.

The result format timeline is used to display query results in interactive timelines. This format was part of Semantic MediaWiki until Semantic MediaWiki 1.3.0Released on 7 September 2008 and compatible with MW 1.12.x - 1.15.x. and is now part of extension "Semantic Result Formats"Provides additional formats for semantic queries. Obviously, only results that include dates can be displayed in this way. This format only works when JavaScript is enabled. It is very similar to the eventline format.

Usage[edit]

The timeline format uses printout statements in queries for properties of datatype "Date"Holds particular points in time. If the timeline remains empty even though there are results, this is usually because no printouts for dates were specified. Timeline will normally use the first and optionally second date and display every result as a single point (one date given) or interval (two dates given). All other printout statements are shown in the tooltips that appear when clicking on items.

Parameters[edit]

Parameter Type Default Description
timelinesize text 300px The height of the timeline
timelineposition text middle Defines where the timeline initially focuses at.
timelinestart text empty A property name used to define a first time point
timelineend text empty A property name used to define a second time point
timelinebands list of texts MONTH, YEAR Defines which bands are displayed in the result.
template text empty The name of a template with which to display the printouts
named args yes/no no Name the arguments passed to the template

Available values for parameters:

  • timelinebands: Available bands are DECADE, YEAR, MONTH, WEEK, DAY, HOUR and MINUTE. Bands should be given from finer to coarser, and be separated by commas as in the example below.
  • timelineposition: Possible values are start (earliest entry), middle (middle entry), end (latest entry), today.

Example[edit]

{{#ask:
 [[News date::+]]
 [[Language code::en]]
 |?News date
 |sort=News date
 |order=descending
 |format=timeline
 |timelinebands=MONTH,YEAR,DECADE
 |timelineposition=end
 |limit=150
}}

This produces the following output:

Jul
Aug
Sep
Oct
Nov
Dec
2023
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2024
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2025
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2026
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2027
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
SMWCon Fall 2022 announced
Semantic mediawiki 4.0.2 released
Semantic MediaWiki 4.0.2 released
Semantic MediaWiki 4.1.0 released
Semantic MediaWiki 4.1.1 released
SMW sponsorship program started
Semantic MediaWiki 4.1.2 released
SMWCon Fall 2023 announced
Semantic MediaWiki at the MediaWiki Hackathon 2024 (May 3 to 5, 2024)
MediaWiki Users and Developers Conference 2024 (April 17 to 19, 2024)
Semantic MediaWiki 4.1.3 released
SMWCon Fall 2024 announced
Semantic MediaWiki 4.2.0 released
Wikimedia Hackathon 2025 in Istanbul
MediaWiki Users and Developers Conference 2025 (May 14-16, 2025)
Semantic MediaWiki 5.0.0 released
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
1700
1710
1720
1730
1740
1750
1760
1770
1780
1790
1800
1810
1820
1830
1840
1850
1860
1870
1880
1890
1900
1910
1920
1930
1940
1950
1960
1970
1980
1990
2000
2010
2020
2030
2040
2050
2060
2070
2080
2090
2100
2110
2120
2130
2140
2150
2160
2170
2180
2190
2200
2210
2220
2230
2240
2250
2260
2270
2280
2290
2300
2310
2320
2330
2340
Loading...

Remarks[edit]

Page load times can be slowed down by timelines, especially if a large number of events is displayed. It is useful to use a smaller limit to keep the timeline more manageable for browsers.

Sorting results has no impact on the display of the timeline, since it always displays events chronologically. However, sorting can be very useful to select, e.g. the ten latest events instead of ten arbitrary events for display.