Skip to content

arlas-web-contributors > "contributors/HistogramContributor" > HistogramContributor

Class: HistogramContributor

This contributor works with the Angular HistogramComponent of the Arlas-web-components project. This class make the brigde between the component which displays the data and the collaborativeSearchService of the Arlas-web-core which retrieve the data from the server.

Hierarchy

Contributor

↳ HistogramContributor

DetailedHistogramContributor

Index

Constructors

Properties

Methods


Constructors

constructor

new HistogramContributor(identifier: string, collaborativeSearcheService: CollaborativesearchService, configService: ConfigService, isOneDimension?: boolean): HistogramContributor

Overrides Contributor.__constructor

Defined in contributors/HistogramContributor.ts:104

Build a new contributor.

Parameters:

Name Type Description
identifier string Identifier of contributor.
collaborativeSearcheService CollaborativesearchService Instance of CollaborativesearchService from Arlas-web-core.
configService ConfigService Instance of ConfigService from Arlas-web-core.
Optional isOneDimension boolean

Returns: HistogramContributor


Properties

<Protected> aggregations

● aggregations: Array<Aggregation> = this.getConfigValue('aggregationmodels')

Defined in contributors/HistogramContributor.ts:76

ARLAS Server Aggregation used to draw the chart, define in configuration


chartData

● chartData: Array<object> = new Array<{ key: number, value: number }>()

Defined in contributors/HistogramContributor.ts:47

New data need to be draw on the histogram (could be set to input(): data of HistogramComponent


collaborativeSearcheService

● collaborativeSearcheService: CollaborativesearchService

Inherited from Contributor.collaborativeSearcheService

Defined in /docs/node_modules/arlas-web-core/models/contributor.d.ts:8


configService

● configService: ConfigService

Inherited from Contributor.configService

Defined in /docs/node_modules/arlas-web-core/models/contributor.d.ts:7


<Protected> endValue

● endValue: string

Defined in contributors/HistogramContributor.ts:96

End value of selection use to the display of filterDisplayName


<Protected> field

● field: string = (this.aggregations !== undefined) ? (this.aggregations[this.aggregations.length - 1].field) : (undefined)

Defined in contributors/HistogramContributor.ts:88

ARLAS Server field of aggregation used to draw the chart, retrieve from Aggregation


identifier

● identifier: string

Inherited from Contributor.identifier

Defined in /docs/node_modules/arlas-web-core/models/contributor.d.ts:6


intervalListSelection

● intervalListSelection: SelectedOutputValues[] = []

Defined in contributors/HistogramContributor.ts:57

New selections need to be draw on the histogram (could be set to input(): intervalSelection of HistogramComponent


intervalSelection

● intervalSelection: SelectedOutputValues

Defined in contributors/HistogramContributor.ts:52

New selection current need to be draw on the histogram (could be set to input(): intervalSelection of HistogramComponent


<Protected>``<Optional> isOneDimension

● isOneDimension: boolean

Defined in contributors/HistogramContributor.ts:114


<Protected> maxValue

● maxValue: number = 0

Defined in contributors/HistogramContributor.ts:100

Max value of all bucketn use for oneDimension histogram palette


<Protected> nbBuckets

● nbBuckets: number = this.getConfigValue('numberOfBuckets')

Defined in contributors/HistogramContributor.ts:84

Number of buckets in the histogram. If not specified, the interval in the aggregagtion model is used instead.


range

● range: RangeResponse

Defined in contributors/HistogramContributor.ts:72

Histogram's range


<Protected> startValue

● startValue: string

Defined in contributors/HistogramContributor.ts:92

Start value of selection use to the display of filterDisplayName


timeLabel

● timeLabel: any

Defined in contributors/HistogramContributor.ts:104

Labels of the timelines


timeShortcuts

● timeShortcuts: Array<StringifiedTimeShortcut>

Defined in contributors/HistogramContributor.ts:62

List of all the predefined time shortcuts


timeShortcutsLabels

● timeShortcutsLabels: Array<string> = this.getConfigValue('timeShortcuts')

Defined in contributors/HistogramContributor.ts:67

List of shortcuts labels to fetch from the predefined time shortcuts list


Methods

computeData

computeData(aggResponse: AggregationResponse): Array<object>

Overrides Contributor.computeData

Defined in contributors/HistogramContributor.ts:193

Parameters:

Name Type
aggResponse AggregationResponse

Returns: Array<object>


fetchData

fetchData(collaborationEvent?: CollaborationEvent): Observable<AggregationResponse>

Overrides Contributor.fetchData

Defined in contributors/HistogramContributor.ts:184

Parameters:

Name Type
Optional collaborationEvent CollaborationEvent

Returns: Observable<AggregationResponse>


<Protected> fetchDataGivenFilter

fetchDataGivenFilter(identifier: string, additionalFilter?: Filter): Observable<AggregationResponse>

Defined in contributors/HistogramContributor.ts:230

Parameters:

Name Type
identifier string
Optional additionalFilter Filter

Returns: Observable<AggregationResponse>


getConfigValue

getConfigValue(key: string): any

Inherited from Contributor.getConfigValue

Defined in /docs/node_modules/arlas-web-core/models/contributor.d.ts:24

Parameters:

Name Type Description
key string a `key` defined in configuration.

Returns: any value of the key in configuration.


getFilterDisplayName

getFilterDisplayName(): string

Overrides Contributor.getFilterDisplayName

Defined in contributors/HistogramContributor.ts:134

Returns: string Pretty name of contribution based on startValue/endValue properties


getName

getName(): string

Inherited from Contributor.getName

Defined in /docs/node_modules/arlas-web-core/models/contributor.d.ts:28

Returns: string name of contributor set in configuration.


getPackageName

getPackageName(): string

Overrides Contributor.getPackageName

Defined in contributors/HistogramContributor.ts:150

Returns: string Package name for the configuration service.


getShortcutLabel

getShortcutLabel(intervalSelection: SelectedOutputValues, startValue: string, endValue: string): string

Defined in contributors/HistogramContributor.ts:165

Parameters:

Name Type
intervalSelection SelectedOutputValues
startValue string
endValue string

Returns: string


setData

setData(data: Array<object>): Array<object>

Overrides Contributor.setData

Defined in contributors/HistogramContributor.ts:207

Parameters:

Name Type
data Array<object>

Returns: Array<object>


setSelection

setSelection(data: Array<object>, collaboration: Collaboration): any

Overrides Contributor.setSelection

Defined in contributors/HistogramContributor.ts:219

Parameters:

Name Type
data Array<object>
collaboration Collaboration

Returns: any


valueChanged

valueChanged(values: SelectedOutputValues[]): void

Defined in contributors/HistogramContributor.ts:157

Set filter on value change, use in output of component

Parameters:

Name Type
values SelectedOutputValues[]

Returns: void


<Static> getJsonSchema

getJsonSchema(): Object

Defined in contributors/HistogramContributor.ts:127

Returns: Object