@univerjs-proengine-pivotfunctionsClonelabelfieldtovaluefield

@univerjs-pro/engine-pivot v0.5.0-beta.1Docs


Function: cloneLabelFieldToValueField()

function cloneLabelFieldToValueField(labelField, keepUnknown?): PivotTableValueField

Clone the label field to a value field.

Parameters

ParameterTypeDefault valueDescription
labelFieldPivotTableLabelFieldundefinedThe label field to be cloned.
keepUnknown?booleantrueWhether to keep the unknown property of the label field. the default value is true.

Returns

PivotTableValueField

  • the value field may has sortInfo and filterInfo in the property lossLessProperty.

Defined in

pivot/table-field.ts:271