Package | ardisia.components.timeline |
Class | public class Timeline |
Inheritance | Timeline TimebarContainer spark.components.SkinnableContainer |
View the technical documentation on the Ardisia Labs website for more information.
Default MXML PropertymxmlContentFactory
Property | Defined By | ||
---|---|---|---|
beginField : String
The field name on the data that is used to pull the begin date for the
data item. | Timeline | ||
currentIntervalMode : 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 | ||
intervalModes : Array
Sets the possible display modes. | TimebarContainer | ||
minimumVisibleDuration : Number
Minimum allowed duration for the visible period. | TimebarContainer | ||
periodBegin : Date
The start Date in the timebar container. | TimebarContainer | ||
periodEnd : 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 | ||
selectionEnabled : 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 | ||
visiblePeriodBegin : Date
The start period visible in the timebar container. | TimebarContainer | ||
visiblePeriodEnd : Date
The end period visible in the timebar container. | TimebarContainer | ||
zoomFactor : Number
The amount of zoom applied on each mouse wheel tick. | TimebarContainer |
Property | Defined By | ||
---|---|---|---|
dragInProgress : Boolean
True when a drag is in progress. | Timeline |
Method | Defined By | ||
---|---|---|---|
Timeline() | Timeline | ||
hideDataTip():void
Hide the data tip. | Timeline |
Method | Defined By | ||
---|---|---|---|
checkAutoScroll():void
Checks if the mouse is within the autoscroll threshold during drag
operations. | TimebarContainer | ||
clearAutoScroll():void
Clears the auto scrolling timer. | TimebarContainer | ||
clearHover():void
Clears the hover property on all item renderers for the time intervals. | TimebarContainer | ||
contentGroupHandler(event:Event):void
Handles events on the contentGroup. | TimebarContainer | ||
dragHandler(event:Event):void
Handles the events for scroll dragging. | Timeline | ||
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 | ||
Return the interval start and end from the passed x coordinate in the
contentGroup's coordinate space. | TimebarContainer | ||
getIntervalIndex(xPosition:Number):int
Return the index of the interval from the passed x coordinate in the
contentGroup's coordinate space. | TimebarContainer | ||
getIntervalPeriodFromDate(needle:Date):Period
Return the interval period based on the passed timestamp. | TimebarContainer | ||
getIteratedDate(dt:Date, count:int):Date
Will return a new Date based on the passed Date and the number of
intervals to apply. | TimebarContainer | ||
Given the passed index in the store, return the row to display the
renderer. | Timeline | ||
hScrollBarInstanceHandler(event:Event):void
Handles events for the hScroll bar skin part. | TimebarContainer | ||
layoutSelectionLasso():void
Lays out the selection lasso based on the selected period. | TimebarContainer | ||
resizeLassoHandler(event:Event):void
Handles events for the resize lasso skin part. | TimebarContainer | ||
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 | ||
setHover():void
Set the hover properties on the item renderers. | TimebarContainer | ||
setSelectedItem(node:Object):void
Set the selected data in the data provider. | Timeline | ||
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 | ||
setVisiblePeriod(start:Object, end:Object, skipUpdate:Boolean = false):void
Sets the visible period. | TimebarContainer | ||
Used to sort the store. | Timeline | ||
updateCurrentIntervalMode(contentWidth:Number):void
Sets the current interval modes to use and stores some necessary values
for layout. | TimebarContainer | ||
updateSelection():void
Update the selection in the series item renderers. | Timeline | ||
updateSeriesItemRenderers():void
Update the series data item renderers. | Timeline | ||
updateSeriesLabelRenderers():void
Update the series label item renderers. | Timeline | ||
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 | ||
vScrollBarHandler(event:Event):void
Handles events for the vertical scroller. | TimebarContainer |
Event | Summary | Defined By | ||
---|---|---|---|---|
Dispatched the selectedItem changes via user interaction. | Timeline | |||
Dispatched when the visible period changes. | TimebarContainer |
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 | ||
defaultIntervalModesPart:Array | Required: false Part Type: Dynamic Interval modes used when none are explicity provided. | TimebarContainer | ||
headerItemRendererFactoryPart:mx.core.IFactory | Required: false Part Type: Dynamic Creates the header time interval renderers. The IFactory must return an object of type ITimebarItemRenderer | TimebarContainer | ||
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 | ||
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 | ||
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 | ||
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 |
beginField | property |
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"
.
public function get beginField():String
public function set beginField(value:String):void
dataProvider | property |
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.
public function get dataProvider():IList
public function set dataProvider(value:IList):void
dataTipField | property |
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 ""
.
dataTipFormatFunction | property |
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
.
dataTipHideDelay | property |
public var dataTipHideDelay:Number = 350
Delay before the data tip is hidden.
The default value is 350
.
dataTipInstance | property |
public var dataTipInstance:DataTip
Instance of the data tip.
dragInProgress | property |
protected var dragInProgress:Boolean
True when a drag is in progress.
enableDragScrolling | property |
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
.
endField | property |
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"
.
public function get endField():String
public function set endField(value:String):void
rowGap | property |
rowGap:Number
The number of pixels between each row.
The default value is 2
.
public function get rowGap():Number
public function set rowGap(value:Number):void
rowHeight | property |
rowHeight:Number
The height in pixels of each row of item renderers.
The default value is 15
.
public function get rowHeight():Number
public function set rowHeight(value:Number):void
selectable | property |
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
.
public function get selectable():Boolean
public function set selectable(value:Boolean):void
selectedIndex | property |
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.
public function get selectedIndex():int
public function set selectedIndex(value:int):void
selectedItem | property |
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.
public function get selectedItem():Object
public function set selectedItem(value:Object):void
series | property |
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
.
public function get series():Array
public function set series(value:Array):void
seriesField | property |
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"
.
public function get seriesField():String
public function set seriesField(value:String):void
seriesGap | property |
seriesGap:Number
The number of pixels between each displayed series.
The default value is 10
.
public function get seriesGap():Number
public function set seriesGap(value:Number):void
showDataTip | property |
public var showDataTip:Boolean = true
Display the data tip on item renderer hover.
The default value is true
.
Timeline | () | Constructor |
public function Timeline()
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
|
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
|
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
|
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
|
change | Event |
ardisia.components.timeline.events.TimelineEvent
ardisia.components.timeline.events.TimelineEvent
Dispatched the selectedItem changes via user interaction.