Components Interactions Examples Tutorials API FAQ
Options
Menu

Class Time

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

  • Constructs a Time Axis.

    A Time Axis is a visual representation of a Time Scale.

    constructor

    Parameters

    • scale: Time
    • orientation: TimeAxisOrientation

      Orientation of this Time Axis. Time Axes can only have "top" or "bottom" orientations.

    Returns Time

Properties

Protected _baseline

_baseline: Selection<void>

Protected _boundingBox

_boundingBox: Selection<void>

Protected _clipPathEnabled

_clipPathEnabled: boolean

Protected _isAnchored

_isAnchored: boolean

Protected _isSetup

_isSetup: boolean

Private _measurer

_measurer: any

Private _mostPreciseConfigIndex

_mostPreciseConfigIndex: any

Private _numTiers

_numTiers: any

Private _possibleTimeAxisConfigurations

_possibleTimeAxisConfigurations: any

Protected _scale

_scale: Scale<Date, number>

Protected _tickLabelContainer

_tickLabelContainer: Selection<void>

Protected _tickMarkContainer

_tickMarkContainer: Selection<void>

Private _tierBaselines

_tierBaselines: any

Private _tierHeights

_tierHeights: any

Private _tierLabelContainers

_tierLabelContainers: any

Private _tierLabelPositions

_tierLabelPositions: any

Private _tierMarkContainers

_tierMarkContainers: any

Static ANNOTATION_CIRCLE_CLASS

ANNOTATION_CIRCLE_CLASS: string

The css class applied to each annotation circle, which denotes which tick is being annotated.

Static ANNOTATION_LABEL_CLASS

ANNOTATION_LABEL_CLASS: string

The css class applied to each annotation label, which shows the formatted annotation text.

Static ANNOTATION_LINE_CLASS

ANNOTATION_LINE_CLASS: string

The css class applied to each annotation line, which extends from the axis to the rect.

Static ANNOTATION_RECT_CLASS

ANNOTATION_RECT_CLASS: string

The css class applied to each annotation rect, which surrounds the annotation label.

Static END_TICK_MARK_CLASS

END_TICK_MARK_CLASS: string

The css class applied to each end tick mark (the line on the end tick).

Static TICK_LABEL_CLASS

TICK_LABEL_CLASS: string

The css class applied to each tick label (the text associated with the tick).

Static TICK_MARK_CLASS

TICK_MARK_CLASS: string

The css class applied to each tick mark (the line on the tick).

Static TIME_AXIS_TIER_CLASS

TIME_AXIS_TIER_CLASS: string

The CSS class applied to each Time Axis tier

Static Private _DEFAULT_TIME_AXIS_CONFIGURATIONS

_DEFAULT_TIME_AXIS_CONFIGURATIONS: any

Static Private _LONG_DATE

_LONG_DATE: any

Methods

Protected _annotationTierHeight

  • _annotationTierHeight(): number

Private _checkTimeAxisTierConfigurationWidth

  • _checkTimeAxisTierConfigurationWidth(config: any): any
  • Check if tier configuration fits in the current width.

    Parameters

    • config: any

    Returns any

Private _cleanTiers

  • _cleanTiers(): any

Protected _computeHeight

  • _computeHeight(): number

Protected _computeWidth

  • _computeWidth(): number

Protected _coreSize

  • _coreSize(): number
  • Retrieves the size of the core pieces.

    The core pieces include the labels, the end tick marks, the inner tick marks, and the tick label padding.

    Returns number

Protected _drawAnnotations

  • _drawAnnotations(): void

Protected _generateBaselineAttrHash

  • _generateBaselineAttrHash(): object

Private _generateLabellessTicks

  • _generateLabellessTicks(): any

Protected _generateTickMarkAttrHash

  • _generateTickMarkAttrHash(isEndTickMark?: boolean): object

Private _getIntervalLength

  • _getIntervalLength(config: any): any

Private _getMostPreciseConfigurationIndex

  • _getMostPreciseConfigurationIndex(): any
  • Gets the index of the most precise TimeAxisConfiguration that will fit in the current width.

    Returns any

Private _getTickIntervalValues

  • _getTickIntervalValues(config: any): any

Protected _getTickValues

  • _getTickValues(): any[]

Private _getTickValuesForConfiguration

  • _getTickValuesForConfiguration(config: any): any

Protected _hideOverflowingTickLabels

  • _hideOverflowingTickLabels(): void

Private _hideOverflowingTiers

  • _hideOverflowingTiers(): any

Private _hideOverlappingAndCutOffLabels

  • _hideOverlappingAndCutOffLabels(index: any): any

Protected _hideTickMarksWithoutLabel

  • _hideTickMarksWithoutLabel(): void

Protected _isHorizontal

  • _isHorizontal(): boolean

Protected _maxLabelTickLength

  • _maxLabelTickLength(): number

Private _maxWidthForInterval

  • _maxWidthForInterval(config: any): any

Protected _removeAnnotations

  • _removeAnnotations(): void

Private _renderLabellessTickMarks

  • _renderLabellessTickMarks(tickValues: any): any

Private _renderTickMarks

  • _renderTickMarks(tickValues: any, index: any): any

Private _renderTierLabels

  • _renderTierLabels(container: any, config: any, index: any): any

Protected _rescale

  • _rescale(): void

Protected _setDefaultAlignment

  • _setDefaultAlignment(): void

Protected _setup

  • _setup(): void

Private _setupDomElements

  • _setupDomElements(): any

Protected _showAllTickLabels

  • _showAllTickLabels(): void

Protected _showAllTickMarks

  • _showAllTickMarks(): void

Protected _sizeFromOffer

  • _sizeFromOffer(availableWidth: number, availableHeight: number): object

addClass

  • addClass(cssClass: string)

anchor

annotatedTicks

  • annotatedTicks(): Date[]
  • annotatedTicks(annotatedTicks: Date[])

annotationFormatter

annotationTierCount

  • annotationTierCount(): number
  • annotationTierCount(annotationTierCount: number)

annotationsEnabled

  • annotationsEnabled(): boolean
  • annotationsEnabled(annotationsEnabled: boolean)

axisConfigurations

background

  • Gets the Selection containing the behind the visual elements of the Component.

    Will return undefined if the Component has not been anchored.

    Returns Selection<void>

    background selection for the Component

bounds

  • Returns Bounds

    for the component in pixel space, where the topLeft represents the component's minimum x and y values and the bottomRight represents the component's maximum x and y values.

computeLayout

  • computeLayout(origin?: Point, availableWidth?: number, availableHeight?: number)

content

  • Gets a Selection containing a that holds the visual elements of the Component.

    Will return undefined if the Component has not been anchored.

    Returns Selection<void>

    content selection for the Component

destroy

  • destroy(): void

detach

  • detach()
  • Detaches a Component from the DOM. The Component can be reused.

    This should only be used if you plan on reusing the calling Component. Otherwise, use destroy().

endTickLength

  • endTickLength(): number
  • endTickLength(length: number)

fixedHeight

  • fixedHeight(): boolean

fixedWidth

  • fixedWidth(): boolean

foreground

  • Gets the Selection containing the in front of the visual elements of the Component.

    Will return undefined if the Component has not been anchored.

    Returns Selection<void>

formatter

hasClass

  • hasClass(cssClass: string): boolean
  • Checks if the Component has a given CSS class.

    Parameters

    • cssClass: string

      The CSS class to check for.

    Returns boolean

height

  • height(): number

innerTickLength

  • innerTickLength(): number
  • innerTickLength(length: number)

margin

  • margin(): number
  • margin(size: number)
  • Gets the margin in pixels. The margin is the amount of space between the tick labels and the outer edge of the Axis. The margin also determines the space that annotations will reside in if annotations are enabled.

    Returns number

  • Sets the margin in pixels. The margin is the amount of space between the tick labels and the outer edge of the Axis. The margin also determines the space that annotations will reside in if annotations are enabled.

    Parameters

    • size: number

offAnchor

offDetach

onAnchor

onDetach

onResize

  • Sets a callback that gets called when the component resizes. The size change is not guaranteed to be reflected by the DOM at the time the callback is fired.

    Parameters

orientation

origin

originToSVG

parent

redraw

  • redraw()
  • Causes the Component to re-layout and render.

    This function should be called when a CSS change has occured that could influence the layout of the Component, such as changing the font size.

removeClass

  • removeClass(cssClass: string)

render

  • render()

renderImmediately

  • renderImmediately()

renderTo

  • renderTo(element: String | Element | Selection<void>)

requestedSpace

  • requestedSpace(offeredWidth: number, offeredHeight: number): SpaceRequest

showEndTickLabels

  • showEndTickLabels(): boolean
  • showEndTickLabels(show: boolean)

tickLabelPadding

  • tickLabelPadding(): number
  • tickLabelPadding(padding: number)

tierLabelPositions

  • tierLabelPositions(): string[]
  • tierLabelPositions(newPositions: string[])
  • Gets the label positions for each tier.

    Returns string[]

  • Sets the label positions for each tier.

    Parameters

    • newPositions: string[]

      The positions for each tier. "bottom" and "center" are the only supported values.

width

  • width(): number

xAlignment

  • xAlignment(): string
  • xAlignment(xAlignment: string)

yAlignment

  • yAlignment(): string
  • yAlignment(yAlignment: string)

Generated using TypeDoc