Components Interactions Examples Tutorials API FAQ
Options
Menu

Class Plot

Hierarchy

Index

Constructors

constructor

Properties

Private _animate

_animate: any

Private _animators

_animators: any

Private _attrBindings

_attrBindings: any

Private _attrExtents

_attrExtents: any

Protected _boundingBox

_boundingBox: Selection<void>

Private _cachedEntityStore

_cachedEntityStore: any

_cachedEntityStore is a cache of all the entities in the plot. It, at times may be undefined and shouldn't be accessed directly. Instead, use _getEntityStore to access the entity store.

Protected _clipPathEnabled

_clipPathEnabled: boolean

Private _dataChanged

_dataChanged: any

Private _datasetToDrawer

_datasetToDrawer: any

Private _includedValuesProvider

_includedValuesProvider: any

Protected _isAnchored

_isAnchored: boolean

Protected _isSetup

_isSetup: boolean

Private _onDatasetUpdateCallback

_onDatasetUpdateCallback: any

Protected _propertyBindings

_propertyBindings: Map<AccessorScaleBinding<any, any>>

Protected _propertyExtents

_propertyExtents: Map<any[]>

Protected _renderArea

_renderArea: Selection<void>

Protected _renderCallback

_renderCallback: ScaleCallback<Scale<any, any>>

Static Protected _ANIMATION_MAX_DURATION

_ANIMATION_MAX_DURATION: number

Methods

Protected _addDataset

Protected _additionalPaint

  • _additionalPaint(time: number): void

Protected _animateOnNextRender

  • _animateOnNextRender(): boolean

Private _bindAttr

  • _bindAttr(attr: any, value: any, scale: any): any

Protected _bindProperty

  • _bindProperty(property: string, value: any, scale: Scale<any, any>): void

Protected _buildLightweightPlotEntities

Private _computeExtent

  • _computeExtent(dataset: any, accScaleBinding: any, filter: any): any
  • Parameters

    • dataset: any
    • accScaleBinding: any
    • filter: any

    Returns any

Protected _createDrawer

Protected _createNodesForDataset

Protected _entityVisibleOnPlot

Protected _extentsForProperty

  • _extentsForProperty(property: string): any[]
  • Override in subclass to add special extents, such as included values

    Parameters

    • property: string

    Returns any[]

Protected _filterForProperty

  • _filterForProperty(property: string): Accessor<boolean>

Protected _generateAttrToProjector

Protected _generateDrawSteps

Protected _getAnimator

Protected _getDataToDraw

Protected _getDrawersInOrder

  • _getDrawersInOrder(): Drawer[]

Private _getEntityStore

  • _getEntityStore(datasets?: any): any
  • _getEntityStore returns the store of all Entities associated with the specified dataset

    Parameters

    • Optional datasets: any

    Returns any

Private _includedValuesForScale

  • _includedValuesForScale<D>(scale: any): any

Protected _installScaleForKey

  • _installScaleForKey(scale: Scale<any, any>, key: string): void

Private _lightweightPlotEntityToPlotEntity

  • _lightweightPlotEntityToPlotEntity(entity: any): any

Protected _onDatasetUpdate

  • _onDatasetUpdate(): void

Private _paint

  • _paint(): any

Protected _pixelPoint

  • _pixelPoint(datum: any, index: number, dataset: Dataset): Point

Protected _propertyProjectors

Protected _removeDataset

Protected _removeDatasetNodes

  • _removeDatasetNodes(dataset: Dataset): void

Private _scales

  • _scales(): any
  • Returns any

    A unique array of all scales currently used by the Plot.

Protected _setup

  • _setup(): void

Protected _sizeFromOffer

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

Protected _uninstallScaleForKey

  • _uninstallScaleForKey(scale: Scale<any, any>, key: string): void

Protected _updateExtents

  • _updateExtents(): void
  • Updates the extents associated with each attribute, then autodomains all scales the Plot uses.

    Returns void

Private _updateExtentsForAttr

  • _updateExtentsForAttr(attr: any): any

Private _updateExtentsForKey

  • _updateExtentsForKey(key: any, bindings: any, extents: any, filter: any): any
  • Parameters

    • key: any
    • bindings: any
    • extents: any
    • filter: any

    Returns any

Protected _updateExtentsForProperty

  • _updateExtentsForProperty(property: string): void

addClass

  • addClass(cssClass: string)

addDataset

anchor

animated

  • animated(): boolean
  • animated(willAnimate: boolean)

animator

  • animator(animatorKey: string): Animator
  • animator(animatorKey: string, animator: Animator)
  • Get the Animator associated with the specified Animator key.

    Parameters

    • animatorKey: string

    Returns Animator

  • Set the Animator associated with the specified Animator key.

    Parameters

    • animatorKey: string
    • animator: Animator

attr

  • Gets the AccessorScaleBinding for a particular attribute.

    Type parameters

    • A

    Parameters

    • attr: string

    Returns AccessorScaleBinding<A, number | string>

  • Sets a particular attribute to a constant value or the result of an Accessor.

    Parameters

  • Sets a particular attribute to a scaled constant value or scaled result of an Accessor. The provided Scale will account for the attribute values when autoDomain()-ing.

    Type parameters

    • A

    Parameters

    • attr: string
    • attrValue: A | Accessor<A>
    • scale: Scale<A, number | string>

      The Scale used to scale the attrValue.

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)
  • Computes and sets the size, position, and alignment of the Component from the specified values. If no parameters are supplied and the Component is a root node, they are inferred from the size of the Component's element.

    Parameters

    • Optional origin: Point
    • Optional availableWidth: number
    • Optional 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

datasets

destroy

  • destroy(): void

detach

  • detach()

entities

  • Gets the Entities associated with the specified Datasets.

    Parameters

    • Optional datasets: Dataset[]

      The Datasets to retrieve the Entities for. If not provided, returns defaults to all Datasets on the Plot.

    Returns PlotEntity[]

entitiesAt

  • Gets the PlotEntities at a particular Point.

    Each plot type determines how to locate entities at or near the query point. For example, line and area charts will return the nearest entity, but bar charts will only return the entities that fully contain the query point.

    Parameters

    • point: Point

      The point to query.

    Returns PlotEntity[]

    The PlotEntities at the particular point

entityNearest

  • Returns the {Plots.PlotEntity} nearest to the query point, or undefined if no {Plots.PlotEntity} can be found.

    Parameters

    • queryPoint: Point
    • Optional bounds: object

    Returns PlotEntity

    The nearest PlotEntity, or undefined if no {Plots.PlotEntity} can be found.

fixedHeight

  • fixedHeight(): boolean
  • Checks if the Component has a fixed height or if it grows to fill available space. Returns false by default on the base Component class.

    Returns boolean

fixedWidth

  • fixedWidth(): boolean
  • Checks if the Component has a fixed width or if it grows to fill available space. Returns false by default on the base Component class.

    Returns 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>

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

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

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)

removeDataset

render

  • render()

renderImmediately

  • renderImmediately()

renderTo

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

requestedSpace

  • requestedSpace(availableWidth: number, availableHeight: number): SpaceRequest

selections

width

  • width(): number

xAlignment

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

yAlignment

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

Static Protected _scaledAccessor

Generated using TypeDoc