BaseDataSet
Previous
BaseCell
Next
Node
Loading...
Function description: tabular data set. details
s2.dataSet.getFieldName('type')
parameter | illustrate | type | Version |
---|---|---|---|
fields | field information | () => Fields | |
meta | Field meta information, including field name, formatting, etc. | () => Meta[] | |
originData | Raw data | () => DataType[] | |
totalData | summary data | () => DataType[] | |
indexesData | multidimensional index data | () => DataType[] | |
sortParams | sort configuration | () => SortParams | |
spreadsheet | Form example | () => SpreadSheet | |
getFieldMeta | Get field metadata information | (field: string, meta?: Meta[] ) => Meta | |
getFieldName | get field name | () => string | |
getFieldFormatter | Get the field formatting function | () => (v: string) => unknown | |
getFieldDescription | Get field description | () => string | |
setDataCfg | Set data configuration | <T extends boolean = false>(dataCfg: T extends true ? S2DataConfig : Partial< S2DataConfig >, reset?: T) => void | The reset parameter needs to be used in @antv/s2^1.34.0 version |
getDisplayDataSet | Get the currently displayed dataset | () => DataType[] | |
getDimensionValues | get dimension value | (filed: string, query?: DataType ) => string[] | |
getCellData | Get a single cell data | (params: CellDataParams ) => DataType[] | |
getMultiData | Get bulk cell data | (query: DataType,params?: MultiDataParams) => DataType[] | |
Get bulk cell data | (query: DataType , isTotals?: boolean, isRow?: boolean, drillDownFields?: string[], includeTotalData:boolean) => DataType[] | ||
moreThanOneValue | Is there more than 1 value | () => ViewMeta |
type DataType = Record<string, unknown>;
interface CellDataParams {// search queryquery: DataType;isTotals?: boolean;// use in part drill-downrowNode?: Node;// mark row's cellisRow?: boolean;}
interface MultiDataParams {drillDownFields?: string[]; // drill down dimensionsqueryType?: QueryDataType; // query type, get all data by default}enum QueryDataType {All = 'all', // get all data, include total dataDetailOnly = 'detailOnly', // only get detail data}