|
Timeline_Basics
An introduction to Timeline
Timeline Basics
A timeline contains one or more Bands, which can be panned infinitely by dragging with the mouse pointer, using the mouse scroll-wheel or the keyboard's arrow buttons. A band can be configured to synchronize with another band such that panning one band also scrolls the other. Creating your own TimelineSee Getting started Implementation DetailsA timeline is implemented as a div element that contains inner div elements as its bands. The band div's are cropped and positioned relative to the timeline div.
A band div itself contains several inner elements that implements various parts of the band. For example, the two timelines above show labels for days, weeks, months, and years. The bands also have different background colors, and the weekly band of the second timeline has weekend markings. All of these visual elements are "painted" by adding HTML elements to the band div's at the appropriate positions. As a band is panned, its div is shifted horizontally or vertically, carrying all of its visual elements along. When either end of the band div approaches the visible (non-cropped) area, the band div is re-centered, its coordinate origin is changed, and then its various visual elements are re-"painted" relative to the new coordinate origin. All of this "paging" is done as seamlessly as possible so that the user experiences smooth, '''infinite''' panning. A band is responsible for supporting panning as well as coordinating its various sub-components:
The band also takes an event source which provides events to be displayed in that band. Different bands can have different event sources. This flexibility allows for '''timeline mashups''', as exemplified here. Various sub-components that do painting take a theme, which stores default visual and behavioral settings. If you have questions, please use the mailing list. Comments posted here are NOT read |
Sign in to add a comment
"can be panned infinitely by dragging" an infinity? Tempting. As a geologist, I'm sitting here, bored, on an oil rig, with a geological time scale in front of me covering 4.5-odd billion years with easy potential to need sub-year resolution. Hell, when you're looking at overprinting footprints, you could well need sub-second resolution. This should shake some bugs out of the trees. Where's my editor and the FM?