UNPKG

@antv/s2

Version:

effective spreadsheet render core lib

17 lines 891 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CustomGridPivotDataSet = void 0; const common_1 = require("../common"); const pivot_data_set_1 = require("./pivot-data-set"); class CustomGridPivotDataSet extends pivot_data_set_1.PivotDataSet { processDataCfg(dataCfg) { const valueInCols = !this.spreadsheet.isCustomRowFields(); const originalRows = dataCfg.fields.rows || []; const rows = valueInCols ? originalRows : [...originalRows, common_1.EXTRA_FIELD]; const meta = this.processMeta(dataCfg.meta, (0, common_1.i18n)('数值')); return Object.assign(Object.assign({}, dataCfg), { meta, fields: Object.assign(Object.assign({}, dataCfg.fields), { rows, valueInCols }) }); } } exports.CustomGridPivotDataSet = CustomGridPivotDataSet; //# sourceMappingURL=custom-grid-pivot-data-set.js.map