Last updated

API / geotoolkit / charts / SelectionSeries / SelectionSeries

Class: SelectionSeries

charts.SelectionSeries.SelectionSeries

Selection data storage, contains selected states for series and indices (samples)

Hierarchy

Table of contents

Constructors
Methods

Contents

Constructors

new SelectionSeries(options)

new SelectionSeries(options?)

Parameters

Name Type
Optional optionsOptions

Overrides

EventDispatcher.constructor

Methods

clear

clear(data): SelectionSeries

Clears all indices for the provided selection state

Parameters

Name Type Description
dataClearTypeselection state to remove

Returns

SelectionSeries

clear(seriesId?, state?): SelectionSeries

Clears all indices for the provided selection state

Parameters

Name Type Description
Optional seriesIdstringseries identifier
Optional statestringselection state to be removed from the series

Returns

SelectionSeries


contains

contains(data, state?): ContainsType

Check if provided selection has intersection

Parameters

Name Type Description
dataHitsselection by series
Optional statestringstate that is used for selection

Returns

ContainsType

contains(index, seriesId, state?): ContainsType

Check if provided selection has intersection

Parameters

Name Type Description
indexnumber[]sample(s) to be checked
seriesIdstringseries identifier to be check
Optional statestringselection state to be used

Returns

ContainsType


deselect

deselect(selection): SelectionSeries

Removes selection state from indices of the provided series

Parameters

Name Type Description
selectionCommonSelectionTypeselection

Returns

SelectionSeries

deselect(data, state?): SelectionSeries

Removes selection state from indices of the provided series

Parameters

Name Type Description
dataHitsselection by series
Optional statestringstate that is used for selection

Returns

SelectionSeries

deselect(index, seriesId, state?): SelectionSeries

Removes selection state from indices of the provided series

Parameters

Name Type Description
indexnumber | number[]indice(s) to be deselected
seriesIdstringseries identifier to deselect
Optional statestringstate to be removed from provided indices

Returns

SelectionSeries


dispose

dispose(): void

Dispose.

Returns

void

Inherited from

EventDispatcher.dispose


getClassName

getClassName(): string

Returns

string

Inherited from

EventDispatcher.getClassName


getIndices

getIndices(seriesId, state?): number[]

Returns selected indices for the provided series

Parameters

Name Type Description
seriesIdstringseries id
Optional statestringselection state to use

Returns

number[]


getName

getName(): string

Returns selection storage name

Returns

string


getRawSelection

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.

Parameters

Name Type Description
Optional statestringselection series to check

Returns

Record<string, number[]>

getRawSelection(seriesId, state): number[]

Returns array of selected indices for the series not rounded to integer numbers.

Parameters

Name Type Description
seriesIdstringseries id
statestringstate

Returns

number[]


getSelection

getSelection(state?): Record<string, number[]>

Returns key => value record where key is unique series selected and values are arrays of selected indices

Parameters

Name Type Description
Optional statestringselection series to check

Returns

Record<string, number[]>

getSelection(seriesId, state): number[]

Returns array of selected indices for the series.

Parameters

Name Type Description
seriesIdstringseries id
statestringstate

Returns

number[]


getStates

getStates(): string[]

Returns array of states which this series holds

Returns

string[]


getTableId

getTableId(): string

Returns selection table identifier

Returns

string


hasEventListener

hasEventListener(type, callback?): boolean

Check if a list of event listeners for this type contains this listener

Parameters

Name Type Description
typestringtype of event or property
Optional callbackFunctionto be called, if null, check if any callback is registered

Returns

boolean

Inherited from

EventDispatcher.hasEventListener


isDisposed

isDisposed(): boolean

Returns whether this object has been disposed

Returns

boolean

Inherited from

EventDispatcher.isDisposed


isEmpty

isEmpty(state?): boolean

Returns true if there're no series selected with the state provided, false otherwise

Parameters

Name Type Description
Optional statestringselection state to check

Returns

boolean


isSelected

isSelected(data, state?): boolean

Returns true if all the series and samples provided are selected, false otherwise

Parameters

Name Type Description
dataHitsselection by series
Optional statestringstate that is used for selection

Returns

boolean

isSelected(seriesId, state?): boolean

Returns true if all the series and samples provided are selected, false otherwise

Parameters

Name Type Description
seriesIdstringseries identifier to be check
Optional statestringselection state to be used

Returns

boolean

isSelected(index, seriesId, state?): boolean

Returns true if all the series and samples provided are selected, false otherwise

Parameters

Name Type Description
indexnumber | number[]sample(s) to be checked
seriesIdstringseries identifier to be check
Optional statestringselection state to be used

Returns

boolean


isSilent

isSilent(): boolean

Return true if the event dispatcher doesn't notify any events

Returns

boolean

Inherited from

EventDispatcher.isSilent


notify

notify<E>(type, source, args?): SelectionSeries

Notify listeners

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEevent types
sourceSelectionSeriesof the event
Optional argsEventMap[E]arguments of the event

Returns

SelectionSeries

this

Overrides

EventDispatcher.notify


off

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.

Type parameters

NameType
Eextends string

Parameters

Name Type Description
Optional typeEtype of the event
Optional callback(eventType: E, sender: SelectionSeries, args: EventMap[E]) => voidfunction to be called

Returns

SelectionSeries

this

Overrides

EventDispatcher.off


on

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.

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEtype of event or property
callback(eventType: E, sender: SelectionSeries, args: EventMap[E]) => voidto be called

Returns

SelectionSeries

this

Overrides

EventDispatcher.on


select

select(selection): SelectionSeries

Selects indices, adding new state onto it

Parameters

Name Type Description
selectionCommonSelectionTypeselection

Returns

SelectionSeries

select(selection, state?): SelectionSeries

Selects indices for the series, adding new state onto it

Parameters

Name Type Description
selectionHits
Optional statestringstate that is used for selection

Returns

SelectionSeries

select(index, seriesId, state?): SelectionSeries

Selects indices for the series, adding new state onto it

Parameters

Name Type Description
indexnumber | number[]index/array of indices to select
seriesIdstringseries identifier to be selected
Optional statestringstate that is used for selection

Returns

SelectionSeries


setName

setName(name): SelectionSeries

Sets selection storage name

Parameters

Name Type Description
namestringname to use

Returns

SelectionSeries


setSelection

setSelection(selection): SelectionSeries

Sets new indices of the series to be selected with the 'state' status NOTE: It completely overwrites entire selection

Parameters

Name Type Description
selectionSelectionSeries | CommonSelectionTypeselection

Returns

SelectionSeries

setSelection(data, state?): SelectionSeries

Sets new indices of the series to be selected with the 'state' status NOTE: It completely overwrites entire selection

Parameters

Name Type Description
dataHitsselection by series
Optional statestringstate that is used for selection

Returns

SelectionSeries

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

Parameters

Name Type Description
indexnumber | number[]index/array of indices to select
seriesIdstringseries identifier to be set
Optional statestringstate that is used for selection

Returns

SelectionSeries


setSilent

setSilent(bool): SelectionSeries

Set silent mode

Parameters

Name Type Description
boolbooleanflag to enable silent mode

Returns

SelectionSeries

this

Inherited from

EventDispatcher.setSilent


toggle

toggle(selection): SelectionSeries

Toggles indice(s) state for series provided (selects if was not selected, deselects otherwise)

Parameters

Name Type Description
selectionCommonSelectionTypeselection

Returns

SelectionSeries

toggle(data, state?): SelectionSeries

Toggles indice(s) state for series provided (selects if was not selected, deselects otherwise)

Parameters

Name Type Description
dataHitsselection by series
Optional statestringstate that is used for selection

Returns

SelectionSeries

toggle(index, seriesId, state?): SelectionSeries

Toggles indice(s) state for series provided (selects if was not selected, deselects otherwise)

Parameters

Name Type Description
indexnumber | number[]index/array of indices to select
seriesIdstringseries identifier to be set
Optional statestringstate that is used for selection

Returns

SelectionSeries


getClassName

Static getClassName(): string

Returns

string

Inherited from

EventDispatcher.getClassName