API / geotoolkit / charts / SelectionSeries / SelectionSeries
charts.SelectionSeries.SelectionSeries
Selection data storage, contains selected states for series and indices (samples)
↳
SelectionSeries
Constructors
Methods
Constructors
• new SelectionSeries(options?)
| Name | Type |
|---|---|
Optional options | Options |
EventDispatcher.constructor
Methods
▸ clear(data): SelectionSeries
Clears all indices for the provided selection state
| Name | Type | Description |
|---|---|---|
data | ClearType | selection state to remove |
▸ clear(seriesId?, state?): SelectionSeries
Clears all indices for the provided selection state
| Name | Type | Description |
|---|---|---|
Optional seriesId | string | series identifier |
Optional state | string | selection state to be removed from the series |
▸ contains(data, state?): ContainsType
Check if provided selection has intersection
| Name | Type | Description |
|---|---|---|
data | Hits | selection by series |
Optional state | string | state that is used for selection |
▸ contains(index, seriesId, state?): ContainsType
Check if provided selection has intersection
| Name | Type | Description |
|---|---|---|
index | number[] | sample(s) to be checked |
seriesId | string | series identifier to be check |
Optional state | string | selection state to be used |
▸ deselect(selection): SelectionSeries
Removes selection state from indices of the provided series
| Name | Type | Description |
|---|---|---|
selection | CommonSelectionType | selection |
▸ deselect(data, state?): SelectionSeries
Removes selection state from indices of the provided series
| Name | Type | Description |
|---|---|---|
data | Hits | selection by series |
Optional state | string | state that is used for selection |
▸ deselect(index, seriesId, state?): SelectionSeries
Removes selection state from indices of the provided series
| Name | Type | Description |
|---|---|---|
index | number | number[] | indice(s) to be deselected |
seriesId | string | series identifier to deselect |
Optional state | string | state to be removed from provided indices |
▸ dispose(): void
Dispose.
void
▸ getClassName(): string
string
▸ getIndices(seriesId, state?): number[]
Returns selected indices for the provided series
| Name | Type | Description |
|---|---|---|
seriesId | string | series id |
Optional state | string | selection state to use |
number[]
▸ getName(): string
Returns selection storage name
string
▸ getRawSelection(state?): Record<string, number[]>
Returns key => value record where key is unique series selected and values are arrays of selected indices not rounded to integer numbers.
| Name | Type | Description |
|---|---|---|
Optional state | string | selection series to check |
Record<string, number[]>
▸ getRawSelection(seriesId, state): number[]
Returns array of selected indices for the series not rounded to integer numbers.
| Name | Type | Description |
|---|---|---|
seriesId | string | series id |
state | string | state |
number[]
▸ getSelection(state?): Record<string, number[]>
Returns key => value record where key is unique series selected and values are arrays of selected indices
| Name | Type | Description |
|---|---|---|
Optional state | string | selection series to check |
Record<string, number[]>
▸ getSelection(seriesId, state): number[]
Returns array of selected indices for the series.
| Name | Type | Description |
|---|---|---|
seriesId | string | series id |
state | string | state |
number[]
▸ getStates(): string[]
Returns array of states which this series holds
string[]
▸ getTableId(): string
Returns selection table identifier
string
▸ hasEventListener(type, callback?): boolean
Check if a list of event listeners for this type contains this listener
| Name | Type | Description |
|---|---|---|
type | string | type of event or property |
Optional callback | Function | to be called, if null, check if any callback is registered |
boolean
EventDispatcher.hasEventListener
▸ isDisposed(): boolean
Returns whether this object has been disposed
boolean
▸ isEmpty(state?): boolean
Returns true if there're no series selected with the state provided, false otherwise
| Name | Type | Description |
|---|---|---|
Optional state | string | selection state to check |
boolean
▸ isSelected(data, state?): boolean
Returns true if all the series and samples provided are selected, false otherwise
| Name | Type | Description |
|---|---|---|
data | Hits | selection by series |
Optional state | string | state that is used for selection |
boolean
▸ isSelected(seriesId, state?): boolean
Returns true if all the series and samples provided are selected, false otherwise
| Name | Type | Description |
|---|---|---|
seriesId | string | series identifier to be check |
Optional state | string | selection state to be used |
boolean
▸ isSelected(index, seriesId, state?): boolean
Returns true if all the series and samples provided are selected, false otherwise
| Name | Type | Description |
|---|---|---|
index | number | number[] | sample(s) to be checked |
seriesId | string | series identifier to be check |
Optional state | string | selection state to be used |
boolean
▸ isSilent(): boolean
Return true if the event dispatcher doesn't notify any events
boolean
▸ notify<E>(type, source, args?): SelectionSeries
Notify listeners
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | event types |
source | SelectionSeries | of the event |
Optional args | EventMap[E] | arguments of the event |
this
▸ off<E>(type?, callback?): SelectionSeries
Detach listener on event. Calling .off() with no arguments removes all attached listeners. Calling .off(type) with no callback removes all attached listeners for specific type.
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
Optional type | E | type of the event |
Optional callback | (eventType: E, sender: SelectionSeries, args: EventMap[E]) => void | function to be called |
this
▸ on<E>(type, callback): SelectionSeries
Attach listener on event that will be called whenever the specified event is delivered to the target
If the callback function is already in the list of event listeners for this target, the function is not added a second time.
If a particular anonymous function is in the list of event listeners registered for a certain target, and then later in the code, an identical anonymous function is given in an "on" call, the second function will also be added to the list of event listeners for that target.
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | type of event or property |
callback | (eventType: E, sender: SelectionSeries, args: EventMap[E]) => void | to be called |
this
▸ select(selection): SelectionSeries
Selects indices, adding new state onto it
| Name | Type | Description |
|---|---|---|
selection | CommonSelectionType | selection |
▸ select(selection, state?): SelectionSeries
Selects indices for the series, adding new state onto it
| Name | Type | Description |
|---|---|---|
selection | Hits | |
Optional state | string | state that is used for selection |
▸ select(index, seriesId, state?): SelectionSeries
Selects indices for the series, adding new state onto it
| Name | Type | Description |
|---|---|---|
index | number | number[] | index/array of indices to select |
seriesId | string | series identifier to be selected |
Optional state | string | state that is used for selection |
▸ setName(name): SelectionSeries
Sets selection storage name
| Name | Type | Description |
|---|---|---|
name | string | name to use |
▸ setSelection(selection): SelectionSeries
Sets new indices of the series to be selected with the 'state' status NOTE: It completely overwrites entire selection
| Name | Type | Description |
|---|---|---|
selection | SelectionSeries | CommonSelectionType | selection |
▸ setSelection(data, state?): SelectionSeries
Sets new indices of the series to be selected with the 'state' status NOTE: It completely overwrites entire selection
| Name | Type | Description |
|---|---|---|
data | Hits | selection by series |
Optional state | string | state that is used for selection |
▸ setSelection(index, seriesId, state?): SelectionSeries
Sets new indices of the series to be selected with the 'state' status NOTE: It only overwrites selection with provided state
| Name | Type | Description |
|---|---|---|
index | number | number[] | index/array of indices to select |
seriesId | string | series identifier to be set |
Optional state | string | state that is used for selection |
▸ setSilent(bool): SelectionSeries
Set silent mode
| Name | Type | Description |
|---|---|---|
bool | boolean | flag to enable silent mode |
this
▸ toggle(selection): SelectionSeries
Toggles indice(s) state for series provided (selects if was not selected, deselects otherwise)
| Name | Type | Description |
|---|---|---|
selection | CommonSelectionType | selection |
▸ toggle(data, state?): SelectionSeries
Toggles indice(s) state for series provided (selects if was not selected, deselects otherwise)
| Name | Type | Description |
|---|---|---|
data | Hits | selection by series |
Optional state | string | state that is used for selection |
▸ toggle(index, seriesId, state?): SelectionSeries
Toggles indice(s) state for series provided (selects if was not selected, deselects otherwise)
| Name | Type | Description |
|---|---|---|
index | number | number[] | index/array of indices to select |
seriesId | string | series identifier to be set |
Optional state | string | state that is used for selection |
▸ Static getClassName(): string
string