ia.DataExplorer Class
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
Parameters:
-
id
StringThe id of the explorer.
-
callbackFunction
FunctionCalled when a selection is made.
Item Index
Methods
Methods
_buildItem
-
id
-
$parentItem
Builds the item for the given id - along with all its children.
Parameters:
-
id
StringThe item id.
-
$parentItem
JQUERY ElementThe items parent.
_closeBranch
-
$item
Closes a branch item.
Parameters:
-
$item
JQUERY ElementThe item.
_openBranch
-
$item
Opens a branch item.
Parameters:
-
$item
JQUERY ElementThe item.
_selectLeaf
-
$item
Selects a leaf item.
Parameters:
-
$item
JQUERY ElementThe item.
_size
()
private
Resizes the tree.
_toggleBranch
-
$item
Toggles a branch item.
Parameters:
-
$item
JQUERY ElementThe item.
build
-
id
Builds the tree for the given item.
Parameters:
-
id
StringThe item id.
clearSelection
()
Clears any selected items.
data
-
d
Sets or gets the data.
Parameters:
-
d
ObjectThe data.
refresh
()
Refreshes the explorer.
showItem
-
id
Expands the necessary branches to show an item.
Parameters:
-
id
StringThe 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.