BaseCell
Previous
Store
Next
BaseDataSet
Loading...
Function description: cell base class. details
cell.getActualText()
parameter | illustrate | type |
---|---|---|
getMeta | Get cell metadata | () => ViewMeta |
setMeta | Set cell metadata | (vieMeta: ViewMeta ) => void |
getIconStyle | Get cell icon style | () => IconTheme |
getStyle | get cell style | () => DefaultCellTheme |
getTextAndIconPosition | Get the position of cell text and icon | (iconCount: number ) => TextAndIconPosition |
getActualText | get the drawn text | () => string |
cellType | cell type | CellType |
initCell | Initialize cells | () => void |
update | update cell | () => void |
getTextStyle | get text style | () => void |
getFormattedFieldValue | Get the formatted field value | () => { formattedValue: string, value: string } |
getMaxTextWidth | Get the maximum width of the text | () => number |
getTextPosition | get text coordinates | point |
getContentArea | get content area | () => { x: number, y: number, width: number, height: number } |
updateByState | Update cell styles based on state | (stateName: InteractionStateName, cell: S2CellType) => void |
hideInteractionShape | Interactive layers for hidden cells | () => void |
clearUnselectedState | clear unchecked | () => void |
getTextShape | get text layer | () => IShape |
getTextShapes | Get all text layers | () => IShape[] |
addTextShape | Add a text layer | (shape: IShape) => void |
getConditionIconShape | Get the icon layer | () => GuiIcon |
getConditionIconShapes | Get all icon layers | () => GuiIcon[] |
addConditionIconShape | Add icon layer | (shape: GuiIcon) => void |
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 |
interface Point {x: number,y: number}
interface TextAndIconPosition {text: Pointicon: Point}
export enum CellType {DATA_CELL = 'dataCell',ROW_CELL = 'rowCell',COL_CELL = 'colCell',CORNER_CELL = 'cornerCell',MERGED_CELL = 'mergedCell',}
import type { SimpleBBox } from '@antv/g-canvas';export type S2CellType<T extends SimpleBBox = ViewMeta> =| DataCell| HeaderCell| ColCell| CornerCell| RowCell| MergedCell| BaseCell<T>;