Show:

ia.Thematic Class

Module: ia

The ia.Thematic class is used to classify data. The Theme contains two classifiers for classifying both numeric and non-numeric data.

The data is an associative array with the following format:

["eh11"]{id:"eh11", name:"polwarth", value:2345, associate1:25}
["eh12"]{id:"eh12", name:"morningside", value:4347, associate1:45}
["eh13"]{id:"eh13", name:"merchiston", value:2496, associate1:25}

Constructor

ia.Thematic

(
  • data
)

Parameters:

  • data AssociativeArray

    The data is an associative array with the following format:
    ["eh11"]{id:"eh11", name:"polwarth", value:2345, associate1:25}
    ["eh12"]{id:"eh12", name:"morningside", value:4347, associate1:45}
    ["eh13"]{id:"eh13", name:"merchiston", value:2496, associate1:25}

Methods

addEventListener

(
  • eventType
  • fnc
  • obj
)

Add an event listener.

Parameters:

  • eventType String

    The type of event to listen for.

  • fnc Function

    The function to call when the event occurs.

  • obj Object

    An optional parent object.

commitChanges

()

Call this to commit any changes.

dispatchEvent

(
  • event
)

Dispatch an event to the listeners.

Parameters:

  • event Object

    The event object.

getClass

(
  • value
)
ia.LegendClass

Gets the legend class for the given value.

Parameters:

  • value Number | String

    The value.

Returns:

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

getClasses

() ia.LegendClass[]

An array of classes contained in the theme.

Returns:

ia.LegendClass[]: The classes.

getData

() AssociativeArray

Gets the data for the theme.

The data is an associative array with the following format:

["eh11"]{id:"eh11", name:"polwarth", value:2345, associate1:25}
["eh12"]{id:"eh12", name:"morningside", value:4347, associate1:45}
["eh13"]{id:"eh13", name:"merchiston", value:2496, associate1:25}

Returns:

AssociativeArray: The data.

getDataField

() String

Gets the field of the data provider that provides the values.

Returns:

String: The data field.

getDataType

() String

Gets the data type of the data provider.

Possible values include:

  • ia.Thematic.NUMERIC
  • ia.Thematic.CATEGORIC

Returns:

String: The data type.

removeListener

(
  • obj
)

Removes all event listeners for the given object.

Parameters:

  • obj Object

    The object.

setData

(
  • data
)

Sets the data for the theme.

The data is an associative array with the following format:

["eh11"]{id:"eh11", name:"polwarth", value:2345, associate1:25}
["eh12"]{id:"eh12", name:"morningside", value:4347, associate1:45}
["eh13"]{id:"eh13", name:"merchiston", value:2496, associate1:25}

Parameters:

  • data AssociativeArray

    The data.

setDataField

(
  • dataField
)

Sets the field of the data provider that provides the values.

Parameters:

  • dataField String

    The data field.

setDataType

(
  • dataType
)

Sets the data type of the data provider.

Possible values include:

  • ia.Thematic.NUMERIC
  • ia.Thematic.CATEGORIC

Parameters:

  • dataType String

    The data type.

Properties

CATEGORIC

String final static

Specifies that the data for the thematic is categoric.

Default: "categoric"

categoricClassifier

ia.CategoricClassifier

The classifier used to handle non-numeric data.

CONTINUOUS

String final static

Constant indicating a continuous value classification.

Default: "continuous"

EQUAL_INTERVAL

String final static

Constant indicating an equal interval classification.

Default: "equalInterval"

NATURAL

String final static

Constant indicating a natural breaks classification.

Default: "natural"

noDataValue

String

The no data value.

Default: "No Data"

NUMERIC

String final static

Specifies that the data for the thematic is numeric.

Default: "numeric"

numericClassifier

ia.NumericClassifier

The classifier used to handle numeric data.

QUANTILE

String final static

Constant indicating a quantile classification.

Default: "quantile"

STANDARD_DEVIATION

String final static

Constant indicating a standard deviation classification.

Default: "standardDeviation"

symbol

String

The symbol used for point data.

Default: ia.Shape.SQUARE