Skip to content

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:197

Properties

NEUTRAL_STATE

NEUTRAL_STATE: string = 'neutral-state'

Constant

Defined in

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


NUMBER_FORMAT_CHAR

NUMBER_FORMAT_CHAR: string = NUMBER_FORMAT_CHAR

Defined in

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


SELECTED_BAR

SELECTED_BAR: string = 'selected-bar'

Constant

Defined in

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


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:193


UNSELECTED_BAR

UNSELECTED_BAR: string = 'unselected-bar'

Constant

Defined in

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


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:114


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:98


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:72


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:84


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 excluded 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:129


filterOperatorEvent

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

Output

: Angular

Description

Emits the filter operator

Defined in

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


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:147


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:48


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:90


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:54


missingLeafEvent

missingLeafEvent: Subject<any[]>

Defined in

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


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:141


powerBarsList

powerBarsList: PowerBar[]

Defined in

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


powerbarTitle

powerbarTitle: string = ''

Input

: Angular

Description

Powerbar title

Defined in

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


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:119


searchedTerm

searchedTerm: Subject<string>

Output

: Angular

Description

Emits searched term

Defined in

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


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:153


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:78


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:166


selectedPowerbarsSet

selectedPowerbarsSet: Set<PowerBar>

Defined in

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


selectedPowerbarsTerms

selectedPowerbarsTerms: Set<string>

Defined in

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


unit

unit: string = ''

Input

: Angular

Description

Unit the a powerbar represents

Defined in

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


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:109


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:104

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:280


ngAfterViewInit

ngAfterViewInit(): void

Returns

void

Implementation of

AfterViewInit.ngAfterViewInit

Defined in

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


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:259


ngOnInit

ngOnInit(): void

Returns

void

Implementation of

OnInit.ngOnInit

Defined in

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


onKeyUp

onKeyUp(searchText): void

Parameters

Name Type
searchText any

Returns

void

Defined in

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


setOperator

setOperator(op): void

Parameters

Name Type
op "Neq" | "Eq"

Returns

void

Defined in

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


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:309


getPowerbarsJsonSchema

Static getPowerbarsJsonSchema(): Object

Returns

Object

Defined in

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