Type class
A list where all items are ordered according to specific ordering function, which is passed in via constructor parameter, when creating an instance of SortedList.
Sources
SortedList can be used (imported) via one of the following packages.
/** * -------------------------------------------------------- * Import from: "core.ts" * Use like: am4core.SortedList * -------------------------------------------------------- */ import * as am4core from "@amcharts/amcharts4/core";
/** * -------------------------------------------------------- * Include via: <script src="core.js"></script> * Access items like: am4.SortedList * -------------------------------------------------------- */
Inheritance
SortedList extends OrderedList.
SortedList is extended by SortedListTemplate.
Properties
|
events # |
Type Default Inherited from Event dispatcher. |
|---|---|
|
first # |
Type Inherited from First item in the list. |
|
last # |
Type Inherited from Last item in the list. |
|
length # |
Type Inherited from Number of items in the list. @readonly |
|
values # |
Type Inherited from All items of the list. Do not modify the list directly. Rather use |
| There are 5 inherited items currently hidden from this list. | |
Methods
|
[Symbol.iterator]() |
Returns Inherited from Returns an ES6 iterator for the list. |
|---|---|
|
clear() |
Returns Inherited from Removes all items from the list. |
|
constructor( sort: ( left: ) |
Returns Constructor. |
|
contains( value: ) |
Returns Inherited from Checks if list contains the |
|
each( f: ( value: ) |
Returns Inherited from Calls |
|
getIndex( index: ) |
Returns Inherited from Returns an item at specific |
|
indexOf( value: ) |
Returns Returns index of the item in list if found. -1 if item is not in the list. |
|
insert( value: ) |
Returns Inherited from Inserts a value into list. |
|
iterator() |
Returns Inherited from Returns a list iterator. |
|
remove( value: ) |
Returns Inherited from Removes an item with the |
|
setAll( newArray: ) |
Returns Inherited from Sets multiple items to the list. All current items are removed. |
|
slice( start: ) |
Returns Inherited from Returns part of the list between |
| There are 10 inherited items currently hidden from this list. | |
Events
| #inserted |
Param { index: Invoked when new value is inserted into the list. |
|---|---|
| #removed |
Param { index: Invoked when a value is removed from the list. |
Adapters
SortedList does not have any adapters.