ia.Profile Class
A class for rendering a data table. for rendering a data table.
Constructor
ia.Profile
-
id
-
useMouseClick
-
callbackFunction
Parameters:
-
id
StringThe id of the table.
-
useMouseClick
BooleanIndicates if an event should be fired when an indicator is clicked.
-
callbackFunction
FunctionCalled when a selection is made.
Item Index
Methods
Methods
_addMouseEvents
()
private
Adds mouse events to the passed jquery object. Uses delegation to reduce number of events added to rows and rendering time!
_onIndicatorClick
-
indicatorRow
Called when a indicator tr is clicked.
Parameters:
-
indicatorRow
JQUERY ElementThe indicator tr.
_onThemeClick
-
themeCell
Called when a theme td is clicked.
Parameters:
-
themeCell
JQUERY ElementThe theme td.
_renderCanvasColumns
()
private
Renders special columns.
_setToolTip
-
canvas
-
features
Sets the tooltip.
Parameters:
-
canvas
HTML CanvasThe canvas to add the tip to.
-
features
ObjectThe features the tip applies to.
_size
()
private
Sizes all the element to make the scrolling work.
_triggerRender
()
private
Triggers a render. Prevents over rendering which results in a frozen browser.
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.
clearHighlight
()
Clears all highlights.
clearSelection
()
Clears all selections.
dispatchEvent
-
event
Dispatch an event to the listeners.
Parameters:
-
event
ObjectThe event object.
expandThemes
-
[]
Expands the passed theme ids.
Parameters:
-
[]
Object optionalexpandedThemeIds The theme levels that should be expanded.
highlight
-
rowId
Hightlights a row.
Parameters:
-
rowId
StringThe id of the row to select.
removeListener
-
obj
Removes all event listeners for the given object.
Parameters:
-
obj
ObjectThe object.
render
()
Renders the table.
select
-
rowId
Selects a row.
Parameters:
-
rowId
StringThe id of the row to select.
toggleTree
()
Collapse / expands the table.
unselect
-
rowId
Unselects a row.
Parameters:
-
rowId
StringThe id of the row to unselect.
Properties
bar
Object
An object that describe a bar. {color:"#EC6768", height:"12", data:"diff"}
breaks
Object
A list of objects that describe breaks for the performance chart. [{color:"#EC6768", label:"Poor"}]
callbackFunction
Function
The callback function.
columns
JSON
The columns to be rendered.
The columns are an array with the following structure: They dictate which columns should be used from the data. The id points to the id in the data.
[{id:"name", label:"Features", type:"categoric"}, {id:"value", label:"Indicator", type:"numeric"}, {id:"associate1", label:"Associate 1", type:"numeric'"}, {id:"associate2", label:"Associate 2", type:"categoric'"}]
container
JQUERY Element
The container that holds the object.
displayDatesInProfile
Boolean
Display the dates in the profile?
Default: false
displayMode
String
Display indicators for "Selected date","Most recent date", "All dates"?
Default: Selected date
id
String
The id.
symbols
Object
A list of objects that describe symbols. [{shape:"arrow down", color:"#EC6768", size:"12", label:"Poor", value:"--"}]
targets
Object
A list of objects that describe targets. [{shape:"vertical line", color:"#EC6768", size:"12", label:"Poor", data:"target"}]