@univerjs-proengine-pivotfunctionsClonevaluefieldtolabelfield

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


Function: cloneValueFieldToLabelField()

function cloneValueFieldToLabelField(valueField, keepUnknown?): PivotTableLabelField

Clone the value field to a label field.

Parameters

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

Returns

PivotTableLabelField

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

Defined in

pivot/table-field.ts:307