gooddata-js v13.5.0

DataLayer Class

Module: DataLayer

Data layer

Show:

appendFilters

(
  • afm
  • attributeFilters
  • dateFilter
  • measureValueFilters
)
AFM.IAfm

Append attribute filters and date filter to afm

Date filter handling: - Override if date filter has the same id - Add if date filter if date filter id is different

Attribute filter handling: - Add all

Parameters

  • afm AFM.IAfm
  • attributeFilters AFM.AttributeFilterItem
  • dateFilter AFM.DateFilterItem
  • measureValueFilters AFM.IMeasureValueFilter

Returns

AFM.IAfm:

applySorting

(
  • resultSpec
  • sortItems
)
AFM.IResultSpec

Attaches sorts into resultSpec

Parameters

  • resultSpec AFM.IResultSpec
  • sortItems AFM.SortItem

Returns

AFM.IResultSpec:

createSubject

(
  • successHandler
  • errorHandler
)
ISubject>

Creates infinite stream Usage: const subject = createSubject( (result) => console.log('Success:', result), (error) => console.error('Error:', error) ); subject.next(promise1); subject.next(promise2);

subject.unsubscribe();

Parameters

  • successHandler StreamSuccessHandler
  • errorHandler StreamErrorHandler

Returns

ISubject>:

dateFiltersDataSetsMatch

(
  • f1
  • f2
)
AFM.ObjQualifier | null | boolean

Returns true if dateFilters dataSets match

Parameters

  • f1 AFM.DateFilterItem
  • f2 AFM.DateFilterItem

Returns

AFM.ObjQualifier | null | boolean:

getDateFilterDateDataSet

(
  • filter
)
AFM.ObjQualifier | null

Returns date filter date dataset

Parameters

  • filter AFM.DateFilterItem

Returns

AFM.ObjQualifier | null:

getGlobalDateFilters

(
  • normalizedAfm
)
AFM.DateFilterItem

Returns global date filters

Parameters

  • normalizedAfm INormalizedAFM

Returns

AFM.DateFilterItem:

getId

(
  • obj
)
String | Null

Return uri or identifier from ObjQualifier

Parameters

  • obj AFM.ObjQualifier

Returns

String | Null:

getMeasureDateFilters

(
  • normalizedAfm
)
AFM.DateFilterItem

Return date filters from AFM

Parameters

  • normalizedAfm AFM.IAfm

Returns

AFM.DateFilterItem:

hasFilters

(
  • measure
)
Boolean

Returns true if measure has filters

Parameters

  • measure AFM.ISimpleMeasure

Returns

Boolean:

hasGlobalDateFilter

(
  • afm
)
Boolean

Return true if AFM has global date filter

Parameters

  • afm INormalizedAFM

Returns

Boolean:

hasMetricDateFilters

(
  • normalizedAfm
)
Boolean

Returns true if measure has dateFilters

Parameters

  • normalizedAfm INormalizedAFM

Returns

Boolean:

isAfmExecutable

(
  • afm
)
Boolean

Returns true if AFM is executable

Parameters

  • afm AFM.IAfm

Returns

Boolean:

isArithmeticMeasure

(
  • item
)
Boolean

Returns true if measure is arithmetic measure

Parameters

  • item AFM.IMeasure

Returns

Boolean:

isAttributeFilter

(
  • filter
)
Boolean deprecated

Defined in src/DataLayer/utils/AfmUtils.ts:119

Deprecated: use AFM.isAttributeFilter instead

Returns true if filter is attributeFilter

Parameters

  • filter AFM.FilterItem

Returns

Boolean:

isAttributeFilterSelectAll

(
  • filter
)
Boolean

Returns true if filter is negative attribute filter and has no selected elements, meaning that this is "Select all"

Parameters

  • filter AFM.FilterItem

Returns

Boolean:

isDateFilter

(
  • filter
)
Boolean deprecated

Defined in src/DataLayer/utils/AfmUtils.ts:131

Deprecated: use AFM.isDateFilter instead

Returns true if filter is dateFilter

Parameters

  • filter AFM.CompatibilityFilter

Returns

Boolean:

isPoP

(
  • item
)
Boolean

Returns true if measure is PeriodOverPeriod

Parameters

  • item AFM.IMeasure

Returns

Boolean:

isPreviousPeriodMeasure

(
  • item
)
Boolean

Returns true if measure is previous period measure

Parameters

  • item AFM.IMeasure

Returns

Boolean:

isSimpleMeasure

(
  • item
)
Boolean

Returns true if measure is a simple measure

Parameters

  • item AFM.IMeasure

Returns

Boolean:

isSortValid

(
  • afm
  • sortItem
)
Boolean

Returns true if sortItem fits to afm

Parameters

  • afm AFM.IAfm
  • sortItem AFM.SortItem

Returns

Boolean:

normalizeAfm

(
  • afm
)
INormalizedAFM

Normalize AFM

Parameters

  • afm AFM.IAfm

Returns

INormalizedAFM:

toAfmResultSpec

(
  • visObj
)
IConvertedAFM

Converts visualizationObject to afm and resultSpec

Parameters

  • visObj VisualizationObject.IVisualizationObjectContent

Returns

IConvertedAFM:

unwrapArithmeticMeasure

(
  • item
)
AFM.IArithmeticMeasure

Unwraps arithmeticMeasure object

Parameters

  • item AFM.IMeasure

Returns

AFM.IArithmeticMeasure:

unwrapPoPMeasure

(
  • item
)
AFM.IPopMeasure

Unwraps popMeasure object

Parameters

  • item AFM.IMeasure

Returns

AFM.IPopMeasure:

unwrapPreviousPeriodMeasure

(
  • item
)
AFM.IPreviousPeriodMeasure

Unwraps previousPeriodMeasure object

Parameters

  • item AFM.IMeasure

Returns

AFM.IPreviousPeriodMeasure:

unwrapSimpleMeasure

(
  • item
)
AFM.ISimpleMeasure

Unwraps measure object

Parameters

  • item AFM.IMeasure

Returns

AFM.ISimpleMeasure: