JavaScript & React libraryAPIClassesCosmographBars

Class: CosmographBars

Internal

Abstract component with methods for highlighting crossfiltered data by current links and points selection. Unlike exclusive components (which only allow one active selection), inclusive components can coexist with other selections.

Extends

Constructors

Constructor

new CosmographBars(cosmograph, targetElement, config): CosmographBars

Constructs a filtering component that connects Cosmograph data to a UI component.

Parameters

ParameterTypeDescription
cosmographCosmographThe Cosmograph instance to connect to
targetElementHTMLElementHTML element for rendering the UI component
configCosmographBarsConfigConfiguration for the filtering component

Returns

CosmographBars

Inherited from

CosmographInclusiveSelectionComponent.constructor

Accessors

defaultConfig

Get Signature

get defaultConfig(): CosmographBarsConfig

Returns

CosmographBarsConfig

Overrides

CosmographInclusiveSelectionComponent.defaultConfig


accessor

Get Signature

get accessor(): undefined | string

Returns

undefined | string

Overrides

CosmographInclusiveSelectionComponent.accessor

Methods

isInclusiveComponent()

static isInclusiveComponent(id): boolean

Parameters

ParameterType
idstring

Returns

boolean

Inherited from

CosmographInclusiveSelectionComponent.isInclusiveComponent


register()

static register(id): void

Parameters

ParameterType
idstring

Returns

void

Inherited from

CosmographInclusiveSelectionComponent.register


unregister()

static unregister(id): void

Parameters

ParameterType
idstring

Returns

void

Inherited from

CosmographInclusiveSelectionComponent.unregister


remove()

remove(): void

Removes the component and cleans up event listeners

Returns

void

Inherited from

CosmographInclusiveSelectionComponent.remove


setConfig()

setConfig(config): Promise<void>

Parameters

ParameterType
configPartial<TConfig>

Returns

Promise<void>

Inherited from

CosmographInclusiveSelectionComponent.setConfig


setSelectedItem()

setSelectedItem(item?): void

Sets the selected bar item.

Parameters

ParameterTypeDescription
item?BarDataThe bar data item to select, or undefined to clear selection.

Returns

void