Extensions to the Viewer

Extensions are instances of a classes written in the Java programming language and referenced in an event's definition. Extensions provide useful features that add to the basic functions supplied with the QViewer. Some extensions are supplied with the Quotidian Viewer and can be used by any author of a timeline. Third parties can write, license and distribute their own extensions.

Because extensions are written in a general program language and can be loaded from an external source, security is an important concern.



A custom extension that downloads historical stock data and draws a candle graph

An extension is allowed to partly or completely take over drawing an event. It can use any of the graphics functions in the OpenGL library that QViewer uses to draw in the display area. Extensions should draw only within the boundaries of the category to which the event is attached.


Drawing in event endcuts is always handled by an extension.

creating events


The moon extension creates events for the new and full moons.

Some extensions create one or more events and add them to the category attached to the event that references the extension. This is useful when events come from a source other than timeline files or when events are rapidly changing. The source might be a calendar file, a database, or an external server supplying financial data. There is no limit to the number of events that can be created or what can be included in the created event's definitions. However, creating huge numbers can slow down redisplay and viewpoint movement. The extension can decide when the list of events needs to be recreated. This allows the extension to dynamically create only the events visible from the current viewpoint and to remove the others.


loading and unloading files


The USBaseball demo loads the games for each season from a separate file.

Events can request that other timeline files be automatically loaded or unloaded by the QViewer. This allows a request to draw an event, perhaps when the display time or level of detail changes, to trigger the appearance of more detailed events. This can be very useful in definitions of large category structures, where most categories are almost always off screen and not drawn unless the user consciously moves to their positions.


The USBaseball example has events for each team in each league in each season. An extension is attached to an event in a category that contains all these other events. When the time scale increases to a certain value, a file containing events for each game played during the current year (the year containing the display time) is loaded. If a file for another year was previously loaded, it is removed. This way only one year of games at a time (several thousand games in recent years) is in memory at a time.

built-in extensions

Some generally useful extensions are included with the QViewer.


Graph takes as input a list of pairs of times and numbers. The numbers are scaled to fit in the height of the category and a flat plane is drawn between the values at each time. More than one of these can be attached to the same category with transparent colors to graph multiple values.

GraphMulti and GraphMultiLine

These extensions work together to draw a multi-line graph. GraphMulti is given a list of time values. Each GraphMultiLine is given a list of data values that correspond to the time values in a single GraphMulti. The color assigned to each event with a GraphMultiLine extension is used to draw a line on the graph. The lines can be drawn separately or sucessive lines can be added together.


A set of numbers represents parts making up some whole during some time interval. The size of the whole is the sum of these numbers and each number is translated into a percentage of that whole. The event drawn is divided into parts and each part is given a color and a label.



The Shape extension draws geometric shapes using the color assigned to the event. The extension is given a type of shape and some parameters specific to each type.

  • Tetrahedron,
  • Octahedron,
  • Icosahedron,
  • Dodecahedron,
  • Cone,
  • Cube,
  • Torus,
  • Cylinder

A sphere is centered at the start time of the event and has a radius of half the width of the category.

Cone and Cylinder extend from the start time to the end time of the event.

Sphere, Cone, Torus, and Cylinder take -slice n and -stack n arguments. These determine the number of polygons used to draw the the surface of the shape. Higher values give a smoother surface, but take longer to render. The default values for both stack and slice is 40.

Torus takes a -torus_radius n argument. This is the diameter of the "tube" of the torus. It should be between 0.0 and 0.5. If no value is given, the default is 0.2.

MapSVG and MapSVGArea

The MapSVG and MapSVGArea extensions work together. MapSVG displays an image in the SVG (Scalable Vector Graphic) format in the endcut of an event. It can be used by itself. Each MapSVGArea takes a list of times and colors and uses them to set the color of some part of the image for some time interval.


RecurDate takes a recurrance rule expressed in the standard ICalendar format (RFC2445) to generate a set of events. The events in the image are generated with the following rule:


This generates an event for the first Tuesday in November every four years.


This extension helps manage timeline files. It is given the URL of a timeline file as an argument. When the event with this extension is far away from the viewpoint in the category plane, the extension can give the URL of the timeline file to the QViewer and request that it be removed from the currently loaded set. When the event becomes visible, the extension can request that the file be loaded.


This extension also helps manage timeline files. A large set of events can be divided into multiple files which correspond to some time interval. The extension will automatically load files as the display time gets close to the events they hold.

© 2011 Quotidian Incorporated