Help:Timeline format

From semantic-mediawiki.org
Jump to: navigation, search
Timeline format
Displays query results in interactive timelines
Available languages
deenenzh-hanszh-hans
Further Information
Provided by: Semantic Result Formats
Added: 1.4.0
Removed: still supported
Requirements: none
Format name: timeline
Enabled by default: Indicates whether the result format is enabled by default upon installation of the respective extension. yes
Authors: Markus Krötzsch
Categories: time
Group:
Table of Contents

↓ INFO ↓

Note: This result format is not currently maintained. It might not work with the latest version of SMW.

The result format timeline is used to display query results in interactive timelines. This format was part of SMW until SMW 1.3 and is now part of the Semantic Result Formats extension. 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

The timeline format uses printout statements in queries for properties of datatype Date. 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

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

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

{{#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:

You need to have JavaScript enabled to view the interactive timeline. Further results for this query.

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.


This documentation page applies to all SMW versions from 1.4.0 to the most current version.
Other versions: 0.6 – 1.3       Other languages: dezh-hans

Help:Timeline format en 1.4.0