arlas-web-components / Exports / PowerbarsComponent

Class: PowerbarsComponent

Powerbars component transforms a [term, occurence_count] map to a descreasingly sorted list of multiselectable bars. A bar progression represents the term's occurence count.

Implements

  • OnInit
  • OnChanges
  • AfterViewInit

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new PowerbarsComponent(colorService)

Parameters

Name Type
colorService ArlasColorService

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:196

Properties

NEUTRAL_STATE

NEUTRAL_STATE: string = 'neutral-state'

Constant

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:188


NUMBER_FORMAT_CHAR

NUMBER_FORMAT_CHAR: string = NUMBER_FORMAT_CHAR

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:194


SELECTED_BAR

SELECTED_BAR: string = 'selected-bar'

Constant

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:180


SELECTED_NO_MOUNTED_BAR

SELECTED_NO_MOUNTED_BAR: string = 'selected-no-mounted-bar'

Constant

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:192


UNSELECTED_BAR

UNSELECTED_BAR: string = 'unselected-bar'

Constant

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:184


chartWidth

chartWidth: any = null

Input

: Angular

Description

Chart's width. If not specified, the chart takes the component's container width.

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:113


colorsSaturationWeight

colorsSaturationWeight: any

Input

: Angular

Description

Knowing that saturation scale is [0, 1], colorsSaturationWeight is a factor (between 0 and 1) that tightens this scale to [(1-colorsSaturationWeight), 1]. Therefore saturation of generated colors will be within this tightened scale.

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:97


customizedCssClass

customizedCssClass: any

Input

: Angular

Description

Css class name to use to customize a specific powerbar's style.

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:71


displayFilterField

displayFilterField: boolean = false

Input

: Angular

Description

Whether text input, to filter powerbars, is displayed

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:83


filterOperator

filterOperator: FilterOperator

Input

: Angular

Description

Options about how to apply filters on powerbars - value : The default value. if 'Eq', the selected powerbar is included in the ARLAS filter. if 'Neq', the selected powerbar is included in the ARLAS filter. - display: Whether to display a switcher between 'Eq' and 'Neq' or keep the default operator all the time

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:128


filterOperatorEvent

filterOperatorEvent: EventEmitter<"Neq" | "Eq">

Output

: Angular

Description

Emits the filter operator

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:159


groupSelections

groupSelections: boolean = true

Input

: Angular

Description

Whether to group the selected powerbars in a dedicated list or not.

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:146


inputData

inputData: TreeNode

Input

: Angular

Description

Data formated as a tree to be plotted as powerbars

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:47


keysToColors

keysToColors: [string, string][]

Input

: Angular

Description

List of [key, color] couples that associates a hex color to each key

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:89


level

level: number = 1

Input

: Angular

Description

Which level of the tree inputData to plot as powerbars

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:53


missingLeafEvent

missingLeafEvent: Subject<any[]>

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:133


numberShorteningPrecision

numberShorteningPrecision: number = DEFAULT_SHORTENING_PRECISION

Input

: Angular

Description

Precision when rounding numbers (ie the count next to the progress bar). Default is 2.

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:140


powerBarsList

powerBarsList: PowerBar[]

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:173


powerbarTitle

powerbarTitle: string = ''

Input

: Angular

Description

Powerbar title

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:59


scrollable

scrollable: boolean = false

Input

: Angular

Description

Whether the powerbar is scrollable or fully displayed

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:118


searchedTerm

searchedTerm: Subject<string>

Output

: Angular

Description

Emits searched term

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:171


selectWithCheckbox

selectWithCheckbox: boolean = false

Input

: Angular

Description

Whether to have the option to select the powerbar using checkboxes.

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:152


selectedPaths

selectedPaths: SimpleNode[][]

Input

: Angular

Description

List of selected paths in inputData from which the powerbars to select are determined

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:77


selectedPowerBarEvent

selectedPowerBarEvent: Subject<SimpleNode[][]>

Output

: Angular

Description

Emits the list of selected paths in the tree inputData

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:165


selectedPowerbarsSet

selectedPowerbarsSet: Set<PowerBar>

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:174


selectedPowerbarsTerms

selectedPowerbarsTerms: Set<string>

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:175


unit

unit: string = ''

Input

: Angular

Description

Unit the a powerbar represents

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:65


useColorFromData

useColorFromData: boolean = false

Input

: Angular

Description

Whether to allow colorizing the bar according to its term or not using a field of the data

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:108


useColorService

useColorService: boolean = false

Input

: Angular

Description

Whether to allow colorizing the bar according to its term or not using keysToColors

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:103

Methods

clickOnPowerbar

clickOnPowerbar(powerBar): void

Description

Select or deselect a PowerBar and emits the terms list of selected bars

Parameters

Name Type
powerBar PowerBar

Returns

void

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:279


ngAfterViewInit

ngAfterViewInit(): void

Returns

void

Implementation of

AfterViewInit.ngAfterViewInit

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:249


ngOnChanges

ngOnChanges(changes): void

Parameters

Name Type
changes SimpleChanges

Returns

void

Implementation of

OnChanges.ngOnChanges

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:258


ngOnInit

ngOnInit(): void

Returns

void

Implementation of

OnInit.ngOnInit

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:212


onKeyUp

onKeyUp(searchText): void

Parameters

Name Type
searchText any

Returns

void

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:339


setOperator

setOperator(op): void

Parameters

Name Type
op "Neq" | "Eq"

Returns

void

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:343


setSelectedPowerbars

setSelectedPowerbars(selectedPaths): void

Description

Set selected powerbars from outside of the component

Parameters

Name Type Description
selectedPaths { fieldName: string ; fieldValue: string }[][] selects the powerbars whose terms are in the selected paths

Returns

void

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:308


getPowerbarsJsonSchema

Static getPowerbarsJsonSchema(): Object

Returns

Object

Defined in

projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:208