Show:

ia.BaseData Class

Defined in: ia\data\BaseData.js:1
Module: ia

Provides information common to all data objects.

Constructor

ia.BaseData

(
  • data
  • parent
)

Parameters:

  • data JSON

    The json data describing the object.

  • parent Object

    The parent data object (eg ia.Theme is a parent of ia.Indicator and ia.Associate).

Methods

getChildren

() Object

Returns an array of data objects that are children of this object.

Returns:

Object: An array of data objects.

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 Boolean

    Should the dates be displayed.

  • reverseDates Boolean

    Should the dates be reversed.

  • dataHash Associative Array

    An associative array as described.

  • parentId String

    The parent id.

getProperties

() Associative Array

Returns the custom properties. An associative array of the form: [propName] = propValue.

Returns:

Associative Array: The properties.

getProperty

(
  • propName
)
Number | String

Returns a value for a custom property.

Parameters:

  • propName String

    The name of the property.

Returns:

Number | String: The value of the property, or undefined if it doesnt exist.

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.

geography

ia.Geography

The parent geography.

hasData

Boolean

Indicates if this object contains data.

Default: true

href

String

The href.

id

String

The id.

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"