Class Domain

Represents a value domain with a minimum and maximum value. Used in a continuous slot to define the value range of values in that slot. See also Slot.domain.

Hierarchy

  • Domain

Index

Properties

Methods

Properties

max

max: number

The maximum value of the domain.

min

min: number

The minimum value of the domain.

Static empty

empty: Domain = new Domain( 0, 0 )

Represents an empty domain.

Methods

asArray

  • asArray(): number[]
  • Returns the domain as an array of two elements, first min then max.

    const domain = _info.data.cols[ 1 ].domain.toArray();
    const scale = d3.scaleLinear().domain( domain ).range( [ 0, 100 ] );

    Returns number[]

    The domain as an array of [min, max].