Show:

ia.DataExplorer Class

Defined in: ia\ui\Explorer.js:1
Module: ia

Class for data trees.

Requires data in the form of a hashtable:

["i1"]{id:"i1", label:"Home", type:"branch", children:["i2", "i3", "i4"]} ["i2"]{id:"i2", label:"Indicator 1", type:"branch", parent:"i1", children:["i5", "i6", "i7"]} ["i5"]{id:"i5", label:"2004", type:"leaf", parent:"i2"}

Constructor

ia.DataExplorer

(
  • id
  • callbackFunction
)

Defined in ia\ui\Explorer.js:1

Parameters:

  • id String

    The id of the explorer.

  • callbackFunction Function

    Called when a selection is made.

Methods

_buildItem

(
  • id
  • $parentItem
)
private

Builds the item for the given id - along with all its children.

Parameters:

  • id String

    The item id.

  • $parentItem JQUERY Element

    The items parent.

_closeBranch

(
  • $item
)
private

Closes a branch item.

Parameters:

  • $item JQUERY Element

    The item.

_openBranch

(
  • $item
)
private

Opens a branch item.

Parameters:

  • $item JQUERY Element

    The item.

_selectLeaf

(
  • $item
)
private

Selects a leaf item.

Parameters:

  • $item JQUERY Element

    The item.

_size

() private

Resizes the tree.

_toggleBranch

(
  • $item
)
private

Toggles a branch item.

Parameters:

  • $item JQUERY Element

    The item.

build

(
  • id
)

Builds the tree for the given item.

Parameters:

  • id String

    The item id.

clearSelection

()

Clears any selected items.

data

(
  • d
)

Sets or gets the data.

Parameters:

  • d Object

    The data.

refresh

()

Refreshes the explorer.

showItem

(
  • id
)

Expands the necessary branches to show an item.

Parameters:

  • id String

    The item id.

Properties

callbackFunction

Function

The callback function.

closeBranchesOnSelection

Boolean

Indicates that other branches should be closed or remain open when a branch is selected.

Default: false

container

JQUERY Element

The container that holds the object.

hideOnSelection

Boolean

Should the explorer be hidden after selection.

id

String

The id.

isFilterExplorer

Boolean

Filter explorer.