logo

S2

  • Manual
  • API
  • Examples
  • Playground
  • ChangeLog
  • Productsantv logo arrow
  • 2.x
  • Common Configuration
    • S2DataConfig
    • S2Options
      Updated
    • S2Theme
      Updated
    • S2Event
  • Basic Class
    • SpreadSheet
    • Interaction
      Updated
    • Store
    • BaseCell
      Updated
    • BaseDataSet
    • Node
    • BaseTooltip
    • BaseFacet
      Updated
    • Hierarchy
      New
    • BaseBBox
      New
    • CellData
      New
  • Components
    • table component
    • DrillDown
    • Switcher
    • Advanced Sort
    • Export
      Updated
  • Graphic style
  • 透视组合图拓展 S2Options

BaseFacet

Previous
BaseTooltip
Next
Hierarchy

Resources

Ant Design
Galacea Effects
Umi-React Application Framework
Dumi-Component doc generator
ahooks-React Hooks Library

Community

Ant Financial Experience Tech
seeconfSEE Conf-Experience Tech Conference

Help

GitHub
StackOverflow

more productsMore Productions

Ant DesignAnt Design-Enterprise UI design language
yuqueYuque-Knowledge creation and Sharing tool
EggEgg-Enterprise-class Node development framework
kitchenKitchen-Sketch Tool set
GalaceanGalacean-互动图形解决方案
xtechLiven Experience technology
© Copyright 2025 Ant Group Co., Ltd..备案号:京ICP备15032932号-38

Loading...

Function description: the current visible rendering area. details

s2.facet.getRealWidth()
parameterillustratetypeVersion
spreadsheetForm exampleSpreadSheet
cornerBBoxcorner bounding boxBBox
panelBBoxValue area bounding boxBBox
backgroundGroupbackground areaGroup
panelGroupNumeric fieldGroup
foregroundGroupforeground areaGroup
layoutResultlayout informationLayoutResult
viewCellWidthsCell width informationnumber[]
hScrollBarValue area horizontal scroll bar() => Group
hRowScrollBarLine header area horizontal scroll bar() => Group
vScrollBarValue area vertical scroll bar() => Group
rowHeaderOutfitBaseHeaderConfig
columnHeaderHeaderBaseHeaderConfig
cornerHeaderCorner headBaseHeaderConfig
seriesNumberHeaderserial numberBaseHeaderConfig
centerFrameframeGroup
gridInfogrid informationGridInfo
getViewCellHeightsGet cell height information( layoutResult : LayoutResult ) => ViewCellHeights
scrollBarThemescroll bar themeScrollBarTheme
scrollBarSizescroll bar sizenumber
hideScrollBarhide scrollbar() => void
delayHideScrollBarDelay to hide the scrollbar (after 1s)() => void
delayHideScrollbarOnMobileOn the mobile side, delay hiding the scrollbar (after 1s)() => void
showVerticalScrollBarshow vertical scrollbar() => void
showHorizontalScrollBarShow horizontal scroll bar() => void
renderrendering() => void
getSeriesNumberWidthGet the serial number width() => number
getContentHeightGet the height of the currently rendered area() => number
getPaginationScrollYx() => number
updateScrollOffsetscroll(offsetConfig: ScrollOffsetConfig ) => void
scrollWithAnimationScrolling (with easing animation)(offsetConfig: ScrollOffsetConfig , duration?: number, callback?: () => void) => void
scroll Immediatelyscrolling (no animation)(offsetConfig: ScrollOffsetConfig ) => void
destroyuninstall() => void
getScrollOffsetGet the current scroll offset() => ScrollOffset
setScrollOffsetSet the current scroll offset(scrollOffset: ScrollOffset ) => void
resetScrollOffsetReset the current scroll offset() => void
resetScrollXreset horizontal scroll offset() => void
resetScrollYreset vertical scroll offset() => void
resetRowScrollXReset row header horizontal scroll offset() => void
emitPaginationEventtrigger pagination event() => void
clipPanelGroupClipping value range Group() => void
getRealWidthGet the actual rendered width() => number
getRealHeightGet the actual rendered height() => number
clearAllGroupClear all groups() => void
isScrollOverThePanelAreaWhether to scroll in the value area(cellScrollOffset: CellScrollOffset ) => boolean
isScrollOverTheCornerAreaWhether to scroll in the corner header area(cellScrollOffset: CellScrollOffset ) => boolean
isScrollToLeftWhether to scroll to the left(cellScrollOffset: CellScrollOffset ) => boolean
isScrollToRightWhether to scroll to the far right(cellScrollOffset: CellScrollOffset ) => boolean
isScrollToTopDid you scroll to the top(deltaY: number) => boolean
isScrollToBottomDid you scroll to the bottom(deltaY: number) => boolean
isVerticalScrollOverTheViewportWhether to scroll vertically in the value cell area(deltaY: number) => boolean
isHorizontalScrollOverTheViewportWhether to scroll horizontally in the numeric cell area(scrollOffset: CellScrollOffset ) => boolean
isScrollOverTheViewportWhether to scroll in the value cell area(cellScrollOffset: CellScrollOffset ) => boolean
cancelScrollFrameCancel the current scroll frame() => void
clearScrollFrameIdOnMobileCancel the current scrolling frame (mobile terminal)() => void
addCelladd cell(cell: BaseCell ) => void
drawGriddraw grid() => void
getCanvasSizeGet canvas width and height{width: number, height: number}
backgroundGroupbackground color area groupGroup
foregroundGroupbackground color area groupGroup
panelGroupVisible range cell area groupGroup
panelScrollGroupVisible range cell scrolling area groupGroup
frozenRowGroupHeader freeze area groupGroup
frozenColGroupColumn header freeze area groupGroup
frozenTrailingRowGroupFreezing area group at the bottom of the row headerGroup
frozenTrailingColGroupFreeze area group at the bottom of the column headerGroup
frozenTopGrouptop freeze area groupGroup
frozenBottomGroupBottom freeze area groupGroup
getHiddenColumnsInfoMatch whether the current node is a hidden node, if so, return the hidden information of the node(node: Node ) => HiddenColumnsInfo | null1.34.1
getCornerNodesGet corner node() => Node []1.40.0

CellScrollOffset

export interface CellScrollOffset {
deltaX?: number;
deltaY?: number;
offset?: number;
offsetX: number;
offsetY: number;
}

LayoutResult

export interface LayoutResult {
colNodes: Node[];
colsHierarchy: Hierarchy;
rowNodes: Node[];
rowsHierarchy: Hierarchy;
rowLeafNodes: Node[];
colLeafNodes: Node[];
getCellMeta: GetCellMeta;
spreadsheet: SpreadSheet;
}

BaseHeaderConfig

export interface BaseHeaderConfig {
scrollX?: number;
scrollY?: number;
width: number;
height: number;
originalWidth?: number;
originalHeight?: number;
viewportWidth: number;
viewportHeight: number;
position: Point;
data: Node[];
spreadsheet: SpreadSheet;
sortParam?: SortParam;
}

GridInfo

export interface GridInfo {
cols: number[];
rows: number[];
}

ViewCellHeights

export interface ViewCellHeights {
getCellOffsetY: (index: number) => number;
getTotalHeight: () => number;
getTotalLength: () => number;
getIndexRange: (
minHeight: number,
maxHeight: number,
) => {
start: number;
end: number;
};
}

ScrollOffsetConfig

export interface ScrollOffsetConfig {
offsetX?: {
value: number | undefined;
animate?: boolean;
};
offsetY?: {
value: number | undefined;
animate?: boolean;
};
}

ScrollOffset

export interface ScrollOffset {
scrollX?: number;
scrollY?: number;
rowHeaderScrollX?: number;
}