ia.ReportData Class
Contains information about a report.
Constructor
ia.ReportData
()
Item Index
Methods
Methods
addEventListener
-
eventType
-
fnc
-
obj
Add an event listener.
Parameters:
-
eventType
StringThe type of event to listen for.
-
fnc
FunctionThe function to call when the event occurs.
-
obj
ObjectAn optional parent object.
dispatchEvent
-
event
Dispatch an event to the listeners.
Parameters:
-
event
ObjectThe event object.
getDataTree
-
showDates
-
reverseDates
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.
Returns:
getGeographies
()
ia.Geography[]
Returns the geographies contained in the data.
Returns:
getGeography
-
id
Returns the geography that corresponds to the geography id.
Parameters:
-
id
StringThe geography id.
Returns:
getGeographyTree
-
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:
-
dataHash
Associative ArrayAn associative array as described.
-
parentId
StringThe parent id.
getProperties
()
Object
Gets the properties.
Returns:
getProperty
-
propName
Get a value for a custom property.
Parameters:
-
propName
StringThe name of the property.
Returns:
loadSource
-
url
-
callbackFunction
Loads and parses the source file then calls the given function.
Parameters:
-
url
StringThe url to the data.
-
callbackFunction
FunctionThe call back function.
parseData
-
data
-
callbackFunction
Parses the geography data.
Parameters:
-
data
JSONThe json data describing the object.
-
callbackFunction
FunctionThe call back function.
refresh
-
callbackFunction
Refreshes the data.
Parameters:
-
callbackFunction
FunctionThe call back function.
removeListener
-
obj
Removes all event listeners for the given object.
Parameters:
-
obj
ObjectThe object.
setProperty
-
propName
-
propValue
Set a value for a custom property. Use this to set any default properties to be inherited by all data types beneath.
Parameters:
-
propName
StringThe name of the property.
-
propValue
ObjectThe value of the property.
Properties
data
JSON
The raw json data describing the object.
path
String
The directory path to the data source.
Default: ""
precision
Number
The precision. Inherited from parent if undefined.
url
String
The url of the data source.
Default: ""