- API
- KronoGraph
- Creating a Timeline
JavaScript
Creating a Timeline
Creates a KronoGraph timeline in your web page within the specified DOM element. The timeline sets its height and width to equal the size of its parent element, or 100px if the parent does not have these. We recommend styling the parent of the timeline, not the timeline itself.
Parameters
- componentDefinition required
-
object | string Specifies values for the timeline to be created, or the id of the container element in which to create the timeline.
container
required HTMLElement | string | null The DOM element in which to insert the component. Can be either the element's id as a string or the element itself. If set to null, the created component will be detached from any DOM element.
Options for the new component.
Returns
Timeline
The created Timeline object.