Components Interactions Examples Tutorials API FAQ
Options
Menu

Class Category

Hierarchy

  • Axis<string>
    • Category

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<string, number>

Private _tickLabelAngle

_tickLabelAngle: any

Protected _tickLabelContainer

_tickLabelContainer: Selection<void>

Private _tickLabelMaxLines

_tickLabelMaxLines: any

Maximum allowable number of wrapped lines for tick labels.

Private _tickLabelMaxWidth

_tickLabelMaxWidth: any

Maximum allowable px width of tick labels.

Protected _tickMarkContainer

_tickMarkContainer: Selection<void>

Private _wrapper

_wrapper: any

A Wrapper configured according to the other properties on this axis.

returns

Private _writer

_writer: any

A Writer attached to this measurer and wrapper.

returns

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 _MINIMUM_WIDTH_PER_LABEL_PX

_MINIMUM_WIDTH_PER_LABEL_PX: any

How many pixels to give labels at minimum before downsampling takes effect.

Methods

Protected _annotationTierHeight

  • _annotationTierHeight(): number

Protected _computeHeight

  • _computeHeight(): number

Protected _computeWidth

  • _computeWidth(): number

Protected _coreSize

  • _coreSize(): number

Protected _drawAnnotations

  • _drawAnnotations(): void

Private _drawTicks

  • _drawTicks(stepWidth: any, ticks: any): any
  • Write ticks to the DOM.

    Parameters

    • stepWidth: any
    • ticks: any

      The tick elements to write.

    Returns any

Protected _generateBaselineAttrHash

  • _generateBaselineAttrHash(): object

Protected _generateTickMarkAttrHash

  • _generateTickMarkAttrHash(isEndTickMark?: boolean): object

Protected _getTickValues

  • _getTickValues(): string[]

Protected _hideOverflowingTickLabels

  • _hideOverflowingTickLabels(): void

Protected _hideTickMarksWithoutLabel

  • _hideTickMarksWithoutLabel(): void

Protected _isHorizontal

  • _isHorizontal(): boolean

Protected _maxLabelTickLength

  • _maxLabelTickLength(): number

Private _measureTickLabels

  • _measureTickLabels(axisWidth: any, axisHeight: any): any
  • Measures the size of the tick labels without making any (permanent) DOM changes.

    Parameters

    • axisWidth: any

      Width available for this axis.

    • axisHeight: any

      Height available for this axis.

    Returns any

Protected _removeAnnotations

  • _removeAnnotations(): void

Protected _rescale

  • _rescale()

Protected _setDefaultAlignment

  • _setDefaultAlignment(): void

Protected _setup

  • _setup(): void

Protected _showAllTickLabels

  • _showAllTickLabels(): void

Protected _showAllTickMarks

  • _showAllTickMarks(): void

Protected _sizeFromOffer

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

Private _tickSpaceRequired

  • _tickSpaceRequired(): any
  • Return the space required by the ticks, padding included.

    Returns any

addClass

  • addClass(cssClass: string)

anchor

annotatedTicks

  • annotatedTicks(): string[]
  • annotatedTicks(annotatedTicks: string[])

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

getDownsampleInfo

  • Take the scale and drop ticks at regular intervals such that the resultant ticks are all a reasonable minimum distance apart. Return the resultant ticks to render, as well as the new stepWidth between them.

    Parameters

    • Optional scale: Category

      The scale being downsampled. Defaults to this Axis' scale.

    Returns DownsampleInfo

    an object holding the resultant domain and new stepWidth.

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
  • Compute space requirements for this Category Axis. Category Axes have two primary space requirements:

    1) width/height needed by the tick lines (including annotations, padding, and margins). 2) width/height needed by the tick text.

    We requested space is the sum of the lines and text.

    Parameters

    • offeredWidth: number
    • offeredHeight: number

    Returns SpaceRequest

showEndTickLabels

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

tickLabelAngle

  • tickLabelAngle(): number
  • tickLabelAngle(angle: number)
  • Gets the tick label angle in degrees.

    Returns number

  • Sets the tick label angle in degrees. Right now only -90/0/90 are supported. 0 is horizontal.

    Parameters

    • angle: number

tickLabelMaxLines

  • tickLabelMaxLines(): number
  • tickLabelMaxLines(maxLines: number)

tickLabelMaxWidth

  • tickLabelMaxWidth(): number
  • tickLabelMaxWidth(maxWidth: number)

tickLabelPadding

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

width

  • width(): number

xAlignment

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

yAlignment

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

Generated using TypeDoc