Show:

ia.NumericClassifier Class

Classifies numeric data.

Constructor

ia.NumericClassifier

(
  • data
)

Parameters:

  • data Number

    The data array.

Methods

_adjustBreak

(
  • formattedValue
)
Number private

Adjusts a break for a range class.

Parameters:

  • formattedValue String

    The formatted value

Returns:

Number: The adjusted value.

_buildClasses

(
  • p
)
private

Rebuilds the classes.

Parameters:

  • p Number

    An optional precision.

_buildPalettes

() private

Rebuilds the breaks.

commitChanges

()

Call this to commit any changes.

getBreaks

() Number

The list of breaks

Returns:

Number: The breaks.

getCalculator

() ia.Calculator

Used for calculating the breaks.

Returns:

ia.Calculator: The calculator.

getClass

(
  • value
)
ia.NumberClass

Gets the legend class for the given value.

Parameters:

  • value Number

    The value.

Returns:

ia.NumberClass: The legend class that contains the value.

getClasses

() ia.NumberClass[]

An array of legend classes contained in the classifier.

Returns:

ia.NumberClass[]: The classes.

getData

() Number

Gets the data.

Returns:

Number: The data.

setData

(
  • value
)

Sets the data.

Parameters:

  • value Number

    The data.

Properties

classificationName

String

The name of the classification to use when calculating breaks.

Possible values include:

  • ia.Thematic.CONTINUOUS
  • ia.Thematic.EQUAL_INTERVAL
  • ia.Thematic.QUANTILE
  • ia.Thematic.NATURAL
  • ia.Thematic.STANDARD_DEVIATION

Default: ia.Thematic.EQUAL_INTERVAL

colorPalette

ia.ColorPalette

Used to classify colors.

formatter

ia.Formatter

The formatter.

labels

String

A list of labels used in place of the default values.

maxRule

String

The maximum rule classes. Valid rules are "<=" or "<".

Default: "<="

minRule

String

The minimum rule for range classes. Valid rules are ">=" or ">".

Default: ">="

noClasses

Number

The number of classes to calculate breaks for.

Default: 5

precision

Number

The precision.

sdLabels

String

The list of standard deviation labels.

Default: ["> 2 SD below mean","1 - 2 SD below mean","0 - 1 SD below mean","0 - 1 SD above mean","1 - 2 SD above mean","> 2 SD above mean"]

sizePalette

ia.SizePalette

Used to classify sizes.