MindFusion.Charting for JavaScript Programmer's Guide
IEnumerable.max Method
See Also
 






Invokes a transform function on each item and returns the maximum value in a sequence of numbers.

Namespace: MindFusion.Common.Collections
File: IEnumerable.js

 Syntax

JavaScript  Copy Code

function max (selector)

 Parameters

selector

Type: function
function. A transform function to invoke on each element.

 Return Value

Type: Number
Number. The maximum number in the sequence.

 Example

The following code handles the selectionChanged event of a listView to check if the max selected item is greater than 1000:

JavaScript  Copy Code

listView.selectionChanged.addEventListener(listSelectionChanged);

function listSelectionChanged(sender, args)
{

     if( args.newItems.max() > 1000)
     {
             //do something
     }
}

 See Also

IEnumerable Members
IEnumerable Class
MindFusion.Common.Collections Namespace