Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Timeline

Index

Constructors

Methods

  • Add new vertical bar representing a custom time that can be dragged by the user. Parameter time can be a Date, Number, or String, and is new Date() by default. Parameter id can be Number or String and is undefined by default. The id is added as CSS class name of the custom time bar, allowing to style multiple time bars differently. The method returns id of the created bar.

    Parameters

    Returns IdType

  • destroy(): void
  • Destroy the Timeline. The timeline is removed from memory. all DOM elements and event listeners are cleaned up.

    Returns void

  • Adjust the visible window such that it fits all items. See also focus(id).

    Parameters

    Returns void

  • Adjust the visible window such that the selected item (or multiple items) are centered on screen. See also function fit()

    Parameters

    Returns void

  • Parameters

    • selection: any

    Returns void

  • getCurrentTime(): Date
  • Get the current time. Only applicable when option showCurrentTime is true.

    Returns Date

  • Retrieve the custom time from the custom time bar with given id.

    Parameters

    • Optional id: IdType

      Id is undefined by default.

    Returns Date

  • getItemRange(): { max: Date; min: Date }
  • Get the range of all the items as an object containing min date and max date

    Returns { max: Date; min: Date }

  • Get an array with the ids of the currently selected items

    Returns IdType[]

  • Get an array with the ids of the currently visible items.

    Returns IdType[]

  • Move the window such that given time is centered on screen.

    Parameters

    • time: DateType
    • Optional options: TimelineAnimationOptions
    • Optional callback: ((properties?: any) => void)
        • (properties?: any): void
        • Parameters

          • Optional properties: any

          Returns void

    Returns void

  • off(event: TimelineEvents, callback?: ((properties?: any) => void)): void
  • off(event: string, callback?: ((properties?: any) => void)): void
  • Remove an event listener created before via function on(event[, callback]).

    Parameters

    • event: TimelineEvents
    • Optional callback: ((properties?: any) => void)
        • (properties?: any): void
        • Parameters

          • Optional properties: any

          Returns void

    Returns void

  • Parameters

    • event: string
    • Optional callback: ((properties?: any) => void)
        • (properties?: any): void
        • Parameters

          • Optional properties: any

          Returns void

    Returns void

  • on(event: TimelineEvents, callback?: ((properties?: any) => void)): void
  • on(event?: string, callback?: ((properties: any) => void)): void
  • Create an event listener. The callback function is invoked every time the event is triggered.

    Parameters

    • event: TimelineEvents
    • Optional callback: ((properties?: any) => void)
        • (properties?: any): void
        • Parameters

          • Optional properties: any

          Returns void

    Returns void

  • Parameters

    • Optional event: string
    • Optional callback: ((properties: any) => void)
        • (properties: any): void
        • Parameters

          • properties: any

          Returns void

    Returns void

  • redraw(): void
  • Force a redraw of the Timeline. The size of all items will be recalculated. Can be useful to manually redraw when option autoResize=false and the window has been resized, or when the items CSS has been changed.

    Returns void

  • removeCustomTime(id: IdType): void
  • Remove vertical bars previously added to the timeline via addCustomTime method.

    Parameters

    • id: IdType

      ID of the custom vertical bar returned by addCustomTime method.

    Returns void

  • Set a current time. This can be used for example to ensure that a client's time is synchronized with a shared server time. Only applicable when option showCurrentTime is true.

    Parameters

    Returns void

  • Adjust the time of a custom time bar.

    Parameters

    • time: DateType

      The time the custom time bar should point to

    • Optional id: IdType

      Id of the custom time bar, and is undefined by default.

    Returns void

  • setCustomTimeTitle(title: string, id?: IdType): void
  • Adjust the title attribute of a custom time bar.

    Parameters

    • title: string

      The title shown when hover over time bar

    • Optional id: IdType

      Id of the custom time bar, and is undefined by default.

    Returns void

  • Set both groups and items at once. Both properties are optional. This is a convenience method for individually calling both setItems(items) and setGroups(groups). Both items and groups can be an Array with Objects, a DataSet (offering 2 way data binding), or a DataView (offering 1 way data binding).

    Parameters

    Returns void

  • Set or update options. It is possible to change any option of the timeline at any time. You can for example switch orientation on the fly.

    Parameters

    Returns void

  • Select one or multiple items by their id. The currently selected items will be unselected. To unselect all selected items, call setSelection([]).

    Parameters

    Returns void

  • Set the current visible window.

    Parameters

    • start: DateType

      If the parameter value of start is null, the parameter will be left unchanged.

    • end: DateType

      If the parameter value of end is null, the parameter will be left unchanged.

    • Optional options: TimelineAnimationOptions

      Timeline animation options. See TimelineAnimationOptions

    • Optional callback: (() => void)

      The callback function

        • (): void
        • Returns void

    Returns void

  • Parameters

    • start: any
    • date: any

    Returns void

  • toggleRollingMode(): void
  • Toggle rollingMode.

    Returns void

  • Zoom in the current visible window.

    Parameters

    • percentage: number

      A number and must be between 0 and 1. If null, the window will be left unchanged.

    • Optional options: TimelineAnimationOptions

      Timeline animation options. See TimelineAnimationOptions

    • Optional callback: (() => void)

      The callback function

        • (): void
        • Returns void

    Returns void

  • Zoom out the current visible window.

    Parameters

    • percentage: number

      A number and must be between 0 and 1. If null, the window will be left unchanged.

    • Optional options: TimelineAnimationOptions

      Timeline animation options. See TimelineAnimationOptions

    • Optional callback: (() => void)

      The callback function

        • (): void
        • Returns void

    Returns void

Generated using TypeDoc