Class GaugeComponent

new GaugeComponent($id)

inherits from KPIComponent

NameTypeDescription
$id String Uniquely identifies the instance of this class

Methods

PermalinksetLimits


setLimits(min, max)

Sets the maximum and minimum values of the gauge.

Params
NameTypeDescription
min Number Lower bound of the gauge
max Number Upper bound of the gauge

PermalinkgetType


getType()

Gets the type of this component

Params
None

Inherited Methods

PermalinksetValue


setValue($value, $options)

Sets a numeric value to the KPI which is displayed on the dashboard.

Params
NameTypeDescription
$value Number The value to be displayed
$options Array A bunch of options to configure the display passed to as an associative array

PermalinksetSparkValues


setSparkValues($labels, $values)

Sets the values to be displayed by the spark

Params
NameTypeDescription
$labels Array Array of labels as strings
$values Array The values used by the spark

PermalinkonValueClick


onValueClick($url)

Handles Click function on a value

Params
NameTypeDescription
$url String Remote Url that updates the value

PermalinkgetType


getType()

Gets the type of this component

Params
None

PermalinksetCaption


setCaption($caption)

Set the caption of this component which is the text displayed on top of the component

Params
NameTypeDescription
$caption String Caption text to be displayed on the component

PermalinksetDimensions


setDimensions($w, $h)

Set the dimensions of the component. The dimensions are based on a 12-column grid

Params
NameTypeDescription
$w Number Width of the Component in Units
$h Number Height of the Component in Units

PermalinkhideComponent


hideComponent()

Hides a component from the dashboard

Params
None

PermalinkshowAsModal


showAsModal()

Show a hidden component in a modal

Params
None

PermalinkaddComponentKPI


addComponentKPI($id, $options)

Add a simple Key Performance Indicator (KPI/Metric) attached to the bottom of the component.

Params
NameTypeDescription
$id String A unique ID to identify the component KPI
$options ComponentKPIProperties The options as an Associative Array
Properties Show
NameTypeDescription
caption string The caption to display for the component KPI
numberFormatFlag boolean If set to true, the number will be formatted as per the options.
numberHumanize boolean Uses K, M and B to denote thousands, millions and billions respectively.
numberPrefix string Adds a string perfix to the number.
numberSuffix string Adds a string suffix to the number.
numberDecimalPoints number Number of decimal places to show.

PermalinkupdateComponentKPI


updateComponentKPI($id, $options)

Updates the Component KPI

Params
NameTypeDescription
$id String A unique ID to identify the component KPI. This has to be the same as the one used to add the component kpi
$options Array Array with the new value to set

PermalinkremoveComponentKPI


removeComponentKPI($id)

Removes a Component KPI

Params
NameTypeDescription
$id String A unique ID to identify the component KPI. This has to be the same as the one used to add the component kpi

PermalinkoverrideDisplayOrderIndex


overrideDisplayOrderIndex($idx)

Sets the index of the component on the dashboard. The component order on the dashboard is based on this index.

Params
NameTypeDescription
$idx Number The index for this component

PermalinksetOption


setOption(key, value)

Set the value to the key passed for the particular component.

Params
NameTypeDescription
key String variable which needs to be assigned
value String value to be assigned to the key

PermalinkgetID


getID()

Get the id for this component

Params
None