statlist
A list of items with a statistic(Number) shown in a contrasting format with a title.
Syntax
<div data-juci="statlist" data-bind="ref: contents" data-stat="count" data-title="name"
data-stat-css="{juci_green: count() >= 10 && count() < 50,
juci_red: count() > 250,
juci_orange: count() <= 100 && count() > 50}"
></div>
juci.addDataset("contents", [
{"name": "IKEA Gold Cartons", "count": 70},
{"name": "PepsiCo(7Up) Cartons", "count": 10},
{"name": "Amulya Rice Bags", "count": 5},
{"name": "Vilasya Toolkit Boxes", "count": 100},
{"name": "Indigo Nation Boxes", "count": 450}
]
);
Attributes
-
data-flag-css {String} ¶CSS class for the stat. See css expression binding
-
data-stat {String} ¶Name of reference or an expression with the reference, defined using juci#addDataset. Creates a stat for each item based on with the return value of the expression as the content.
-
data-juci {String} ¶A string with value statlist.
Methods
-
onStatClick(handler, context) ¶Registers a handler function to call when the statlist#event:statclick event fires.Parameters:
-
handler{Function}
A handler function to execute when the event fires.
-
context{Object}
Optional
Context in which the handler function should execute.
- See:
- statclick
-
handler{Function}