Show:

ia.Profile Class

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

A class for rendering a data table. for rendering a data table.

Constructor

ia.Profile

(
  • id
  • useMouseClick
  • callbackFunction
)

Defined in ia\ui\Profile.js:1

Parameters:

  • id String

    The id of the table.

  • useMouseClick Boolean

    Indicates if an event should be fired when an indicator is clicked.

  • callbackFunction Function

    Called when a selection is made.

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
)
private

Called when a indicator tr is clicked.

Parameters:

  • indicatorRow JQUERY Element

    The indicator tr.

_onThemeClick

(
  • themeCell
)
private

Called when a theme td is clicked.

Parameters:

  • themeCell JQUERY Element

    The theme td.

_renderCanvasColumns

() private

Renders special columns.

_setToolTip

(
  • canvas
  • features
)
private

Sets the tooltip.

Parameters:

  • canvas HTML Canvas

    The canvas to add the tip to.

  • features Object

    The 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 String

    The type of event to listen for.

  • fnc Function

    The function to call when the event occurs.

  • obj Object

    An optional parent object.

clearHighlight

()

Clears all highlights.

clearSelection

()

Clears all selections.

dispatchEvent

(
  • event
)

Dispatch an event to the listeners.

Parameters:

  • event Object

    The event object.

expandThemes

(
  • []
)

Expands the passed theme ids.

Parameters:

  • [] Object optional

    expandedThemeIds The theme levels that should be expanded.

highlight

(
  • rowId
)

Hightlights a row.

Parameters:

  • rowId String

    The id of the row to select.

removeListener

(
  • obj
)

Removes all event listeners for the given object.

Parameters:

  • obj Object

    The object.

render

()

Renders the table.

select

(
  • rowId
)

Selects a row.

Parameters:

  • rowId String

    The id of the row to select.

toggleTree

()

Collapse / expands the table.

unselect

(
  • rowId
)

Unselects a row.

Parameters:

  • rowId String

    The 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

Defined in ia\ui\Profile.js:77

The callback function.

colorPalette

ia.ColorPalette

Defined in ia\ui\Profile.js:85

Specifies a color palette for the bars.

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

geography

ia.Geography

Defined in ia\ui\Profile.js:93

Specifies a geography.

id

String

Defined in ia\ui\Profile.js:69

The id.

indicator

ia.Indicator

Specifies a selected indicator.

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"}]