JavaScript & React libraryAPI

Class: CosmographLinkAggregationManager

Constructors

Constructor

new CosmographLinkAggregationManager(_): CosmographLinkAggregationManager

Parameters

ParameterType
_ICosmographInternalApi

Returns

CosmographLinkAggregationManager

Accessors

countCache

Get Signature

get countCache(): null | Map<bigint, number>

Returns

null | Map<bigint, number>


colorSumCache

Get Signature

get colorSumCache(): null | Map<bigint, number>

Returns

null | Map<bigint, number>


widthSumCache

Get Signature

get widthSumCache(): null | Map<bigint, number>

Returns

null | Map<bigint, number>

Methods

buildCountCache()

buildCountCache(linksTable): void

Parameters

ParameterType
linksTableCosmographData

Returns

void


buildColorSumCache()

buildColorSumCache(linksTable, column): void

Parameters

ParameterType
linksTableCosmographData
columnnull | Vector<any>

Returns

void


buildWidthSumCache()

buildWidthSumCache(linksTable, column): void

Parameters

ParameterType
linksTableCosmographData
columnnull | Vector<any>

Returns

void


aggregateFromCache()

aggregateFromCache(linksTable, strategy, useColorCache): undefined | number[]

Parameters

ParameterTypeDefault value
linksTableCosmographDataundefined
strategy"count" | "sum" | "average"undefined
useColorCachebooleantrue

Returns

undefined | number[]


getKeysByValueCondition()

getKeysByValueCondition(cache, condition): bigint[]

Parameters

ParameterType
cachenull | Map<bigint, number>
condition(value) => boolean

Returns

bigint[]


getIndicesSetFromKeys()

getIndicesSetFromKeys(keys): number[]

Parameters

ParameterType
keysbigint[]

Returns

number[]


getIndicesByValueCondition()

getIndicesByValueCondition(cache, condition): number[]

Parameters

ParameterType
cachenull | Map<bigint, number>
condition(value) => boolean

Returns

number[]


getIndicesByAverageCondition()

getIndicesByAverageCondition(countCache, sumCache, condition): number[]

Parameters

ParameterType
countCachenull | Map<bigint, number>
sumCachenull | Map<bigint, number>
condition(average) => boolean

Returns

number[]


clear()

clear(): void

Returns

void


clearColorSumCache()

clearColorSumCache(): void

Returns

void


clearWidthSumCache()

clearWidthSumCache(): void

Returns

void