Packageardisia.components.timeline
Classpublic class Timeline
InheritanceTimeline Inheritance TimebarContainer Inheritance spark.components.SkinnableContainer

Display events along a TimebarContainer.

View the technical documentation on the Ardisia Labs website for more information.

Default MXML PropertymxmlContentFactory



Public Properties
 PropertyDefined By
  beginField : String
The field name on the data that is used to pull the begin date for the data item.
Timeline
 InheritedcurrentIntervalMode : IntervalMode
[read-only] The currently displayed intervalMode.
TimebarContainer
  dataProvider : IList
The dataProvider for the chart.
Timeline
  dataTipField : String
Field name on the data to pull the node's data tip string.
Timeline
  dataTipFormatFunction : Function
User provided function that gets the data to display with the data tip.
Timeline
  dataTipHideDelay : Number = 350
Delay before the data tip is hidden.
Timeline
  dataTipInstance : DataTip
Instance of the data tip.
Timeline
  enableDragScrolling : Boolean = true
True to allow the user to change the horizontal scroll by holding down the mouse and dragging.
Timeline
  endField : String
The field name on the data that is used to pull the end date for the data item.
Timeline
 InheritedintervalModes : Array
Sets the possible display modes.
TimebarContainer
 InheritedminimumVisibleDuration : Number
Minimum allowed duration for the visible period.
TimebarContainer
 InheritedperiodBegin : Date
The start Date in the timebar container.
TimebarContainer
 InheritedperiodEnd : Date
The end time in the timebar container.
TimebarContainer
  rowGap : Number
The number of pixels between each row.
Timeline
  rowHeight : Number
The height in pixels of each row of item renderers.
Timeline
  selectable : Boolean
True to set the "selectedItem" property when a node (renderer) is clicked.
Timeline
  selectedIndex : int
The zero-based index of the currently selected child element.
Timeline
  selectedItem : Object
The selected data in the dataProvider.
Timeline
 InheritedselectionEnabled : Boolean
True to allow users to set the selected time period via mouse interaction.
TimebarContainer
  series : Array
An array of TimelineSeries objects that describe the grouped data to display in the chart.
Timeline
  seriesField : String
The field on the data that is used to group data by a series.
Timeline
  seriesGap : Number
The number of pixels between each displayed series.
Timeline
  showDataTip : Boolean = true
Display the data tip on item renderer hover.
Timeline
 InheritedvisiblePeriodBegin : Date
The start period visible in the timebar container.
TimebarContainer
 InheritedvisiblePeriodEnd : Date
The end period visible in the timebar container.
TimebarContainer
 InheritedzoomFactor : Number
The amount of zoom applied on each mouse wheel tick.
TimebarContainer
Protected Properties
 PropertyDefined By
  dragInProgress : Boolean
True when a drag is in progress.
Timeline
Public Methods
 MethodDefined By
  
Timeline
  
Hide the data tip.
Timeline
Protected Methods
 MethodDefined By
 Inherited
Checks if the mouse is within the autoscroll threshold during drag operations.
TimebarContainer
 Inherited
Clears the auto scrolling timer.
TimebarContainer
 Inherited
clearHover():void
Clears the hover property on all item renderers for the time intervals.
TimebarContainer
 Inherited
contentGroupHandler(event:Event):void
Handles events on the contentGroup.
TimebarContainer
  
dragHandler(event:Event):void
Handles the events for scroll dragging.
Timeline
 Inherited
effectHandler(event:Event):void
Handles effect events.
TimebarContainer
  
eventHandler(event:Event):void
Handles the events for the class.
Timeline
  
getDataTipContent(data:Object):Object
Returns the contents for the data tip.
Timeline
 Inherited
Return the interval start and end from the passed x coordinate in the contentGroup's coordinate space.
TimebarContainer
 Inherited
getIntervalIndex(xPosition:Number):int
Return the index of the interval from the passed x coordinate in the contentGroup's coordinate space.
TimebarContainer
 Inherited
Return the interval period based on the passed timestamp.
TimebarContainer
 Inherited
getIteratedDate(dt:Date, count:int):Date
Will return a new Date based on the passed Date and the number of intervals to apply.
TimebarContainer
  
getRow(itemIndex:int, storeSeriesData:Vector.<StoreData>):int
Given the passed index in the store, return the row to display the renderer.
Timeline
 Inherited
hScrollBarInstanceHandler(event:Event):void
Handles events for the hScroll bar skin part.
TimebarContainer
 Inherited
Lays out the selection lasso based on the selected period.
TimebarContainer
 Inherited
resizeLassoHandler(event:Event):void
Handles events for the resize lasso skin part.
TimebarContainer
 Inherited
selectionLassoHandler(event:Event):void
Handles events for the selection lasso skin part.
TimebarContainer
  
seriesItemRenderersHandler(event:Event):void
Handles events on the series renderers.
Timeline
  
seriesLabelHandler(event:Event):void
Handles events on the series labels.
Timeline
 Inherited
setHover():void
Set the hover properties on the item renderers.
TimebarContainer
  
setSelectedItem(node:Object):void
Set the selected data in the data provider.
Timeline
 Inherited
setSelectionPeriod(start:Object, end:Object):void
Sets the selected period and updates the date values on the selectionselectionLassoInstance.
TimebarContainer
  
setupDataTip(data:Object):void
Setup the data tip.
Timeline
 Inherited
setVisiblePeriod(start:Object, end:Object, skipUpdate:Boolean = false):void
Sets the visible period.
TimebarContainer
  
Used to sort the store.
Timeline
 Inherited
updateCurrentIntervalMode(contentWidth:Number):void
Sets the current interval modes to use and stores some necessary values for layout.
TimebarContainer
  
Update the selection in the series item renderers.
Timeline
  
Update the series data item renderers.
Timeline
  
Update the series label item renderers.
Timeline
 Inherited
viewportHandler(event:Event):void
Handles events for the viewport skin part.
TimebarContainer
  
viewportTimelineHandler(event:Event):void
Handles additional events on the viewport for the Timeline class.
Timeline
 Inherited
vScrollBarHandler(event:Event):void
Handles events for the vertical scroller.
TimebarContainer
Events
 Event Summary Defined By
  Dispatched the selectedItem changes via user interaction.Timeline
 InheritedDispatched when the visible period changes.TimebarContainer
Styles
 Style Description Defined By
 InheritedType: Number CSS Inheritance: no
The alpha of the border.
TimebarContainer
 InheritedType: uint Format: Color CSS Inheritance: no
The color of the border.
TimebarContainer
 InheritedType: Boolean CSS Inheritance: no
True to display a border.
TimebarContainer
 InheritedType: Number CSS Inheritance: no
Padding from the bottom for the contentGroup.
TimebarContainer
 InheritedType: Number CSS Inheritance: no
Padding from the top for the contentGroup.
TimebarContainer
Skin Parts

This component uses skins made up of skin parts. Do not set the skin parts directly. The component's skin sets the skin parts.


 Skin Part Description Defined By
  
dataTipFactoryPart:mx.core.IFactory
Required: false Part Type: Dynamic
Factory that creates the data tip.

The IFactory must return an object of type DataTip
Timeline
 InheritedRequired: false Part Type: Dynamic
Interval modes used when none are explicity provided.
TimebarContainer
 InheritedRequired: false Part Type: Dynamic
Creates the header time interval renderers.

The IFactory must return an object of type ITimebarItemRenderer
TimebarContainer
 Inherited
hScrollBarFactoryPart:mx.core.IFactory
Required: false Part Type: Dynamic
Custom horizontal scroll bar. Necessary to setup thumb resize buttons to change the visible period.

The IFactory must return an object of type TimebarHScrollBar
TimebarContainer
 Inherited
itemRendererFactoryPart:mx.core.IFactory
Required: true Part Type: Dynamic
Creates the item renderers for the time intervals.

The IFactory must return an object of type ITimebarItemRenderer
TimebarContainer
 Inherited
selectionLassoFactoryPart:mx.core.IFactory
Required: false Part Type: Dynamic
Creates the time period selection lasso. Optional.

The IFactory must return an object of type ITimebarSelectionLasso
TimebarContainer
  
seriesItemRendererFactoryPart:mx.core.IFactory
Required: false Part Type: Dynamic
Factory to create series item renderers.

The IFactory must return an object of type ITimelineSeriesItemRenderer
Timeline
  
seriesLabelRendererFactoryPart:mx.core.IFactory
Required: false Part Type: Dynamic
Factory to create renderers for the series labels.

The IFactory must return an object of type ITimelineSeriesLabelRenderer
Timeline
 Inherited
vScrollBarFactoryPart:mx.core.IFactory
Required: true Part Type: Dynamic
Vertical scroll bar used to scroll overflowing content in the vertical direct.

The IFactory must return an object of type VScrollBar
TimebarContainer
Property Detail
beginFieldproperty
beginField:String

The field name on the data that is used to pull the begin date for the data item.

The default value is "begin".


Implementation
    public function get beginField():String
    public function set beginField(value:String):void
dataProviderproperty 
dataProvider:IList

The dataProvider for the chart.

This property is bindable and is bound to "dataProviderChanged" events.

The default value is null.

This property can be used as the source for data binding.


Implementation
    public function get dataProvider():IList
    public function set dataProvider(value:IList):void
dataTipFieldproperty 
public var dataTipField:String

Field name on the data to pull the node's data tip string.

If neither this property nor "dataTipFormatFunction" are defined, the tip will receive the hovered renderer's data.

The default value is "".

dataTipFormatFunctionproperty 
public var dataTipFormatFunction:Function

User provided function that gets the data to display with the data tip. The function takes an object as an argument and returns either a TextFlow or a String for the data tip contents.

If neither this property nor "dataTipField" are defined, the tip will display the hovered renderer's data.

The function has the following signature:

	  funcName(value:Object):Object
	  

The default value is null.

dataTipHideDelayproperty 
public var dataTipHideDelay:Number = 350

Delay before the data tip is hidden.

The default value is 350.

dataTipInstanceproperty 
public var dataTipInstance:DataTip

Instance of the data tip.

dragInProgressproperty 
protected var dragInProgress:Boolean

True when a drag is in progress.

enableDragScrollingproperty 
public var enableDragScrolling:Boolean = true

True to allow the user to change the horizontal scroll by holding down the mouse and dragging.

The default value is true.

endFieldproperty 
endField:String

The field name on the data that is used to pull the end date for the data item.

The default value is "end".


Implementation
    public function get endField():String
    public function set endField(value:String):void
rowGapproperty 
rowGap:Number

The number of pixels between each row.

The default value is 2.


Implementation
    public function get rowGap():Number
    public function set rowGap(value:Number):void
rowHeightproperty 
rowHeight:Number

The height in pixels of each row of item renderers.

The default value is 15.


Implementation
    public function get rowHeight():Number
    public function set rowHeight(value:Number):void
selectableproperty 
selectable:Boolean

True to set the "selectedItem" property when a node (renderer) is clicked.

Dispatches a "change" event when the selectedItem changes.

The default value is true.


Implementation
    public function get selectable():Boolean
    public function set selectable(value:Boolean):void
selectedIndexproperty 
selectedIndex:int

The zero-based index of the currently selected child element.

a value of -1 indicates no selection.

This property is bindable and is bound to "change" events.

The default value is -1.

This property can be used as the source for data binding.


Implementation
    public function get selectedIndex():int
    public function set selectedIndex(value:int):void
selectedItemproperty 
selectedItem:Object

The selected data in the dataProvider.

This property is bindable and is bound to "change" events.

The default value is null.

This property can be used as the source for data binding.


Implementation
    public function get selectedItem():Object
    public function set selectedItem(value:Object):void
seriesproperty 
series:Array

An array of TimelineSeries objects that describe the grouped data to display in the chart.

Changes to the data will not trigger updates. To update, set this property to a new array.

The default value is null.


Implementation
    public function get series():Array
    public function set series(value:Array):void
seriesFieldproperty 
seriesField:String

The field on the data that is used to group data by a series.

E.G. If a series is different nations, the field may be "countryName" and then each series object would define the value on the field used to identify the particular series data.

The default value is "name".


Implementation
    public function get seriesField():String
    public function set seriesField(value:String):void
seriesGapproperty 
seriesGap:Number

The number of pixels between each displayed series.

The default value is 10.


Implementation
    public function get seriesGap():Number
    public function set seriesGap(value:Number):void
showDataTipproperty 
public var showDataTip:Boolean = true

Display the data tip on item renderer hover.

The default value is true.

Constructor Detail
Timeline()Constructor
public function Timeline()



Method Detail
dragHandler()method
protected function dragHandler(event:Event):void

Handles the events for scroll dragging.

Parameters

event:Event — the Event that triggered the handler

eventHandler()method 
protected function eventHandler(event:Event):void

Handles the events for the class.

Parameters

event:Event — the Event that triggered the handler

getDataTipContent()method 
protected function getDataTipContent(data:Object):Object

Returns the contents for the data tip. Uses the "dataTipField" first, then the "dataTipFormatFunction" function, then null.

Can return a TextFlow or a String.

Parameters

data:Object — Object

Returns
Object — Object
getRow()method 
protected function getRow(itemIndex:int, storeSeriesData:Vector.<StoreData>):int

Given the passed index in the store, return the row to display the renderer.

Parameters

itemIndex:int — the itemIndex in the store to get the row for
 
storeSeriesData:Vector.<StoreData> — a vector of StoreData objects to use to sort

Returns
int — the row int
hideDataTip()method 
public function hideDataTip():void

Hide the data tip.

seriesItemRenderersHandler()method 
protected function seriesItemRenderersHandler(event:Event):void

Handles events on the series renderers.

Parameters

event:Event — the Event that triggered the handler

seriesLabelHandler()method 
protected function seriesLabelHandler(event:Event):void

Handles events on the series labels.

Parameters

event:Event — the Event that triggered the handler

setSelectedItem()method 
protected function setSelectedItem(node:Object):void

Set the selected data in the data provider.

Parameters

node:Object — the data to select

setupDataTip()method 
protected function setupDataTip(data:Object):void

Setup the data tip. Must be positioned elsewhere.

Parameters

data:Object — Object the data to setup the content of the data tip

sortStore()method 
protected function sortStore(a:StoreData, b:StoreData):int

Used to sort the store.

Parameters

a:StoreData — first StoreData object
 
b:StoreData — second StoreData object

Returns
int — int (-1, 0, 1)
updateSelection()method 
protected function updateSelection():void

Update the selection in the series item renderers.

updateSeriesItemRenderers()method 
protected function updateSeriesItemRenderers():void

Update the series data item renderers.

updateSeriesLabelRenderers()method 
protected function updateSeriesLabelRenderers():void

Update the series label item renderers.

viewportTimelineHandler()method 
protected function viewportTimelineHandler(event:Event):void

Handles additional events on the viewport for the Timeline class.

Parameters

event:Event — the Event that triggered the handler

Event Detail
change Event
Event Object Type: ardisia.components.timeline.events.TimelineEvent
TimelineEvent.type property = ardisia.components.timeline.events.TimelineEvent

Dispatched the selectedItem changes via user interaction.