API

Form parameter configuration

const s2Options = { 
  width: 600, 
  height: 400, 
  hierarchyType: 'grid' 
} 
parametertyperequiredDefaultsFunctional description
widthnumber600table width
heightnumber480form height
debugbooleanfalseWhether to enable debug mode
hierarchyTypegrid | tree | customTreegridThe display method of line headers, grid: tiled grid structure, tree: tree structure. customTree: custom tree structure
conditionsConditionsConditional Mode Configuration
totalsTotalsSubtotal Total Configuration
tooltipTooltipstooltip configuration
interactionInteractionForm interaction configuration
paginationPaginationpaging configuration
frozenFrozenColumn Header Freezing Configuration
seriesNumberSeriesNumberWhether to display the series number
showDefaultHeaderActionIconbooleantrueWhether to display the default row and column header operation icons
headerActionIconsHeaderActionIcon[]falseCustomize row and column header action icons (need to set showDefaultHeaderActionIcon to false )
customSVGIconsCustomSVGIcon[]falseCustom svg icons
stylestyleCell style settings, such as layout type, width and height, margin, whether to hide the value column header, etc.
hdbooleantrueWhether to enable high-definition screen adaptation to solve the problem of blurred font rendering on high-definition retina screens when switching between multiple screens. see more
mergedCellsInfoMergedCellInfo[][]Merge cell information
placeholderstring | (meta: Record<string, any>) => stringfill content for empty cells
cornerTextstringCustom corner header text (valid when custom tree hierarchyType: customTree )
cornerExtraFieldTextstringCustomize the text of the virtual value field of the corner header (valid when the value is linked to the line header, replace the two words "value")
dataCellDataCellCallbackcustom cell
cornerCellCell CallbackCustom cornerCell
rowCellCell CallbackCustom header cell
colCellCell CallbackCustom column header cell
cornerHeaderCornerHeaderCallbackcustom angle head
layout HierarchyLayout Hierarchycustom hierarchy
layoutArrangeLayoutArrangecustom sort order
layoutCoordinatelayoutCoordinatecustom coordinates
layoutDataPositionlayoutDataPositioncustom data
filterDisplayDataItemFilterDataItemCallbackfilter data
mappingDisplayDataItemMappingDataItemCallbackConvert data for tooltip display
dataSetDataSetcustom data set
supportsCSSTransformbooleanfalseAfter enabling it, CSS transform is supported, which solves the problem that the mouse coordinates respond incorrectly after the parent element is set to transform
devicePixelRationumberwindow.devicePixelRatioCustom Device Pixel Ratio
SeriesNumber

Function description: SeriesNumber configuration

parameterillustratetypeDefaultsrequired
enableWhether to display the series numberbooleanfalse
textcustom series number header cell textstring-
Frozen
Interaction
Conditions
Totals
Total
CalcTotals
Tooltips
TooltipShowOptions
Pagination
style
DataCellCallback
ViewMeta
Cell Callback
CornerHeaderCallback
Layout Hierarchy
LayoutArrange
LayoutCoordinate
LayoutCellMeta
HeaderActionIcon
HeaderActionIconProps
CustomSVGIcon
DataItem
LayoutResult
DataSet
MergedCellInfo