cfTimeline

PDF HTML FlashPaper

JS Functions

Functions For cf_timeline

These utility functions will allow you to dynamically reload the events on a timeline.

Function: cfTimeline.loadXML(id,src, func)

Description: This function will load a new XML data set into the timeline.

Parameters: id = id of the timeline to load events into src = src of the XML containing the event data func = function to call when data is done loading (pass function name only – see example)

Function: cfTimeline.loadJSON(id,src,func)

Description: This function will load a new JSON data set into the timeline.

Parameters: id = id of the timeline to load events into src = src of the JSON encoded event data func = function to call when data is done loading (pass function name only – see example)

Function: cfTimeline.clearTimeline()

Description: This function will clear all events that are currently loaded on the timeline.

Parameters: None.

Function: cfTimeline.setCenterVisibleDate(id,band,date)

Description: This function will center the timeline on the date passed to the function by jumping directly to the date without scrolling. Parameters: id = id of the timeline band = numerical index of a timelineband of which the event lies within (if you have multiple bands that display events pass the index of any band). Note: The index is zero-based. Function: cfTimeline.scrollToCenter(id,band,date)

Description: This function will center the timeline on the date passed to the function by scrolling the timeline until it reaches the date.

Parameters: id = id of the timeline band = numerical index of a timelineband of which the event lies within (if you have multiple bands that display events pass the index of any band). Note: The index is zero-based.

Function: cfTimeline.getLatestDate(id,band)

Description: This function will return the latest date that is currently plotted on the timelineband.

Parameters: id = id of the timeline band = numerical index of a timelineband of which the event lies within (if you have multiple bands that display events pass the index of any band). Note: The index is zero-based.

Function: cfTimeline.getEarliestDate(id,band)

Description: This function will return the earliest date that is currently plotted on the timelineband.

Parameters: id = id of the timeline band = numerical index of a timelineband of which the event lies within (if you have multiple bands that display events pass the index of any band). Note: The index is zero-based.