Components Interactions Examples Tutorials API FAQ
Options
Menu

Class Numeric

Hierarchy

  • Axis<number>
    • Numeric

Index

Constructors

constructor

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

Protected _scale

_scale: Scale<number, number>

Protected _tickLabelContainer

_tickLabelContainer: Selection<void>

Private _tickLabelPositioning

_tickLabelPositioning: any

Protected _tickMarkContainer

_tickMarkContainer: Selection<void>

Private _usesTextWidthApproximation

_usesTextWidthApproximation: any

Private _wrapper

_wrapper: 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).

Methods

Protected _annotationTierHeight

  • _annotationTierHeight(): number

Private _computeApproximateTextWidth

  • _computeApproximateTextWidth(): any

Private _computeExactTextWidth

  • _computeExactTextWidth(): 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

Protected _getTickValues

  • _getTickValues(): number[]

Private _hasOverlapWithInterval

  • _hasOverlapWithInterval(interval: any, rects: any): any
  • The method is responsible for evenly spacing the labels on the axis.

    Parameters

    • interval: any
    • rects: any

    Returns any

    test to see if taking every interval recrangle from rects will result in labels not overlapping

    For top, bottom, left, right positioning of the thicks, we want the padding between the labels to be 3x, such that the label will be padding distance from the tick and 2 * padding distance (or more) from the next tick

Private _hideEndTickLabels

  • _hideEndTickLabels(): any

Protected _hideOverflowingTickLabels

  • _hideOverflowingTickLabels(): void

Private _hideOverlappingTickLabels

  • _hideOverlappingTickLabels(): any

Protected _hideTickMarksWithoutLabel

  • _hideTickMarksWithoutLabel(): void

Protected _isHorizontal

  • _isHorizontal(): boolean

Protected _maxLabelTickLength

  • _maxLabelTickLength(): 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(): number[]
  • annotatedTicks(annotatedTicks: number[])

annotationFormatter

annotationTierCount

  • annotationTierCount(): number
  • annotationTierCount(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

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)

tickLabelPosition

  • tickLabelPosition(): string
  • tickLabelPosition(position: string)
  • Gets the tick label position relative to the tick marks.

    Returns string

    The current tick label position.

  • Sets the tick label position relative to the tick marks.

    Parameters

    • position: string

      "top"/"center"/"bottom" for a vertical Numeric Axis, "left"/"center"/"right" for a horizontal Numeric Axis.

usesTextWidthApproximation

  • usesTextWidthApproximation(): boolean
  • usesTextWidthApproximation(enable: boolean)
  • Gets the approximate text width setting.

    Returns boolean

    The current text width approximation setting.

  • Sets the approximate text width setting. Approximating text width measurements can drastically speed up plot rendering, but the plot may have extra white space that would be eliminated by exact measurements. Additionally, very abnormal fonts may not approximate reasonably.

    Parameters

    • enable: boolean

width

  • width(): number

xAlignment

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

yAlignment

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

Generated using TypeDoc