Components Interactions Examples Tutorials API FAQ
Options
Menu

Class Axis

Type parameters

  • D

Hierarchy

Index

Constructors

constructor

Properties

Private _annotatedTicks

_annotatedTicks: any

Private _annotationContainer

_annotationContainer: any

Private _annotationFormatter

_annotationFormatter: any

Private _annotationMeasurer

_annotationMeasurer: any

Private _annotationTierCount

_annotationTierCount: any

Private _annotationWriter

_annotationWriter: any

Private _annotationsEnabled

_annotationsEnabled: any

Protected _baseline

_baseline: Selection<void>

Protected _boundingBox

_boundingBox: Selection<void>

Protected _clipPathEnabled

_clipPathEnabled: boolean

Private _endTickLength

_endTickLength: any

Private _formatter

_formatter: any

Private _innerTickLength

_innerTickLength: any

Protected _isAnchored

_isAnchored: boolean

Protected _isSetup

_isSetup: boolean

Private _margin

_margin: any

Private _orientation

_orientation: any

Private _rescaleCallback

_rescaleCallback: any

Protected _scale

_scale: Scale<D, number>

Private _showEndTickLabels

_showEndTickLabels: any

Protected _tickLabelContainer

_tickLabelContainer: Selection<void>

Private _tickLabelPadding

_tickLabelPadding: any

Protected _tickMarkContainer

_tickMarkContainer: Selection<void>

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 Private _ANNOTATION_LABEL_PADDING

_ANNOTATION_LABEL_PADDING: any

Methods

Private _annotatedTicksToRender

  • _annotatedTicksToRender(): any

Protected _annotationTierHeight

  • _annotationTierHeight(): number

Private _annotationToTier

  • _annotationToTier(measurements: any): 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

Protected _generateTickMarkAttrHash

  • _generateTickMarkAttrHash(isEndTickMark?: boolean): object
  • Parameters

    • Optional isEndTickMark: boolean

    Returns object

    • [key: string]: number | function

Protected _getTickValues

  • _getTickValues(): D[]

Protected _hideOverflowingTickLabels

  • _hideOverflowingTickLabels(): void
  • Responsible for hiding any tick labels that break out of the bounding container.

    Returns void

Protected _hideTickMarksWithoutLabel

  • _hideTickMarksWithoutLabel(): void
  • Hides the Tick Marks which have no corresponding Tick Labels

    Returns void

Protected _isHorizontal

  • _isHorizontal(): boolean

Protected _maxLabelTickLength

  • _maxLabelTickLength(): number
  • Gets the maximum pixel length over all ticks on this axis.

    Returns number

Protected _removeAnnotations

  • _removeAnnotations(): void

Protected _rescale

  • _rescale(): void

Protected _setDefaultAlignment

  • _setDefaultAlignment(): void

Protected _setup

  • _setup(): void

Protected _showAllTickLabels

  • _showAllTickLabels(): void

Protected _showAllTickMarks

  • _showAllTickMarks(): void

Protected _sizeFromOffer

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

addClass

  • addClass(cssClass: string)

anchor

annotatedTicks

  • annotatedTicks(): D[]
  • annotatedTicks(annotatedTicks: D[])

annotationFormatter

annotationTierCount

  • annotationTierCount(): number
  • annotationTierCount(annotationTierCount: number)
  • Gets the count of annotation tiers to render.

    Returns number

  • Sets the count of annotation tiers to render.

    Parameters

    • annotationTierCount: number

annotationsEnabled

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

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

  • Gets the Formatter on the Axis. Tick values are passed through the Formatter before being displayed.

    Returns Formatter

  • Sets the Formatter on the Axis. Tick values are passed through the Formatter before being displayed.

    Parameters

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)
  • Gets whether the Axis shows the end tick labels.

    Returns boolean

  • Sets whether the Axis shows the end tick labels.

    Parameters

    • show: boolean

tickLabelPadding

  • tickLabelPadding(): number
  • tickLabelPadding(padding: number)
  • Gets the padding between each tick mark and its associated label in pixels.

    Returns number

  • Sets the padding between each tick mark and its associated label in pixels.

    Parameters

    • padding: number

width

  • width(): number

xAlignment

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

yAlignment

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

Generated using TypeDoc