ia.Associate Class
Contains information about an associate.
Constructor
ia.Associate
-
geography
-
indicator
-
data
Parameters:
-
geography
ia.GeographyThe geography the associate belongs to.
-
indicator
ia.IndicatorThe indicator the associate belongs to.
-
data
JSONThe json data describing the object.
Item Index
Methods
Methods
getChildren
()
Object
Returns an array of data objects that are children of this object.
Returns:
getComparisonValue
-
id
Returns the comparison value that corresponds to the feature id.
Parameters:
-
id
StringThe feature id.
Returns:
getComparisonValues
()
Number | String
Returns the list of comparison values.
Returns:
getData
-
featureIds
Returns a hashtable of the associate comparison data.
The returned data has the following structure:
["eh11"]{id:"eh11", name:"polwarth", value:2345, value_formatted:2345, associate1:25, associate1_formatted:25}
["eh12"]{id:"eh12", name:"morningside", value:4347, value_formatted:4347, associate1:45, associate1_formatted:45}
["eh13"]{id:"eh13", name:"merchiston", value:2496, value_formatted:2496, associate1:25, associate1_formatted:25}
Parameters:
-
featureIds
StringAn optional list of feature ids to get data for.
Returns:
getData
-
featureIds
Returns a hashtable of the associate data.
The returned data has the following structure:
["eh11"]{id:"eh11", name:"polwarth", value:2345, value_formatted:2345, associate1:25, associate1_formatted:25}
["eh12"]{id:"eh12", name:"morningside", value:4347, value_formatted:4347, associate1:45, associate1_formatted:45}
["eh13"]{id:"eh13", name:"merchiston", value:2496, value_formatted:2496, associate1:25, associate1_formatted:25}
Parameters:
-
featureIds
StringAn optional list of feature ids to get data for.
Returns:
getDataTree
-
showDates
-
reverseDates
-
dataHash
-
parentId
Returns an associative array of the form:
["i1"]{id:"i1"; label:"Home"; type:"branch"; children:["i2"; "i3"; "i4"]}
["i2"]{id:"i2"; label:"ia.Indicator 1"; type:"branch"; parent:"i1"; children:["i5"; "i6"; "i7"]}
["i5"]{id:"i5~2004"; label:"2004"; type:"leaf"; parent:"i2"}
Used by data explorers. Dates are returned as part of the tree.
Parameters:
-
showDates
BooleanShould the dates be displayed.
-
reverseDates
BooleanShould the dates be reversed.
-
dataHash
Associative ArrayAn associative array as described.
-
parentId
StringThe parent id.
getFormattedComparisonValue
-
id
Returns the formatted comparison value that corresponds to the feature id.
Parameters:
-
id
StringThe feature id.
Returns:
getFormattedComparisonValues
()
String
Returns the list of formatted comparison values.
Returns:
getFormattedValue
-
id
Returns the formatted value that corresponds to the feature id. Will return a comparison value if the id starts with "#".
Parameters:
-
id
StringThe feature id.
Returns:
getFormattedValues
()
String
Returns the list of formatted values.
Returns:
getProperties
()
Associative Array
Returns the custom properties. An associative array of the form: [propName] = propValue.
Returns:
getProperty
-
propName
Returns a value for a custom property.
Parameters:
-
propName
StringThe name of the property.
Returns:
getValue
-
id
Returns the value that corresponds to the feature id. Will return a comparison value if the id starts with "#".
Parameters:
-
id
StringThe feature id.
Returns:
getValues
()
Number | String
Returns the list of values.
Returns:
parseData
-
data
Parses the JSON data.
Parameters:
-
data
JSONThe json data describing the object.
Properties
customColumns
Object} Array of columns.
The custom columns that can be used in the data table.
data
JSON
The raw json data describing the object.
fileName
String
The file name.
hasData
Boolean
Indicates if this object contains data.
Default: true
href
String
The href.
id
String
The id.
maxValue
Number
The maximum value.
minValue
Number
The minimum value.
name
String
The name.
parent
Object
The parent object.
precision
Number
The precision. Inherited from parent if undefined.
type
Number
The data type. Inherited from parent if undefined.
Default: "categoric"