Store
Previous
Interaction
Next
BaseCell
Loading...
Function description: store some information. details
s2.store.get('key') // 获取s2.store.set('key', value) // 存储
| parameter | illustrate | type |
|---|---|---|
| scrollX | horizontal scroll offset | number |
| scrollY | vertical scroll offset | number |
| rowHeaderScrollX | vertical header scroll offset | number |
| sortParam | Column header sorting configuration | SortParam |
| drillDownIdPathMap | Drill down node id and corresponding generated path addressing path | Map<string, number[][]> |
| drillDownNode | current drill-down node | node |
| drillItemsNum | Control the number of drill-down data | number |
| interactionStateInfo | Current Interaction Status Information | number |
| drillDownFieldInLevel | Drill down to node level information | PartDrillDownInfo[] |
| originalDataCfg | Raw Data Configuration | S2DataConfig |
| panelBBox | Visual area wrapping box model | BBox |
| activeResizeArea | current resizing region group | Group |
| valueRanges | conditional format value range | ValueRanges |
| initColLeafNodes | The column header leaf node when it is first rendered | Node[] |
| hiddenColumnsDetail | Hidden column header details | HiddenColumnsInfo[] |
| lastRenderedColumnFields | The column header configuration of the last render | string[] |
| resized | Whether to manually adjust the width and height | boolean |
| visibleActionIcons | The icon cache displayed by hover | GuiIcon[] |
| lastClickedCell | last clicked cell | S2CellType<ViewMeta> |
| initOverscrollBehavior | initial scroll chain state | 'auto' | 'none' | 'contain' |
| sortMethodMap | sort by | Record<string, SortMethod> |
| [key: string] | Any other field | unknown |
interface HiddenColumnsInfo {// 当前显示的兄弟节点之前所隐藏的节点hideColumnNodes: Node[];// 当前隐藏列所对应展示展开按钮的兄弟节点displaySiblingNode: Node;}
interface PartDrillDownInfo {// 下钻数据drillData: RawData[];// 下钻字段drillField: string;}
export interface ValueRange {minValue?: number;maxValue?: number;}export type ValueRanges = Record<string, ValueRange>;
object is required, default: {} function description: information such as cell data and position
| parameter | type | required | Defaults | Functional description |
|---|---|---|---|---|
| spreadsheet | SpreadSheet | Table class instance, which can access any configuration information | ||
| id | string | cell unique identifier | ||
| x | number | cell x-coordinate | ||
| the y | number | cell y coordinate | ||
| width | number | cell width | ||
| height | number | cell height | ||
| data | Record<string, any> | Cell Raw Data Metrics | ||
| rowIndex | number | The index of the cell in the row leaf node | ||
| colIndex | number | The index of the cell in the column leaf node | ||
| valueField | string | metric-id | ||
| fieldValue | DataItem | The true value of the metric display | ||
| isTotals | boolean | Whether it is a total: true is a total, false is a subtotal | ||
| rowQuery | Record<string, any> | Row query condition | ||
| colQuery | Record<string, any> | Column query condition | ||
| rowId | string | the row id of the cell | ||
| colId | string | the column id of the cell |