@univerjs-pro/engine-pivot v0.5.4


Class: SummaryManager

Defined in: summary/summary-manager.ts:10

Constructors

new SummaryManager()

new SummaryManager(queryData, tupleGroup): SummaryManager

Defined in: summary/summary-manager.ts:57

Parameters

ParameterType
queryDataIPivotTableQueryData
tupleGroupTupleGroup

Returns

SummaryManager

Properties

PropertyTypeDefault valueDescriptionDefined in
_colLevelPoolIPivotSummaryLevelPool{}-summary/summary-manager.ts:45
_rowLevelPoolIPivotSummaryLevelPool{}-summary/summary-manager.ts:44
colDeepnumberundefined-summary/summary-manager.ts:17
colDimOrdernumber[]undefined-summary/summary-manager.ts:13
collapseInfoRecord<string, boolean | Record<string, boolean>>undefined-summary/summary-manager.ts:53
colNodeTreeNodeTreeundefined-summary/summary-manager.ts:47
colTableIdListstring[]undefined-summary/summary-manager.ts:15
combinePathMapRecord<string, Record<string, number>>{}fist Record key is combinePathMapsummary/summary-manager.ts:52
counternumberundefined-summary/summary-manager.ts:11
dimensionIdListstring[][]-summary/summary-manager.ts:33
dimensionMapRecord<string, IDimensionMapItem>{}-summary/summary-manager.ts:48
dimensionSortInfoRecord<string, { sortMap: Record<string, number>; type: PivotDataFieldSortOperatorEnum; }>{}-summary/summary-manager.ts:55
dimensionTableIdListstring[][]-summary/summary-manager.ts:37
leafCountnumberundefined-summary/summary-manager.ts:19
measureCountnumberundefined-summary/summary-manager.ts:18
measureIdListstring[][]-summary/summary-manager.ts:42
measuresMapRecord<string, IMeasuresMapItem>{}-summary/summary-manager.ts:20
rowDeepnumberundefined-summary/summary-manager.ts:16
rowDimOrdernumber[]undefined-summary/summary-manager.ts:12
rowNodeTreeNodeTreeundefined-summary/summary-manager.ts:46
rowTableIdListstring[]undefined-summary/summary-manager.ts:14
tupleMapRecord<string, number>{}-summary/summary-manager.ts:29
tuplesITupleItem[][]-summary/summary-manager.ts:25

Methods

_buildNodeTreeImp()

_buildNodeTreeImp(
   dimOrder, 
   tableIdList, 
   levelPool, 
   nodePathStr): NodeTree

Defined in: summary/summary-manager.ts:184

Parameters

ParameterType
dimOrdernumber[]
tableIdListstring[]
levelPoolIPivotSummaryLevelPool
nodePathStrstring

Returns

NodeTree


_calculateSubtotalImp()

_calculateSubtotalImp(levelPool): void

Defined in: summary/summary-manager.ts:359

Parameters

ParameterType
levelPoolIPivotSummaryLevelPool

Returns

void


buildNodeTree()

buildNodeTree(): void

Defined in: summary/summary-manager.ts:160

Returns

void


calculateListSubtotal()

calculateListSubtotal(tupleItem, indexes): void

Defined in: summary/summary-manager.ts:270

Parameters

ParameterType
tupleItemITupleItem
indexesnumber[]

Returns

void


calculateSubtotal()

calculateSubtotal(): void

Defined in: summary/summary-manager.ts:291

Returns

void


combinePathMapList()

combinePathMapList(colPathMapList, basePath): Record<string, number>

Defined in: summary/summary-manager.ts:239

Parameters

ParameterType
colPathMapListRecord<string, number>[]
basePathstring

Returns

Record<string, number>


createSummaryLabelSortedMap()

createSummaryLabelSortedMap(queryData): void

Defined in: summary/summary-manager.ts:118

Parameters

ParameterType
queryDataIPivotTableQueryData

Returns

void


createTuple()

createTuple(
   paths, 
   pathsStr?, 
   nodeIndex?): void

Defined in: summary/summary-manager.ts:335

  • create tuple if not exist

Parameters

ParameterTypeDescription
pathsstring[]the path of tuple
pathsStr?stringthe joined path string of tuple
nodeIndex?number-

Returns

void


createTupleWithoutCheck()

createTupleWithoutCheck(
   paths, 
   nodeIndex, 
   tupleKey): void

Defined in: summary/summary-manager.ts:169

Parameters

ParameterType
pathsstring[]
nodeIndexnumber
tupleKeystring

Returns

void


doSummary()

doSummary(): void

Defined in: summary/summary-manager.ts:151

Returns

void


ensureTupleItem()

ensureTupleItem(
   index, 
   paths, 
   tableIdList): void

Defined in: summary/summary-manager.ts:316

Parameters

ParameterType
indexnumber
pathsstring[]
tableIdListstring[]

Returns

void


ensureTupleItemByString()

ensureTupleItemByString(index, pathString): void

Defined in: summary/summary-manager.ts:323

Parameters

ParameterType
indexnumber
pathStringstring

Returns

void


getCellValue()

getCellValue(
   index, 
   id, 
   subtotal): 
  | undefined
  | number
  | {
  errorType: PivotErrorTypeEnum;
}

Defined in: summary/summary-manager.ts:129

Parameters

ParameterType
indexnumber
idstring
subtotalPivotSubtotalTypeEnum

Returns

| undefined | number | { errorType: PivotErrorTypeEnum; }


getPathKeyWithFiledId()

getPathKeyWithFiledId(paths, tableIdList): string

Defined in: summary/summary-manager.ts:307

Parameters

ParameterType
pathsstring[]
tableIdListstring[]

Returns

string


getSortedMap()

getSortedMap(tableFieldId, dataField): Record<string, number>

Defined in: summary/summary-manager.ts:136

Parameters

ParameterType
tableFieldIdstring
dataFieldDataField

Returns

Record<string, number>