arlas-web-contributors / Exports / 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

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new HistogramContributor(identifier, collaborativeSearcheService, configService, collection, isOneDimension?, additionalCollections?)

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.
collection string -
isOneDimension? boolean -
additionalCollections? { collectionName: string ; field: string }[] -

Overrides

Contributor.constructor

Defined in

src/contributors/HistogramContributor.ts:127

Properties

additionalCollections

Optional additionalCollections: { collectionName: string ; field: string }[]


aggregations

Protected aggregations: Aggregation[]

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

Defined in

src/contributors/HistogramContributor.ts:85


cacheDuration

Protected cacheDuration: number

Inherited from

Contributor.cacheDuration

Defined in

node_modules/arlas-web-core/models/contributor.d.ts:17


chartData

chartData: { chartId?: string ; key: number ; value: number }[]

New data need to be draw on the histogram (could be set to

input() data of HistogramComponent

Defined in

src/contributors/HistogramContributor.ts:48


chartDataEvent

chartDataEvent: Subject<{ chartId?: string ; key: number ; value: number }[]>

Defined in

src/contributors/HistogramContributor.ts:51


collaborativeSearcheService

collaborativeSearcheService: CollaborativesearchService

Inherited from

Contributor.collaborativeSearcheService

Defined in

node_modules/arlas-web-core/models/contributor.d.ts:9


collection

collection: string

Inherited from

Contributor.collection

Defined in

node_modules/arlas-web-core/models/contributor.d.ts:14


collections

collections: CollectionAggField[]

Inherited from

Contributor.collections

Defined in

node_modules/arlas-web-core/models/contributor.d.ts:15


configService

configService: ConfigService

Inherited from

Contributor.configService

Defined in

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


endCollaborationEvent

endCollaborationEvent: Subject<unknown>

Inherited from

Contributor.endCollaborationEvent

Defined in

node_modules/arlas-web-core/models/contributor.d.ts:16


endValue

Protected endValue: string

End value of selection use to the display of filterDisplayName

Defined in

src/contributors/HistogramContributor.ts:105


field

Protected field: string

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

Defined in

src/contributors/HistogramContributor.ts:97


identifier

identifier: string

Inherited from

Contributor.identifier

Defined in

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


intervalListSelection

intervalListSelection: SelectedOutputValues[] = []

New selections need to be draw on the histogram (could be set to

input() intervalSelection of HistogramComponent

Defined in

src/contributors/HistogramContributor.ts:61


intervalSelection

intervalSelection: SelectedOutputValues

New selection current need to be draw on the histogram (could be set to

input() intervalSelection of HistogramComponent

Defined in

src/contributors/HistogramContributor.ts:56


isDataUpdating

isDataUpdating: boolean

Inherited from

Contributor.isDataUpdating

Defined in

node_modules/arlas-web-core/models/contributor.d.ts:13


isOneDimension

Protected Optional isOneDimension: boolean


json_path

Protected json_path: string

Json path to explore element aggregation, count by default

Defined in

src/contributors/HistogramContributor.ts:89


maxBuckets

maxBuckets: number = 200

to be set in the toolkit when creating the contributor

Defined in

src/contributors/HistogramContributor.ts:120


maxValue

Protected maxValue: number = 0

Max value of all bucketn use for oneDimension histogram palette

Defined in

src/contributors/HistogramContributor.ts:109


nbBuckets

Protected nbBuckets: number

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

Defined in

src/contributors/HistogramContributor.ts:93


range

range: number

Histogram's range

Defined in

src/contributors/HistogramContributor.ts:81


startValue

Protected startValue: string

Start value of selection use to the display of filterDisplayName

Defined in

src/contributors/HistogramContributor.ts:101


timeLabel

timeLabel: any

Labels of the timelines

Defined in

src/contributors/HistogramContributor.ts:113


timeShortcuts

timeShortcuts: StringifiedTimeShortcut[]

List of all the predefined time shortcuts

Defined in

src/contributors/HistogramContributor.ts:66


timeShortcutsLabels

timeShortcutsLabels: string[]

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

Defined in

src/contributors/HistogramContributor.ts:71


useUtc

useUtc: any

Wether use UTC for display time

Defined in

src/contributors/HistogramContributor.ts:117


yearShortcutsLabels

yearShortcutsLabels: string[]

List of years shortcuts labels

Defined in

src/contributors/HistogramContributor.ts:76

Accessors

updateData

get updateData(): boolean

Returns

boolean

whether the data of contributor should be updated.

Inherited from

Contributor.updateData

Defined in

node_modules/arlas-web-core/models/contributor.d.ts:43

set updateData(value): void

Parameters

Name Type Description
value boolean set if the data of contributor should be updated or not.

Returns

void

whether the data of contributor should be updated.

Inherited from

Contributor.updateData

Defined in

node_modules/arlas-web-core/models/contributor.d.ts:47

Methods

computeData

computeData(aggResponses): { chartId: string ; key: number ; value: number }[]

Parameters

Name Type
aggResponses AggregationResponse[]

Returns

{ chartId: string ; key: number ; value: number }[]

Overrides

Contributor.computeData

Defined in

src/contributors/HistogramContributor.ts:296


fetchData

fetchData(collaborationEvent?): Observable<AggregationResponse[]>

Parameters

Name Type
collaborationEvent? CollaborationEvent

Returns

Observable<AggregationResponse[]>

Overrides

Contributor.fetchData

Defined in

src/contributors/HistogramContributor.ts:279


fetchDataGivenFilter

Protected fetchDataGivenFilter(identifier, additionalFilters?): Observable<AggregationResponse[]>

Parameters

Name Type
identifier string
additionalFilters? Map<string, Filter>

Returns

Observable<AggregationResponse[]>

Defined in

src/contributors/HistogramContributor.ts:341


getAggregations

getAggregations(): Aggregation[]

Returns

Aggregation[]

Defined in

src/contributors/HistogramContributor.ts:173


getAllCollections

getAllCollections(): { collectionName: string ; field: string }[]

Returns

{ collectionName: string ; field: string }[]

Defined in

src/contributors/HistogramContributor.ts:289


getConfigValue

getConfigValue(key): any

Parameters

Name Type Description
key string a key defined in configuration.

Returns

any

value of the key in configuration.

Inherited from

Contributor.getConfigValue

Defined in

node_modules/arlas-web-core/models/contributor.d.ts:31


getField

getField(): string

Returns

string

Defined in

src/contributors/HistogramContributor.ts:161


getFilterDisplayName

getFilterDisplayName(): string

Returns

string

Pretty name of contribution based on startValue/endValue properties

Overrides

Contributor.getFilterDisplayName

Defined in

src/contributors/HistogramContributor.ts:210


getJsonPath

getJsonPath(): string

Returns

string

Defined in

src/contributors/HistogramContributor.ts:169


getName

getName(): string

Returns

string

name of contributor set in configuration.

Inherited from

Contributor.getName

Defined in

node_modules/arlas-web-core/models/contributor.d.ts:35


getNbBuckets

getNbBuckets(): number

Returns

number

Defined in

src/contributors/HistogramContributor.ts:153


getPackageName

getPackageName(): string

Returns

string

Package name for the configuration service.

Overrides

Contributor.getPackageName

Defined in

src/contributors/HistogramContributor.ts:226


getShortcutLabel

getShortcutLabel(intervalSelection, startValue, endValue): string

Parameters

Name Type
intervalSelection SelectedOutputValues
startValue string
endValue string

Returns

string

Defined in

src/contributors/HistogramContributor.ts:260


resolveHistogramAgg

Protected resolveHistogramAgg(identifier, aggregations, collaborations, additionalFilter, ac): Observable<AggregationResponse>

Parameters

Name Type
identifier string
aggregations Aggregation[]
collaborations Map<string, Collaboration>
additionalFilter Filter
ac CollectionAggField

Returns

Observable<AggregationResponse>

Defined in

src/contributors/HistogramContributor.ts:392


setAggregations

setAggregations(aggregations): void

Parameters

Name Type
aggregations Aggregation[]

Returns

void

Defined in

src/contributors/HistogramContributor.ts:199


setData

setData(data): { chartId?: string ; key: number ; value: number }[]

Parameters

Name Type
data { chartId?: string ; key: number ; value: number }[]

Returns

{ chartId?: string ; key: number ; value: number }[]

Overrides

Contributor.setData

Defined in

src/contributors/HistogramContributor.ts:313


setField

setField(field): void

Parameters

Name Type
field any

Returns

void

Defined in

src/contributors/HistogramContributor.ts:165


setName

setName(name): void

Parameters

Name Type
name string

Returns

void

set the name of the contributor

Inherited from

Contributor.setName

Defined in

node_modules/arlas-web-core/models/contributor.d.ts:39


setNbBuckets

setNbBuckets(nbBuckets): void

Parameters

Name Type
nbBuckets number

Returns

void

Defined in

src/contributors/HistogramContributor.ts:157


setSelection

setSelection(data, collaboration): any

Parameters

Name Type
data { chartId?: string ; key: number ; value: number }[]
collaboration Collaboration

Returns

any

Overrides

Contributor.setSelection

Defined in

src/contributors/HistogramContributor.ts:331


updateFromCollaboration

updateFromCollaboration(collaborationEvent): void

Parameters

Name Type
collaborationEvent CollaborationEvent

Returns

void

Inherited from

Contributor.updateFromCollaboration

Defined in

node_modules/arlas-web-core/models/contributor.d.ts:56


valueChanged

valueChanged(values, collections?): void

Triggers the collaboration of this contributor on the given intervals and for the given collections

Parameters

Name Type Description
values SelectedOutputValues[] List of selected intervals in the histogram
collections? CollectionAggField[] List of collections to declare in the collaboration. This list should be a subset of collections declared in this contributor.

Returns

void

Defined in

src/contributors/HistogramContributor.ts:236


getJsonSchema

Static getJsonSchema(): Object

Returns

Object

Defined in

src/contributors/HistogramContributor.ts:203