Index | OAT homepage | OpenLink Software

# OATDOCtimeline

- OATDOCtimeline
- _ _ timeline.js
- _ _ _ _ Objects
- _ _ _ _ _ _ OAT.Timeline(contentDiv, options)
- _ _ _ _ Methods
- _ _ _ _ _ _ OAT.Timeline.addBand(name, color, label)
- _ _ _ _ _ _ OAT.Timeline.addEvent(bandName, startTime, endTime, content, color)
- _ _ _ _ _ _ OAT.Timeline::draw()
- _ _ _ _ CSS Classes
- _ _ _ _ _ _ OAT.Timeline.timeline
- _ _ _ _ _ _ OAT.Timeline.timeline_port
- _ _ _ _ _ _ OAT.Timeline.timeline_slider
- _ _ _ _ Example

## timeline.js

Draggable timeline.

### Objects

#### OAT.Timeline(contentDiv, options)

Creates a Timeline inside `contentDiv` . The `options` may include:

- `lineHeight` - int, height of one record
- `bandHeight` - int, height of one band's header
- `margins` - int, (default `200` )
- `resize` - bool (default `true` )
- `formatter` - bool (default `true` )
- `sliderHeight` - int, height of slider
- `autoHeight` - bool, should height be automatically adjusted? (default `true` )

### Methods

#### OAT.Timeline.addBand(name, color, label)

Adds a data band to chart. The band is identified by `name` , drawn in `color` , and labeled with `label` .

#### OAT.Timeline.addEvent(bandName, startTime, endTime, content, color)

Adds new event to Timeline, respective to its band `bandName` . `startTime` and `endTime` are data-time strings formatted as `YYYY-MM-DDThh-mm-ss` . (

ToBeDone
- verify preceding sentence! ) `endTime` can be false, when the event has no duration. `content` is a HTML element; `color` is a background color for time strip (only when `endTime` is not `false` ).

#### OAT.Timeline::draw()

Draws the timeline.

### CSS Classes

#### OAT.Timeline.timeline

ToBeDone

#### OAT.Timeline.timeline_port

ToBeDone

#### OAT.Timeline.timeline_slider

ToBeDone

### Example

ToBeDone

Copyright (C) 2005-2008 OpenLink Software