Usage & Examples
This page provides copy-paste friendly examples covering common configuration, interactions, and plugin usage.
Basic Configuration
Timeline Configuration (Seconds-based)
Event Time Model
Timeline Canvas uses a seconds-based time model. All time values are relative seconds from the timeline start, not absolute timestamps.
How the time model works
Timeline Canvas uses relative time (seconds-based), not absolute timestamps:
- startTime: timeline start, usually
0seconds - endTime: timeline end in seconds
- Event time: all events use
startTimeandendTimeas seconds from the start
Time conversion examples
Common conversions
- 1 minute = 60 seconds
- 1 hour = 3600 seconds
- 1 day = 86400 seconds
- Work hours (9–18):
startTime: 32400,endTime: 64800(93600, 183600) - Crossing midnight:
startTime: 82800,endTime: 90000(23:00 to next day 01:00)