Timeline API Overview
Timeline is the core class that provides the primary capabilities of the timeline (data management, view control, plugins, and event callbacks).
Constructor
Parameters
canvasId: theidof the canvas elementoptions: timeline config and callbacks (seconds-based, see Type Definitions)
Example
📋 API Directory
Data Management
loadData- load dataaddEvent- add an eventupdateEvent- update an eventdeleteEvent- delete an eventaddTrack- add a trackremoveTrack- remove a tracksetEndTime- set end timebeginIndexBatch- start batch indexingendIndexBatch- end batch indexing
View Control
setZoomLevel- set zoom levelzoom- zoomsetTimeIndicator- set time indicatorsetCanvasSize- set canvas sizemarkDirty- trigger a redrawnotifyChange- notify changebeginChangeBatch- start batch changesendChangeBatch- end batch changes
Plugin Management
usePlugin- use a pluginremovePlugin- remove a pluginsetTheme- switch themegetLoadedPlugins- get loaded plugins
Event Callbacks
onEventAddonEventUpdateonEventClick- ...more callbacks
Type Definitions
TimelineEventTimelineConfigLoadDataFormat