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
- NEUTRAL_STATE
- NUMBER_FORMAT_CHAR
- SELECTED_BAR
- SELECTED_NO_MOUNTED_BAR
- UNSELECTED_BAR
- chartWidth
- colorsSaturationWeight
- customizedCssClass
- displayFilterField
- filterOperator
- filterOperatorEvent
- inputData
- keysToColors
- level
- missingLeafEvent
- numberShorteningPrecision
- powerBarsList
- powerbarTitle
- scrollable
- searchedTerm
- selectedPaths
- selectedPowerBarEvent
- selectedPowerbarsList
- selectedPowerbarsTerms
- unit
- useColorFromData
- useColorService
Methods
- clickOnPowerbar
- ngAfterViewInit
- ngOnChanges
- ngOnInit
- onKeyUp
- setOperator
- setSelectedPowerbars
- getPowerbarsJsonSchema
Constructors
constructor
• new PowerbarsComponent(colorService
)
Parameters
Name | Type |
---|---|
colorService |
ArlasColorService |
Defined in
projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:183
Properties
NEUTRAL_STATE
• NEUTRAL_STATE: string
= 'neutral-state'
constant
Defined in
projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:175
NUMBER_FORMAT_CHAR
• NUMBER_FORMAT_CHAR: string
= NUMBER_FORMAT_CHAR
Defined in
projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:181
SELECTED_BAR
• SELECTED_BAR: string
= 'selected-bar'
constant
Defined in
projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:167
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:179
UNSELECTED_BAR
• UNSELECTED_BAR: string
= 'unselected-bar'
constant
Defined in
projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:171
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: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:160
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:158
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:152
selectedPowerbarsList
• selectedPowerbarsList: Set
<PowerBar
>
Defined in
projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:161
selectedPowerbarsTerms
• selectedPowerbarsTerms: Set
<string
>
Defined in
projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:162
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:255
ngAfterViewInit
▸ ngAfterViewInit(): void
Returns
void
Implementation of
AfterViewInit.ngAfterViewInit
Defined in
projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:225
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:234
ngOnInit
▸ ngOnInit(): void
Returns
void
Implementation of
OnInit.ngOnInit
Defined in
projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:192
onKeyUp
▸ onKeyUp(searchText
): void
Parameters
Name | Type |
---|---|
searchText |
any |
Returns
void
Defined in
projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:317
setOperator
▸ setOperator(op
): void
Parameters
Name | Type |
---|---|
op |
"Neq" | "Eq" |
Returns
void
Defined in
projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:321
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:284
getPowerbarsJsonSchema
▸ Static
getPowerbarsJsonSchema(): Object
Returns
Object
Defined in
projects/arlas-components/src/lib/components/powerbars/powerbars.component.ts:188