Help:Timeline format 0.6
From semantic-mediawiki.org
The result formats timeline and eventline are used to display query results in interactive timelines. These formats are part of SMW until SMW 1.3. Obviously, only results that include dates can be displayed in this way. This format only works when JavaScript is enabled.
Example
{{#ask: [[News date::+]] [[language code::en]]
| ?news date
| sort=news date
| order=descending
| format=timeline
| timelinebands=MONTH,YEAR
| timelineposition=end
| limit=10
}}
This produces the following output:
Semantic MediaWiki 1.4.0 released: easier upgrade and installation, better date support, special property integration, more robust2008-11-21T00:00:000News date 21 November 2008
SMW Project releases SMW 1.4 alpha for extension developers2008-10-26T00:00:000News date 26 October 2008
New resources for developers2008-08-28T00:00:000News date 28 August 2008
SMW 1.2.2 brings minor bugfixes2008-08-27T00:00:000News date 27 August 2008
Semantic MediaWiki 1.2.1 released: CSV export, subproperty display, important bugfixes2008-08-08T00:00:000News date 8 August 2008
Semantic MediaWiki at Wikimania 20082008-07-19T00:00:000News date 19 July 2008
Semantic MediaWiki 1.2 released: new query features, vCard export, sortkeys, faster2008-07-10T00:00:000News date 10 July 2008
New site, Referata, offers hosting of SMW and related extensions2008-07-03T00:00:000News date 3 July 2008
Security fix for SMW: please update2008-06-16T00:00:000News date 16 June 2008
2008-12-16T00:00:00
Usage and parameters
The timeline formats use printout statements in queries for properties of Type:Date. If the timeline remains empty even though there are resutls, 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.
Eventline is similar, but displays all dates in the printout as separate points. So a query with five data printouts would create five points on the timeline for each result. Different colors are used to maintain some visual hint of which points belong to which result. Again the tooltip shows all details.
The timeline and eventline formats introduce the following additional parameters:
- timelinebands: defines which bands are displayed in the result. Available bands are DECADE, YEAR, MONTH, WEEK, and DAY. Bands should be given from finer to coarser, and be separated by commas as in the above example.
- timelineposition: defines where the timeline initially focusses at. Possible values are start (earliest entry), middle (middle entry), end (latest entry).
- timelinestart: can be used to define a specific printout (property) name to use as a first timepoint in timeline.
- timelineend: can be used to define a specific printout (property) name to use as a second timepoint in timeline.
- timelinesize: can be used to give the height of the timeline. The default value is 300px.
Remarks
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.

