Components Interactions Examples Tutorials API FAQ
Options
Menu

Class InterpolatedColorLegend

Hierarchy

Index

Constructors

constructor

  • Creates an InterpolatedColorLegend.

    The InterpolatedColorLegend consists of a sequence of swatches that show the associated InterpolatedColor Scale sampled at various points. Two labels show the maximum and minimum values of the InterpolatedColor Scale.

    constructor

    Parameters

    Returns InterpolatedColorLegend

Properties

Protected _boundingBox

_boundingBox: Selection<void>

Protected _clipPathEnabled

_clipPathEnabled: boolean

Private _expands

_expands: any

Private _formatter

_formatter: any

Protected _isAnchored

_isAnchored: boolean

Protected _isSetup

_isSetup: boolean

Private _lowerLabel

_lowerLabel: any

Private _measurer

_measurer: any

Private _orientation

_orientation: any

Private _redrawCallback

_redrawCallback: any

Private _scale

_scale: any

Private _swatchBoundingBox

_swatchBoundingBox: any

Private _swatchContainer

_swatchContainer: any

Private _textPadding

_textPadding: any

Private _upperLabel

_upperLabel: any

Private _wrapper

_wrapper: any

Private _writer

_writer: any

Static LEGEND_LABEL_CLASS

LEGEND_LABEL_CLASS: string

The css class applied to the legend labels.

Static Private _DEFAULT_NUM_SWATCHES

_DEFAULT_NUM_SWATCHES: any

Methods

Private _generateTicks

  • _generateTicks(numSwatches?: any): any

Private _isVertical

  • _isVertical(): any

Protected _setup

  • _setup(): void

Protected _sizeFromOffer

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

addClass

  • addClass(cssClass: string)

anchor

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

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().

expands

  • expands(): boolean
  • expands(expands: boolean)
  • Gets whether the InterpolatedColorLegend expands to occupy all offered space in the long direction

    Returns boolean

  • Sets whether the InterpolatedColorLegend expands to occupy all offered space in the long direction

    Parameters

    • expands: boolean

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

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

  • orientation(): string
  • orientation(orientation: string)

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

width

  • width(): number

xAlignment

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

yAlignment

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

Static Private _ensureOrientation

  • _ensureOrientation(orientation: any): any

Generated using TypeDoc