Class: module:crm/Views/MetricWidget

module:crm/Views/MetricWidget()

new module:crm/Views/MetricWidget()

Source:

Members

errorTemplate

Properties:
Type Description
Simplate
Source:

itemTemplate

Properties:
Name Type Description
HTML Simplate

markup for the metric detail (name/value)

Source:

loadingTemplate

Properties:
Name Type Description
HTML Simplate

markup for the loading text and icon

Source:

widgetTemplate

Properties:
Name Type Description
Simple Simplate

that defines the HTML Markup

Source:

Methods

requestData()

Requests the widget's data, value fn, format fn, and renders it's itemTemplate

Source:

valueFn(data) → {int}

Calculates the value shown in the metric widget button.

Parameters:
Name Type Description
data Array

Array of data used for the metric

Source:
Returns:

Returns a value calculated from data (SUM/AVG/MAX/MIN/Whatever)

Type
int