API Reference
For full TypeScript definitions and detailed signatures, see the generated API documentation.
Properties
| data: SchedulerData | All resources and events (read-only). |
| sheet: SchedulerSheet | The sheet (table) component (read-only). |
| selectedEvents: SchedulerEvent[] | Currently selected events. |
| selectedEvent: SchedulerEvent | null | Last selected event (or null). |
| selectedResources: SchedulerResource[] | Currently selected resources in the sheet (read-only). |
| settings: ResourceSchedulerSettings | Settings object — access theme, locale (read-only). |
| events: ResourceSchedulerEvents | Event emitters (read-only). |
| canEdit: boolean | Enable/disable editing. Default: true. |
| autoZoomToFit: boolean | Automatically zoom to fit when projectTimeline is set or data is loaded. Default: true. |
| showGridLines: boolean | Show/hide grid lines on the chart. Default: true. |
| showTodayLine: boolean | Show/hide today indicator line. Default: true. |
| markers: Marker[] | Timeline markers. |
| filter: SchedulerResourceFilterFn | null | Active resource filter function. |
| projectTimeline: DateRange | Project start/end date bounds. |
| workingCalendar: WorkingCalendar | Working calendar (get/set). |
| eventRendering: SchedulerEventRenderFn | null | Custom event rendering function. Return true if handled, false for default. |
| eventTooltip: SchedulerEventTooltipFn | null | Custom tooltip content function. Return content or null to hide. |
| canUndo$: BehaviorSubject<boolean> | Whether undo is available (observable, read-only). |
| canRedo$: BehaviorSubject<boolean> | Whether redo is available (observable, read-only). |
Methods
| load(json: string): void | Load data from a JSON string. |
| save(): string | Serialize current state to a JSON string. |
| zoomIn(): boolean | Zoom in. Returns false if already at max zoom. |
| zoomOut(): boolean | Zoom out. Returns false if already at min zoom. |
| zoomToFit(events?: SchedulerEvent[]): void | Fit the view to show all (or specified) events. |
| scrollToDate(date: Date): void | Scroll the timeline to a specific date. |
| scrollToResource(resource: SchedulerResource): void | Scroll to make a resource row visible. |
| scrollToEvent(event: SchedulerEvent): void | Scroll to make an event visible (horizontal + vertical). |
| goToProjectStart(): void | Scroll to the project start date. |
| freezeResource(resource: SchedulerResource): void | Pin a resource to the top. |
| unfreezeResource(resource: SchedulerResource): void | Unpin a resource from the top. |
| isResourceFrozen(resource: SchedulerResource): boolean | Check if a resource is pinned. |
| sortResources(compareFn: (a, b) => number): void | Sort resources using a comparison function. |
| undo(): void | Undo the last action. |
| redo(): void | Redo the last undone action. |
| copy(): Promise<void> | Copy selected events to clipboard. |
| cut(): Promise<void> | Cut selected events to clipboard. |
| paste(): Promise<SchedulerEventsPastedEventArgs | null> | Paste events from clipboard. |
| addMarker(marker: Marker): void | Add a timeline marker. |
| removeMarker(marker: Marker): void | Remove a timeline marker. |
| clearMarkers(): void | Remove all timeline markers. |
| clearFilter(): void | Clear the active resource filter. |
| saveColumns(): ColumnState[] | Save column layout (widths, order, visibility). |
| loadColumns(states: ColumnState[]): void | Restore column layout. |
| exportToImage(): Promise<Blob> | Export chart as PNG. |
| exportToCsv(options?: SchedulerCsvExportOptions): string | Export as CSV string. |
| exportToPdf(options?: SchedulerPdfExportOptions): Promise<Blob> | Export as PDF (requires jspdf). |
| exportToExcel(options?: SchedulerExcelExportOptions): Promise<Blob> | Export as Excel (requires exceljs). |
| destroy(): void | Destroy the scheduler and release all DOM resources. |
Events
All events are RxJS Subject instances. Subscribe via scheduler.events.eventName$.subscribe(callback).
| resourceAdded$: Subject<SchedulerResourceEventArgs> | A resource was added. |
| resourceChanged$: Subject<SchedulerResourceEventArgs> | A resource property changed. |
| resourceRemoved$: Subject<SchedulerResourceEventArgs> | A resource was removed. |
| eventAdded$: Subject<SchedulerEventEventArgs> | An event was added. |
| eventChanged$: Subject<SchedulerEventEventArgs> | An event property changed. |
| eventRemoved$: Subject<SchedulerEventEventArgs> | An event was removed. |
| eventSelected$: Subject<SchedulerEventEventArgs | null> | Event selection changed. Null when deselected. |
| eventClick$: Subject<SchedulerEventEventArgs> | An event bar was clicked. |
| eventDblClick$: Subject<SchedulerEventEventArgs> | An event bar was double-clicked. |
| eventMoving$: Subject<SchedulerEventMovingArgs> | An event is being moved (cancelable). |
| eventResizing$: Subject<SchedulerEventResizingArgs> | An event is being resized (cancelable). |
| eventCreating$: Subject<SchedulerEventCreatingArgs> | A new event is being created by dragging (cancelable). |
| eventDeleting$: Subject<SchedulerEventDeletingArgs> | An event is about to be deleted (cancelable). |
| eventsPasted$: Subject<SchedulerEventsPastedEventArgs> | Events were pasted from clipboard. |
| chartContextMenu$: Subject<SchedulerChartContextMenuArgs> | Right-click on chart area. |
| sheetRowContextMenu$: Subject<SchedulerRowContextMenuEventArgs> | Right-click on sheet row. |
| sheetCellEditing$: Subject<boolean> | Cell editing started (true) or ended (false). |
| projectTimeline$: Subject<DateRange> | Project timeline bounds changed. |
| undone$: Subject<void> | An undo was performed. |
| redone$: Subject<void> | A redo was performed. |
Types & Enums
SchedulerResource
A schedulable resource (person, room, equipment, etc.) displayed as a row in the scheduler.
| id: string | Unique identifier (read-only, auto-generated). |
| name: string | Display name. |
| type: string | null | Resource type (e.g. 'person', 'room', 'equipment', 'vehicle', or custom). Default: null. |
| color: ColorValue | null | Color index or custom ColorDefinition. Events inherit this color unless overridden. Default: null. |
| avatarUrl: string | null | URL to an avatar image displayed in the sheet row. Default: null. |
| filtered: boolean | Whether excluded by the active filter (read-only). |
Also supports custom properties via addProperty(), getPropertyValue(), setPropertyValue(), removeProperty().
SchedulerEvent
A time block assigned to a resource.
| id: string | Unique identifier (read-only, auto-generated). |
| resourceId: string | ID of the owning resource. Change to move the event to a different resource. |
| name: string | Display name. |
| startTime: Date | Start date/time. |
| endTime: Date | End date/time. |
| color: ColorValue | null | Color override. When set, overrides the resource's color. Default: null. |
| data: any | Arbitrary user data. Not serialized. |
| durationMs: number | Duration in milliseconds (read-only, computed). |
| durationHours: number | Duration in hours (read-only, computed). |
Also supports custom properties via addProperty(), getPropertyValue(), setPropertyValue(), removeProperty().
SchedulerData
Central data store holding all resources and events. Accessed via scheduler.data.
Resource methods
| resourcesLength: number | Total number of resources (read-only). |
| getResource(index: number): SchedulerResource | Get a resource by index. |
| getResourceById(id: string): SchedulerResource | null | Find a resource by ID. |
| addResource(resource: SchedulerResource): void | Add a resource. |
| insertResource(index: number, resource: SchedulerResource): void | Insert a resource at a specific index. |
| removeResource(resource: SchedulerResource): void | Remove a resource and all its events. |
| removeResources(resources: SchedulerResource[]): void | Remove multiple resources and all their events. |
| moveResource(resource: SchedulerResource, toIndex: number): void | Move a resource to a new index position. |
Event methods
| eventsLength: number | Total number of events (read-only). |
| getEvent(index: number): SchedulerEvent | Get an event by index. |
| getEventById(id: string): SchedulerEvent | null | Find an event by ID. |
| getEventsForResource(resourceId: string): SchedulerEvent[] | Get all events for a resource. |
| addEvent(event: SchedulerEvent): void | Add an event. |
| removeEvent(event: SchedulerEvent): void | Remove an event. |
Layout & conflict detection
| getLaneCount(resourceId: string): number | Number of parallel lanes needed for a resource's overlapping events. |
| getEventLane(event: SchedulerEvent): number | 0-based lane index of an event. |
| getOverlappingEvents(resourceId, startTime, endTime, excludeEventId?): SchedulerEvent[] | Events that overlap a time range on a resource. |
| hasConflict(event: SchedulerEvent): boolean | Whether an event overlaps with any other on the same resource. |
ResourceSchedulerSettings
Scheduler settings — theme and locale configuration.
| theme: BaseTheme | Current theme. |
| locale: TimelineKitLocale | Current locale. |
Event args types
SchedulerResourceEventArgs
| resource: SchedulerResource | The resource that triggered the event. |
SchedulerEventEventArgs
| event: SchedulerEvent | The event that triggered the notification. |
SchedulerEventMovingArgs (cancelable)
| event: SchedulerEvent | The event being moved. |
| newStartTime: Date | Proposed new start time. |
| newEndTime: Date | Proposed new end time. |
| newResource: SchedulerResource | Proposed target resource. |
| cancel: boolean | Set to true to cancel the move. |
| adjustedStartTime?: Date | Set to override the start time (e.g. for snapping). |
| adjustedEndTime?: Date | Set to override the end time. |
SchedulerEventResizingArgs (cancelable)
| event: SchedulerEvent | The event being resized. |
| edge: 'left' | 'right' | Which edge is being dragged. |
| newStartTime: Date | Proposed new start time. |
| newEndTime: Date | Proposed new end time. |
| cancel: boolean | Set to true to cancel the resize. |
| adjustedStartTime?: Date | Set to override the start time. |
| adjustedEndTime?: Date | Set to override the end time. |
SchedulerEventCreatingArgs (cancelable)
| resource: SchedulerResource | The target resource. |
| startTime: Date | Proposed start time. |
| endTime: Date | Proposed end time. |
| cancel: boolean | Set to true to cancel creation. |
| adjustedStartTime?: Date | Set to override the start time. |
| adjustedEndTime?: Date | Set to override the end time. |
SchedulerEventDeletingArgs (cancelable)
| event: SchedulerEvent | The event being deleted. |
| cancel: boolean | Set to true to cancel the deletion. |
SchedulerChartContextMenuArgs
| date: Date | Date at the click position. |
| resource: SchedulerResource | Resource at the click position. |
| event: SchedulerEvent | null | Event at the click position, or null. |
| mouseEvent: MouseEvent | The native mouse event. |
SchedulerRowContextMenuEventArgs
| selectedResources: SchedulerResource[] | Currently selected resources. |
| mouseEvent: MouseEvent | The native mouse event. |
SchedulerEventsPastedEventArgs
| events: SchedulerEvent[] | Newly created events. |
| eventIdMap: Map<string, SchedulerEvent> | Maps original event ID → newly created copy. |
Custom rendering & tooltips
SchedulerEventRenderArgs
| event: SchedulerEvent | The event being rendered. |
| resource: SchedulerResource | The resource the event belongs to. |
| rect: Rect | Position and size of the event bar in canvas pixels (x, y, width, height). |
| ctx: CanvasRenderingContext2D | The canvas 2D rendering context. |
| isSelected: boolean | Whether the event is currently selected. |
| color: ColorValue | Resolved color for the event. |
SchedulerEventRenderFn
| (args: SchedulerEventRenderArgs) => boolean | Return true if you handled the rendering, false to fall back to default. |
SchedulerEventTooltipArgs
| event: SchedulerEvent | The event being hovered. |
| resource: SchedulerResource | The resource the event belongs to. |
SchedulerEventTooltipContent
| title: string | Tooltip title (typically the event name). |
| lines: { name: string; value: string }[] | Key-value lines displayed below the title. |
SchedulerEventTooltipFn
| (args: SchedulerEventTooltipArgs) => SchedulerEventTooltipContent | null | Return content to display, or null to hide the tooltip. |
Export options
SchedulerCsvExportOptions
| delimiter?: ',' | ';' | '\t' | Column delimiter. Default: ','. |
| includeHeaders?: boolean | Include column headers. Default: true. |
| includeResources?: boolean | Include a separate resources section. Default: false. |
SchedulerPdfExportOptions
| pageSize?: 'A4' | 'A3' | 'Letter' | 'Legal' | Page format. Default: 'A4'. |
| orientation?: 'portrait' | 'landscape' | Page orientation. Default: 'landscape'. |
| margin?: { top, right, bottom, left } | Page margins in mm. Default: 10mm on all sides. |
| header?: string | ((page, total) => string) | Header text on each page. |
| footer?: string | ((page, total) => string) | Footer text on each page. |
| includeSheet?: boolean | Include the sheet (left panel). Default: true. |
| includeChart?: boolean | Include the chart (timeline). Default: true. |
| quality?: number | Image quality (0–1). Default: 1. |
| fitToSinglePage?: boolean | Export as a single page. Default: false. |
SchedulerExcelExportOptions
| eventsSheetName?: string | Name of the events sheet. Default: locale-dependent ('Events'). |
| includeResourcesSheet?: boolean | Include a sheet with resources. Default: true. |
| includeFormatting?: boolean | Apply cell formatting (bold headers, column widths). Default: true. |