v7.3.0

TimeAxisViewModel

This class is an internal view model class, describing the visual representation of a TimeAxis. The config for the header rows is described in the headers. To calculate the size of each cell in the time axis, this class requires:

  • availableSpace - The total width or height available for the rendering
  • tickSize - The fixed width or height of each cell in the lowest header row. This value is normally read from the viewPreset but this can also be updated programmatically using the tickSize setter

Normally you should not interact with this class directly.

No results

Configs

Configs are options you supply in a configuration object when creating an instance of this class
  • The available width/height, this is normally not known by the consuming UI component using this model class until it has been fully rendered. The consumer of this model should set availableSpace when its width has changed.

    Has a corresponding runtime availableSpace property.

  • forceFit : Booleanfalse
    internal

    true if cells in the bottom-most row should be fitted to the available space.

    Has a corresponding runtime forceFit property.

  • snap : Booleanfalse
    internal

    true if there is a requirement to be able to snap events to a certain view resolution. This has implications of the tickSize that can be used, since all widths must be in even pixels.

    Has a corresponding runtime snap property.

  • tickSize : Number100
    internal

    The "tick width" for horizontal mode or "tick height" for vertical mode, to use for the cells in the bottom most header row. This value is normally read from the viewPreset

    Has a corresponding runtime tickSize property.

  • timeAxis : TimeAxis
    internal

    The time axis providing the underlying data to be visualized

Properties

Properties are getters/setters or publicly accessible variables on this class
  • Get/set the available space for the time axis representation. If size changes it will cause it to update its contents and fire the update event.

    Has a corresponding availableSpace config.

  • Returns an array representing the headers of the current timeAxis. Each element is an array representing the cells for that level in the header.

  • forceFit : Boolean
    internal

    Gets/sets the forceFit value for the model. Setting it will cause it to update its contents and fire the update event.

    Has a corresponding forceFit config.

  • isHorizontal : Boolean
    internal
    READONLY

    Using horizontal mode?

  • isStretchingTicks : Boolean
    internal
    READONLY

    Returns true if the ticks are currently being stretched to fit the available space.

  • isVertical : Boolean
    internal
    READONLY

    Using vertical mode?

  • majorHeaderLevel : String
    private
    READONLY

    This method is meant to return the level of the header which 2nd lowest. It is used for isMajorTick method

  • snap : Boolean
    internal

    Gets/sets the snap value for the model. Setting it will cause it to update its contents and fire the update event.

    Has a corresponding snap config.

  • snapPixelAmount : Number
    internal
    READONLY

    Returns the pixel increment for the current view resolution.

  • tickSize : Number
    internal

    Get/set the current time column size (the width or height of a cell in the bottom-most time axis header row, depending on mode)

    Has a corresponding tickSize config.

  • totalSize : Number
    internal
    READONLY

    Returns the total width/height of the time axis representation, depending on mode.

  • isTimeAxisViewModel : Booleantrue
    READONLY
    ADVANCED
    Identifies an object as an instance of TimeAxisViewModel class, or subclass thereof.

Functions

Functions are methods available for calling on the class

    Events

    Events are triggered for certain actions in this class and can be listened for to react to those actions in your code

    Event handlers

    Event handlers are callbacks called as a result of certain actions in this class

    Source path

    Scheduler/view/model/TimeAxisViewModel.js

    Contents