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.
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.
-
trueif cells in the bottom-most row should be fitted to the available space.Has a corresponding runtime forceFit property.
-
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.
-
The time axis providing the underlying data to be visualized
-
Internal listeners, that cannot be removed by the user.
Properties
Properties are getters/setters or publicly accessible variables on this class-
Identifies an object as an instance of TimeAxisViewModel class, or subclass thereof.
-
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.
-
Using horizontal mode?
-
Returns
trueif the ticks are currently being stretched to fit the available space. -
Using vertical mode?
-
This method is meant to return the level of the header which 2nd lowest. It is used for isMajorTick method
-
Returns the pixel increment for the current view resolution.
-
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.
-
Returns the total width/height of the time axis representation, depending on mode.
-
Identifies an object as an instance of Events class, or subclass thereof.
-
Identifies an object as an instance of TimeAxisViewModel class, or subclass thereof.
Functions
Functions are methods available for calling on the class-
Internal function used to hook destroy() calls when using thisObj
-
Internal function used restore hooked destroy() calls when using thisObj
-
Auto detaches listeners registered from start, if set as detachable
-
Internal function used to run a callback function after an event is triggered
-
Removes all listeners registered to this object by the application.