new module:crm/Views/MetricWidget()
Members
errorTemplate
Properties:
Type | Description |
---|---|
Simplate |
itemTemplate
Properties:
Name | Type | Description |
---|---|---|
HTML |
Simplate | markup for the metric detail (name/value) |
loadingTemplate
Properties:
Name | Type | Description |
---|---|---|
HTML |
Simplate | markup for the loading text and icon |
widgetTemplate
Properties:
Name | Type | Description |
---|---|---|
Simple |
Simplate | that defines the HTML Markup |
Methods
requestData()
Requests the widget's data, value fn, format fn, and renders it's itemTemplate
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 |
Returns:
Returns a value calculated from data (SUM/AVG/MAX/MIN/Whatever)
- Type
- int