@univerjs-pro/engine-pivot v0.5.4


Class: PivotTuple

Defined in: summary/pivot-tuple.ts:13

PivotTuple

Description

use Welford algorithm calc subtotal https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance

Constructors

new PivotTuple()

new PivotTuple(): PivotTuple

Defined in: summary/pivot-tuple.ts:21

Returns

PivotTuple

Methods

addValue()

addValue(value): void

Defined in: summary/pivot-tuple.ts:46

Parameters

ParameterType
valueIDataFieldValue

Returns

void


getInfo()

getInfo(): ITPivotTupleInfo

Defined in: summary/pivot-tuple.ts:24

Returns

ITPivotTupleInfo


getSubtotal()

getSubtotal(subtotalType): 
  | number
  | {
  errorType: PivotErrorTypeEnum;
}

Defined in: summary/pivot-tuple.ts:81

Parameters

ParameterType
subtotalTypePivotSubtotalTypeEnum

Returns

| number | { errorType: PivotErrorTypeEnum; }


reset()

reset(): void

Defined in: summary/pivot-tuple.ts:36

Returns

void


unionTupleInfo()

unionTupleInfo(tupleInfo): void

Defined in: summary/pivot-tuple.ts:71

Parameters

ParameterType
tupleInfoITPivotTupleInfo

Returns

void


unionTuples()

unionTuples(tuples): void

Defined in: summary/pivot-tuple.ts:59

Parameters

ParameterType
tuplesPivotTuple[]

Returns

void