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

Store

Previous
Interaction
Next
BaseCell

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: store some information. details

s2.store.get('key') // 获取
s2.store.set('key', value) // 存储
parameterillustratetype
scrollXhorizontal scroll offsetnumber
scrollYvertical scroll offsetnumber
rowHeaderScrollXvertical header scroll offsetnumber
sortParamColumn header sorting configurationSortParam
drillDownIdPathMapDrill down node id and corresponding generated path addressing pathMap<string, number[][]>
drillDownNodecurrent drill-down nodenode
drillItemsNumControl the number of drill-down datanumber
interactionStateInfoCurrent Interaction Status Informationnumber
drillDownFieldInLevelDrill down to node level informationPartDrillDownInfo[]
originalDataCfgRaw Data ConfigurationS2DataConfig
panelBBoxVisual area wrapping box modelBBox
activeResizeAreacurrent resizing region groupGroup
valueRangesconditional format value rangeValueRanges
initColLeafNodesThe column header leaf node when it is first renderedNode[]
hiddenColumnsDetailHidden column header detailsHiddenColumnsInfo[]
lastRenderedColumnFieldsThe column header configuration of the last renderstring[]
resizedWhether to manually adjust the width and heightboolean
visibleActionIconsThe icon cache displayed by hoverGuiIcon[]
lastClickedCelllast clicked cellS2CellType<ViewMeta>
initOverscrollBehaviorinitial scroll chain state'auto' | 'none' | 'contain'
sortMethodMapsort byRecord<string, SortMethod>
[key: string]Any other fieldunknown

HiddenColumnsInfo

interface HiddenColumnsInfo {
// 当前显示的兄弟节点之前所隐藏的节点
hideColumnNodes: Node[];
// 当前隐藏列所对应展示展开按钮的兄弟节点
displaySiblingNode: Node;
}

PartDrillDownInfo

interface PartDrillDownInfo {
// 下钻数据
drillData: RawData[];
// 下钻字段
drillField: string;
}

ValueRanges

export interface ValueRange {
minValue?: number;
maxValue?: number;
}
export type ValueRanges = Record<string, ValueRange>;

ViewMeta

object is required, default: {} function description: information such as cell data and position

parametertyperequiredDefaultsFunctional description
spreadsheetSpreadSheetTable class instance, which can access any configuration information
idstringcell unique identifier
xnumbercell x-coordinate
the ynumbercell y coordinate
widthnumbercell width
heightnumbercell height
dataRecord<string, any>Cell Raw Data Metrics
rowIndexnumberThe index of the cell in the row leaf node
colIndexnumberThe index of the cell in the column leaf node
valueFieldstringmetric-id
fieldValueDataItemThe true value of the metric display
isTotalsbooleanWhether it is a total: true is a total, false is a subtotal
rowQueryRecord<string, any>Row query condition
colQueryRecord<string, any>Column query condition
rowIdstringthe row id of the cell
colIdstringthe column id of the cell