API

Interaction
parameterillustratetypeDefaultsrequired
linkFieldsThe mark field is a link style, which is used for external link jumpsstring[] | (meta: Node | ViewMeta) => boolean
selectedCellsSpotlightWhether to enable the selected highlight spotlight effectbooleanfalse
hoverHighlightHighlight the current cell, and the corresponding row and column headers when the mouse hoversbooleantrue
hoverFocusAfter the mouse hovers over the current cell for more than the default 800ms, it will keep the current highlight and display the tooltip. The hovering time is controlled by setting the duration`boolean\{duration: number}`true
hiddenColumnFieldsIt is used to configure the columns that are hidden by default. The pivot table needs to configure the unique id of the column header, and the detail table can be configured with the field field of the column header.string[]
enableCopyWhether to allow copyingbooleanfalse
withHeaderWhether to copy data with header informationbooleanfalse
withFormatWhether to use the field format format to copybooleanfalse
customInteractionsCustomize interaction detailsCustomInteraction[]
scrollSpeedRatioUsed to control the scroll rate, divided into horizontal and vertical directions, the default is 1ScrollSpeedRatio
autoResetSheetStyleUsed to control whether to reset the interactive state when clicking the area outside the table and pressing the esc keybooleantrue
resizeUsed to control whether the resize hotspot is displayedboolean \ResizeInteractionOptionstrue
brushSelectionWhether to allow cells (including row headers, column headers, and value cells) to be selected. Row header, column header selection only supports pivot tablesboolean \Brush Selectiontrue
multiSelectionWhether to allow multiple selection (including row headers, column headers, and value cells)booleantrue
rangeSelectionWhether to allow quick multiple selection of intervalsbooleantrue
scrollbarPositionUsed to control whether the scroll bar is displayed on the edge of the content area or the edge of the canvas`content\canvas`content
eventListenerOptionsOptional configuration of the event listening function addEventListener , which can control whether the event is triggered from the bubbling phase or the capturing phasefalse
selectedCellHighlightHighlight behavior after grid is selected
rowHeader: Whether to highlight the row header where the selected grid is located
colHeader: Whether to highlight the column header where the selected grid is located
currentRow: Whether to highlight the row where the grid is located
currentCol: whether to highlight the column where the grid is located
true: Same as {rowHeader: true, colHeader: true}
`boolean{ rowHeader?: boolean, colHeader?: boolean, currentRow?: boolean, currentCol?: boolean }`
overscrollBehaviorControls the behavior of scrolling to bounds, which disables the browser's default scrolling behavior. detailsauto | contain | none | nullauto

CustomInteraction

Function description: custom interaction, inherit baseEvent: concrete example

parameterillustratetypeDefaultsrequired
keyunique identifier for the interactionstring✓
interactionInteraction Constructor✓

ScrollSpeedRatio

interface ScrollSpeedRatio { 
  horizontal?: number; // 水平滚动速率,默认为 1 
  vertical?: number; // 垂直滚动速率,默认为 1 
} 

ResizeInteractionOptions

parameterillustratetypeDefaultsrequired
rowCellVerticalWhether to open the line header vertical resize hot zonebooleantrue
cornerCellHorizontalWhether to enable the resize hotspot in the horizontal direction of the corner headbooleantrue
colCellHorizontalWhether to enable the horizontal resize hotspot of the column headerbooleantrue
colCellVerticalWhether to enable the column header vertical resize hot zone (this configuration is invalid when the column header is hidden)booleantrue
rowResizeTypeIt is used to control whether the row height resize will take effect for all Cells at the same time, or only for the current row. Applies to all rows by defaultall | currentall
disableIt is used to control whether the row height resize is effective or not. View example(resizeInfo: S2CellType ) => boolean
visibleCustomize whether the current cell displays the resize hotspot(cell: S2CellType ) => boolean

brushSelection

parameterillustratetypeDefaultsrequired
dataCellWhether to allow numerical cell selectionbooleantrue
rowCellWhether to allow row header cell selection (only supports pivot tables)booleanfalse
colCellWhether to allow column header cell selection (only supports pivot tables)booleanfalse