API

React Dimension Toggle Component

Switcher Component Props

AttributesillustratetypeDefaultsrequired
rowsHeader configuration descriptionSwitcherField
columnsColumn Header Configuration DescriptionSwitcherField
valuesIndicator configuration descriptionSwitcherField
disabledWhether to disablebooleanfalse
titleOpen the trigger node of the toggle popup windowReactNode
contentTitleTextPopup window default title textstringRow and column switching
resetTextreset button textstringreset
innerContentClassNamePopup box content style namestring
allowExchangeHeaderWhether to allow indicators to switch between row and column dimensionsbooleantrue
onSubmitAfter the popup window is closed, the callback function for processing the row and column switching result(result: SwitcherResult ) => void
popoverPopup window configuration, transparently passed to the antd component of PopoverPopoverProps

SwitcherField

Row and column headers and index value configuration description objects

AttributesillustratetypeDefaultsrequired
itemsConfigure field objectsSwitcherItem []-✓
expandableWhether to open the checkbox for expanding subitems is used to control the expansion and hiding of subitemsbooleanfalse
expandTextExpand the text corresponding to the checkbox of the subitemstring展开子项
selectableWhether to open the checkbox of the field to control the display and hidingbooleanfalse
allowEmptyWhether the current dimension can drag out all sub-itemsbooleantrue

SwitcherItem

Configure field objects

AttributesillustratetypeDefaultsrequired
idfield idstring-✓
displayNameThe name of the field is displayed, and the id is displayed directly when the field does not existstring-
checkedWhether the field needs to be displayedbooleantrue
childrenIf the field has associated sub-items (such as: same-ring ratio), use this property to configure the sub-itemsSwitcherItem [][]

SwitcherResult

After the popup window is closed, the parameter of the callback function that processes the row and column switching result

AttributesillustratetypeDefaultsrequired
rowsAll line header field operation resultsSwitcherResultItem
columnsAll column header field operation resultsSwitcherResultItem
valuesAll indicator field operation resultsSwitcherResultItem

SwitcherResultItem

After closing the pop-up window, the description object of each dimension result

AttributesillustratetypeDefaultsrequired
itemsA flattened collection of all fields, sorted in order after draggingSwitcherItem [][]
hideItemsAll collections that need to be flattened with hidden fields, sorted in order after draggingSwitcherItem [][]

SwitcherCfgProps

Built-in header component configuration parameters, essentially a subset of Switcher component Props

AttributesillustratetypeDefaultsrequired
sheetTypeForm type:
1. pivot : pivot table
2. table : detailed list
3. gridAnalysis : grid analysis table
4. strategy : trend analysis table
`pivottablegridAnalysis
titleOpen the trigger node of the toggle popup windowReactNode
contentTitleTextPopup window default title textstringRow and column switching
resetTextreset button textstringreset
innerContentClassNamePopup box content style namestring
popoverPopup window configuration, transparently passed to the antd component of PopoverPopoverProps
disabledWhether to disablebooleanfalse
Vue Dimension Toggle Component