@visactor/vtable 0.24.2-alpha.4 → 0.25.1-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/ListTable.js +5 -3
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.js +27 -25
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.js +89 -43
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +1 -0
- package/cjs/core/BaseTable.js +62 -16
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/TABLE_EVENT_TYPE.d.ts +3 -1
- package/cjs/core/TABLE_EVENT_TYPE.js +3 -0
- package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/cjs/dataset/dataset.d.ts +1 -0
- package/cjs/dataset/dataset.js +15 -1
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/dataset/flatDataToObject.d.ts +8 -3
- package/cjs/dataset/flatDataToObject.js +39 -8
- package/cjs/dataset/flatDataToObject.js.map +1 -1
- package/cjs/edit/edit-manager.js +0 -2
- package/cjs/edit/edit-manager.js.map +1 -1
- package/cjs/event/event.d.ts +2 -0
- package/cjs/event/event.js +12 -2
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/container-dom.js +5 -2
- package/cjs/event/listener/container-dom.js.map +1 -1
- package/cjs/event/listener/scroll-bar.js +8 -0
- package/cjs/event/listener/scroll-bar.js.map +1 -1
- package/cjs/event/listener/table-group.js +23 -8
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/chart-helper/get-axis-config.js +21 -13
- package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
- package/cjs/layout/chart-helper/get-chart-spec.js +15 -13
- package/cjs/layout/chart-helper/get-chart-spec.js.map +1 -1
- package/cjs/layout/pivot-header-layout.d.ts +1 -0
- package/cjs/layout/pivot-header-layout.js +16 -4
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/scenegraph/component/table-component.d.ts +8 -0
- package/cjs/scenegraph/component/table-component.js +180 -2
- package/cjs/scenegraph/component/table-component.js.map +1 -1
- package/cjs/scenegraph/component/util.d.ts +1 -0
- package/cjs/scenegraph/component/util.js +8 -2
- package/cjs/scenegraph/component/util.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +18 -9
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +5 -5
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.js +4 -2
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/layout/frozen.js +4 -2
- package/cjs/scenegraph/layout/frozen.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +7 -0
- package/cjs/scenegraph/scenegraph.js +42 -19
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/select/update-select-border.js +4 -4
- package/cjs/scenegraph/select/update-select-border.js.map +1 -1
- package/cjs/state/cell-move/index.js +2 -1
- package/cjs/state/cell-move/index.js.map +1 -1
- package/cjs/state/resize/update-resize-column.js +4 -3
- package/cjs/state/resize/update-resize-column.js.map +1 -1
- package/cjs/state/resize/update-resize-row.d.ts +2 -0
- package/cjs/state/resize/update-resize-row.js +63 -0
- package/cjs/state/resize/update-resize-row.js.map +1 -0
- package/cjs/state/state.d.ts +11 -1
- package/cjs/state/state.js +29 -4
- package/cjs/state/state.js.map +1 -1
- package/cjs/tools/global.d.ts +1 -0
- package/cjs/tools/global.js +2 -2
- package/cjs/tools/global.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +7 -0
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/events.d.ts +11 -0
- package/cjs/ts-types/events.js.map +1 -1
- package/cjs/ts-types/pivot-table/dimension/basic-dimension.d.ts +6 -1
- package/cjs/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/basic-indicator.d.ts +3 -0
- package/cjs/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +5 -0
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +990 -136
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.js +5 -3
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.js +27 -25
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.js +89 -43
- package/es/PivotTable.js.map +1 -1
- package/es/core/BaseTable.d.ts +1 -0
- package/es/core/BaseTable.js +62 -17
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/TABLE_EVENT_TYPE.d.ts +3 -1
- package/es/core/TABLE_EVENT_TYPE.js +3 -0
- package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/es/dataset/dataset.d.ts +1 -0
- package/es/dataset/dataset.js +15 -1
- package/es/dataset/dataset.js.map +1 -1
- package/es/dataset/flatDataToObject.d.ts +8 -3
- package/es/dataset/flatDataToObject.js +38 -8
- package/es/dataset/flatDataToObject.js.map +1 -1
- package/es/edit/edit-manager.js +0 -2
- package/es/edit/edit-manager.js.map +1 -1
- package/es/event/event.d.ts +2 -0
- package/es/event/event.js +12 -2
- package/es/event/event.js.map +1 -1
- package/es/event/listener/container-dom.js +5 -2
- package/es/event/listener/container-dom.js.map +1 -1
- package/es/event/listener/scroll-bar.js +8 -0
- package/es/event/listener/scroll-bar.js.map +1 -1
- package/es/event/listener/table-group.js +23 -8
- package/es/event/listener/table-group.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/layout/chart-helper/get-axis-config.js +21 -12
- package/es/layout/chart-helper/get-axis-config.js.map +1 -1
- package/es/layout/chart-helper/get-chart-spec.js +15 -13
- package/es/layout/chart-helper/get-chart-spec.js.map +1 -1
- package/es/layout/pivot-header-layout.d.ts +1 -0
- package/es/layout/pivot-header-layout.js +12 -2
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/scenegraph/component/table-component.d.ts +8 -0
- package/es/scenegraph/component/table-component.js +181 -3
- package/es/scenegraph/component/table-component.js.map +1 -1
- package/es/scenegraph/component/util.d.ts +1 -0
- package/es/scenegraph/component/util.js +7 -1
- package/es/scenegraph/component/util.js.map +1 -1
- package/es/scenegraph/graphic/contributions/group-contribution-render.js +18 -9
- package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +5 -4
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
- package/es/scenegraph/group-creater/progress/proxy.js +4 -2
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/layout/frozen.js +4 -2
- package/es/scenegraph/layout/frozen.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +7 -0
- package/es/scenegraph/scenegraph.js +44 -19
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/select/update-select-border.js +4 -4
- package/es/scenegraph/select/update-select-border.js.map +1 -1
- package/es/state/cell-move/index.js +2 -1
- package/es/state/cell-move/index.js.map +1 -1
- package/es/state/resize/update-resize-column.js +4 -3
- package/es/state/resize/update-resize-column.js.map +1 -1
- package/es/state/resize/update-resize-row.d.ts +2 -0
- package/es/state/resize/update-resize-row.js +57 -0
- package/es/state/resize/update-resize-row.js.map +1 -0
- package/es/state/state.d.ts +11 -1
- package/es/state/state.js +30 -3
- package/es/state/state.js.map +1 -1
- package/es/tools/global.d.ts +1 -0
- package/es/tools/global.js +2 -0
- package/es/tools/global.js.map +1 -1
- package/es/ts-types/base-table.d.ts +7 -0
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/events.d.ts +11 -0
- package/es/ts-types/events.js.map +1 -1
- package/es/ts-types/pivot-table/dimension/basic-dimension.d.ts +6 -1
- package/es/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/basic-indicator.d.ts +3 -0
- package/es/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +5 -0
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +5 -5
package/cjs/PivotChart.js
CHANGED
|
@@ -8,7 +8,7 @@ const ts_types_1 = require("./ts-types"), ts_types_2 = require("./ts-types"), pi
|
|
|
8
8
|
|
|
9
9
|
class PivotChart extends BaseTable_1.BaseTable {
|
|
10
10
|
constructor(container, options) {
|
|
11
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
11
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
12
12
|
"node" === env_1.Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container,
|
|
13
13
|
container = container.container ? container.container : null), super(container, options),
|
|
14
14
|
this._selectedDataItemsInChart = [], this._selectedDimensionInChart = [], this._chartEventMap = {},
|
|
@@ -19,17 +19,18 @@ class PivotChart extends BaseTable_1.BaseTable {
|
|
|
19
19
|
vutils_1.cloneDeep)(options.columnTree) : [], this.internalProps.rowTree = options.indicatorsAsCol || (null === (_b = options.rows) || void 0 === _b ? void 0 : _b.length) || options.rowTree ? (0,
|
|
20
20
|
vutils_1.cloneDeep)(options.rowTree) : [], this.internalProps.records = options.records,
|
|
21
21
|
this.setCustomStateNameToSpec(), this.internalProps.columnResizeType = null !== (_c = options.columnResizeType) && void 0 !== _c ? _c : "column",
|
|
22
|
+
this.internalProps.rowResizeType = null !== (_d = options.rowResizeType) && void 0 !== _d ? _d : "row",
|
|
22
23
|
this.internalProps.dataConfig = {
|
|
23
24
|
isPivotChart: !0
|
|
24
25
|
}, this._axes = (0, vutils_1.isArray)(options.axes) ? options.axes : [];
|
|
25
|
-
const rowKeys = null !== (
|
|
26
|
-
keys)), [])) && void 0 !==
|
|
27
|
-
keys)), [])) && void 0 !==
|
|
28
|
-
keys)), [])) && void 0 !==
|
|
26
|
+
const rowKeys = null !== (_f = null === (_e = options.rows) || void 0 === _e ? void 0 : _e.reduce(((keys, rowObj) => ("string" == typeof rowObj ? keys.push(rowObj) : keys.push(rowObj.dimensionKey),
|
|
27
|
+
keys)), [])) && void 0 !== _f ? _f : [], columnKeys = null !== (_h = null === (_g = options.columns) || void 0 === _g ? void 0 : _g.reduce(((keys, columnObj) => ("string" == typeof columnObj ? keys.push(columnObj) : keys.push(columnObj.dimensionKey),
|
|
28
|
+
keys)), [])) && void 0 !== _h ? _h : [], indicatorKeys = null !== (_k = null === (_j = options.indicators) || void 0 === _j ? void 0 : _j.reduce(((keys, indicatorObj) => ("string" == typeof indicatorObj ? keys.push(indicatorObj) : keys.push(indicatorObj.indicatorKey),
|
|
29
|
+
keys)), [])) && void 0 !== _k ? _k : [];
|
|
29
30
|
this.internalProps.dataConfig.collectValuesBy = this._generateCollectValuesConfig(columnKeys, rowKeys),
|
|
30
31
|
this.internalProps.dataConfig.aggregationRules = this._generateAggregationRules(),
|
|
31
32
|
this.internalProps.dataConfig.dimensionSortArray = this._getDimensionSortArray(),
|
|
32
|
-
this.dataset = new dataset_1.Dataset(this.internalProps.dataConfig, rowKeys, columnKeys, indicatorKeys, this.internalProps.indicators, null === (
|
|
33
|
+
this.dataset = new dataset_1.Dataset(this.internalProps.dataConfig, rowKeys, columnKeys, indicatorKeys, this.internalProps.indicators, null === (_l = options.indicatorsAsCol) || void 0 === _l || _l, options.records, void 0, this.internalProps.columnTree, this.internalProps.rowTree, !0),
|
|
33
34
|
this.internalProps.layoutMap = new pivot_header_layout_1.PivotHeaderLayoutMap(this, this.dataset),
|
|
34
35
|
this.refreshHeader(), this.scenegraph.createSceneGraph(), options.title && (this.internalProps.title = new title_1.Title(options.title, this),
|
|
35
36
|
this.scenegraph.resize()), setTimeout((() => {
|
|
@@ -64,7 +65,7 @@ class PivotChart extends BaseTable_1.BaseTable {
|
|
|
64
65
|
return ifCan;
|
|
65
66
|
}
|
|
66
67
|
updateOption(options) {
|
|
67
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
68
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
68
69
|
const internalProps = this.internalProps;
|
|
69
70
|
super.updateOption(options), this.internalProps.columns = (0, vutils_1.cloneDeep)(options.columns),
|
|
70
71
|
this.internalProps.rows = (0, vutils_1.cloneDeep)(options.rows), this.internalProps.indicators = (null === (_a = options.indicators) || void 0 === _a ? void 0 : _a.length) ? (0,
|
|
@@ -72,17 +73,18 @@ class PivotChart extends BaseTable_1.BaseTable {
|
|
|
72
73
|
vutils_1.cloneDeep)(options.columnTree) : [], this.internalProps.rowTree = options.indicatorsAsCol || (null === (_c = options.rows) || void 0 === _c ? void 0 : _c.length) || options.rowTree ? (0,
|
|
73
74
|
vutils_1.cloneDeep)(options.rowTree) : [], options.records && (this.internalProps.records = options.records),
|
|
74
75
|
this.setCustomStateNameToSpec(), this._selectedDataItemsInChart = [], internalProps.columnResizeType = null !== (_d = options.columnResizeType) && void 0 !== _d ? _d : "column",
|
|
76
|
+
internalProps.rowResizeType = null !== (_e = options.rowResizeType) && void 0 !== _e ? _e : "row",
|
|
75
77
|
internalProps.dataConfig = {
|
|
76
78
|
isPivotChart: !0
|
|
77
79
|
}, this._axes = (0, vutils_1.isArray)(options.axes) ? options.axes : [];
|
|
78
|
-
const rowKeys = null !== (
|
|
79
|
-
keys)), [])) && void 0 !==
|
|
80
|
-
keys)), [])) && void 0 !==
|
|
81
|
-
keys)), [])) && void 0 !==
|
|
80
|
+
const rowKeys = null !== (_g = null === (_f = options.rows) || void 0 === _f ? void 0 : _f.reduce(((keys, rowObj) => ("string" == typeof rowObj ? keys.push(rowObj) : keys.push(rowObj.dimensionKey),
|
|
81
|
+
keys)), [])) && void 0 !== _g ? _g : [], columnKeys = null !== (_j = null === (_h = options.columns) || void 0 === _h ? void 0 : _h.reduce(((keys, columnObj) => ("string" == typeof columnObj ? keys.push(columnObj) : keys.push(columnObj.dimensionKey),
|
|
82
|
+
keys)), [])) && void 0 !== _j ? _j : [], indicatorKeys = null !== (_l = null === (_k = options.indicators) || void 0 === _k ? void 0 : _k.reduce(((keys, indicatorObj) => ("string" == typeof indicatorObj ? keys.push(indicatorObj) : keys.push(indicatorObj.indicatorKey),
|
|
83
|
+
keys)), [])) && void 0 !== _l ? _l : [];
|
|
82
84
|
return this.internalProps.dataConfig.collectValuesBy = this._generateCollectValuesConfig(columnKeys, rowKeys),
|
|
83
85
|
this.internalProps.dataConfig.aggregationRules = this._generateAggregationRules(),
|
|
84
86
|
this.internalProps.dataConfig.dimensionSortArray = this._getDimensionSortArray(),
|
|
85
|
-
this.dataset = new dataset_1.Dataset(this.internalProps.dataConfig, rowKeys, columnKeys, indicatorKeys, this.internalProps.indicators, null === (
|
|
87
|
+
this.dataset = new dataset_1.Dataset(this.internalProps.dataConfig, rowKeys, columnKeys, indicatorKeys, this.internalProps.indicators, null === (_m = options.indicatorsAsCol) || void 0 === _m || _m, null !== (_o = options.records) && void 0 !== _o ? _o : this.internalProps.records, void 0, this.internalProps.columnTree, this.internalProps.rowTree, !0),
|
|
86
88
|
internalProps.layoutMap = new pivot_header_layout_1.PivotHeaderLayoutMap(this, this.dataset),
|
|
87
89
|
this.refreshHeader(), internalProps.releaseList && (internalProps.releaseList.forEach((releaseObj => {
|
|
88
90
|
var _a;
|
|
@@ -297,10 +299,10 @@ class PivotChart extends BaseTable_1.BaseTable {
|
|
|
297
299
|
};
|
|
298
300
|
}
|
|
299
301
|
_generateCollectValuesConfig(columnKeys, rowKeys) {
|
|
300
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
302
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
301
303
|
const indicators = this.internalProps.indicators, collectValuesBy = {};
|
|
302
304
|
for (let i = 0, len = null == indicators ? void 0 : indicators.length; i < len; i++) if ("string" != typeof indicators[i] && indicators[i].chartSpec) {
|
|
303
|
-
if ("pie" === (null === (_a = indicators[i].chartSpec) || void 0 === _a ? void 0 : _a.type)) continue;
|
|
305
|
+
if ("pie" === (null === (_a = indicators[i].chartSpec) || void 0 === _a ? void 0 : _a.type) || "rose" === (null === (_b = indicators[i].chartSpec) || void 0 === _b ? void 0 : _b.type) || "radar" === (null === (_c = indicators[i].chartSpec) || void 0 === _c ? void 0 : _c.type) || "gauge" === (null === (_d = indicators[i].chartSpec) || void 0 === _d ? void 0 : _d.type) || "wordCloud" === (null === (_e = indicators[i].chartSpec) || void 0 === _e ? void 0 : _e.type)) continue;
|
|
304
306
|
const indicatorDefine = indicators[i], indicatorSpec = indicatorDefine.chartSpec;
|
|
305
307
|
if (!1 === this.options.indicatorsAsCol) if (!1 !== (null == indicatorSpec ? void 0 : indicatorSpec.stack) && ("bar" === (null == indicatorSpec ? void 0 : indicatorSpec.type) || "area" === (null == indicatorSpec ? void 0 : indicatorSpec.type)) && (indicatorSpec.stack = !0),
|
|
306
308
|
collectValuesBy[indicatorDefine.indicatorKey] = {
|
|
@@ -313,14 +315,14 @@ class PivotChart extends BaseTable_1.BaseTable {
|
|
|
313
315
|
collectValuesBy[xField] = {
|
|
314
316
|
by: columnKeys,
|
|
315
317
|
type: "horizontal" !== chartSeries.direction ? "xField" : void 0,
|
|
316
|
-
range: "horizontal" === chartSeries.direction,
|
|
318
|
+
range: "scatter" === chartSeries.type || "horizontal" === chartSeries.direction,
|
|
317
319
|
sortBy: "horizontal" !== chartSeries.direction ? null !== (_d = null === (_c = null === (_b = null === (_a = null == chartSeries ? void 0 : chartSeries.data) || void 0 === _a ? void 0 : _a.fields) || void 0 === _b ? void 0 : _b[xField]) || void 0 === _c ? void 0 : _c.domain) && void 0 !== _d ? _d : null === (_g = null === (_f = null === (_e = null == indicatorSpec ? void 0 : indicatorSpec.data) || void 0 === _e ? void 0 : _e.fields) || void 0 === _f ? void 0 : _f[xField]) || void 0 === _g ? void 0 : _g.domain : void 0
|
|
318
320
|
};
|
|
319
321
|
const yField = chartSeries.yField;
|
|
320
322
|
!1 !== chartSeries.stack && ("bar" === chartSeries.type || "area" === chartSeries.type) && (chartSeries.stack = !0),
|
|
321
323
|
collectValuesBy[yField] = {
|
|
322
324
|
by: rowKeys,
|
|
323
|
-
range: "horizontal" !== chartSeries.direction,
|
|
325
|
+
range: "scatter" === chartSeries.type || "horizontal" !== chartSeries.direction,
|
|
324
326
|
sumBy: chartSeries.stack && columnKeys.concat(null == chartSeries ? void 0 : chartSeries.xField),
|
|
325
327
|
sortBy: "horizontal" === chartSeries.direction ? null !== (_l = null === (_k = null === (_j = null === (_h = null == chartSeries ? void 0 : chartSeries.data) || void 0 === _h ? void 0 : _h.fields) || void 0 === _j ? void 0 : _j[yField]) || void 0 === _k ? void 0 : _k.domain) && void 0 !== _l ? _l : null === (_p = null === (_o = null === (_m = null == indicatorSpec ? void 0 : indicatorSpec.data) || void 0 === _m ? void 0 : _m.fields) || void 0 === _o ? void 0 : _o[yField]) || void 0 === _p ? void 0 : _p.domain : void 0,
|
|
326
328
|
extendRange: (0, tableHelper_1.parseMarkLineGetExtendRange)(indicatorSpec.markLine)
|
|
@@ -330,15 +332,15 @@ class PivotChart extends BaseTable_1.BaseTable {
|
|
|
330
332
|
collectValuesBy[xField] = {
|
|
331
333
|
by: columnKeys,
|
|
332
334
|
type: "horizontal" !== indicatorSpec.direction ? "xField" : void 0,
|
|
333
|
-
range: "horizontal" === indicatorSpec.direction,
|
|
334
|
-
sortBy: "horizontal" !== indicatorSpec.direction ? null === (
|
|
335
|
+
range: "scatter" === indicatorSpec.type || "horizontal" === indicatorSpec.direction,
|
|
336
|
+
sortBy: "horizontal" !== indicatorSpec.direction ? null === (_h = null === (_g = null === (_f = null == indicatorSpec ? void 0 : indicatorSpec.data) || void 0 === _f ? void 0 : _f.fields) || void 0 === _g ? void 0 : _g[xField]) || void 0 === _h ? void 0 : _h.domain : void 0
|
|
335
337
|
}, !1 !== (null == indicatorSpec ? void 0 : indicatorSpec.stack) && ("bar" === (null == indicatorSpec ? void 0 : indicatorSpec.type) || "area" === (null == indicatorSpec ? void 0 : indicatorSpec.type)) && (indicatorSpec.stack = !0);
|
|
336
338
|
const yField = indicatorSpec.yField;
|
|
337
339
|
collectValuesBy[yField] = {
|
|
338
340
|
by: rowKeys,
|
|
339
341
|
range: "horizontal" !== indicatorSpec.direction,
|
|
340
342
|
sumBy: indicatorSpec.stack && columnKeys.concat(null == indicatorSpec ? void 0 : indicatorSpec.xField),
|
|
341
|
-
sortBy: "horizontal" === indicatorSpec.direction ? null === (
|
|
343
|
+
sortBy: "horizontal" === indicatorSpec.direction ? null === (_l = null === (_k = null === (_j = null == indicatorSpec ? void 0 : indicatorSpec.data) || void 0 === _j ? void 0 : _j.fields) || void 0 === _k ? void 0 : _k[yField]) || void 0 === _l ? void 0 : _l.domain : void 0,
|
|
342
344
|
extendRange: (0, tableHelper_1.parseMarkLineGetExtendRange)(indicatorSpec.markLine)
|
|
343
345
|
};
|
|
344
346
|
} else {
|
|
@@ -354,14 +356,14 @@ class PivotChart extends BaseTable_1.BaseTable {
|
|
|
354
356
|
collectValuesBy[yField] = {
|
|
355
357
|
by: rowKeys,
|
|
356
358
|
type: "horizontal" === chartSeries.direction ? "yField" : void 0,
|
|
357
|
-
range: "horizontal" !== chartSeries.direction,
|
|
359
|
+
range: "scatter" === chartSeries.type || "horizontal" !== chartSeries.direction,
|
|
358
360
|
sortBy: "horizontal" === chartSeries.direction ? null !== (_d = null === (_c = null === (_b = null === (_a = null == chartSeries ? void 0 : chartSeries.data) || void 0 === _a ? void 0 : _a.fields) || void 0 === _b ? void 0 : _b[yField]) || void 0 === _c ? void 0 : _c.domain) && void 0 !== _d ? _d : null === (_g = null === (_f = null === (_e = null == indicatorSpec ? void 0 : indicatorSpec.data) || void 0 === _e ? void 0 : _e.fields) || void 0 === _f ? void 0 : _f[yField]) || void 0 === _g ? void 0 : _g.domain : void 0
|
|
359
361
|
};
|
|
360
362
|
const xField = chartSeries.xField;
|
|
361
363
|
!1 !== chartSeries.stack && ("bar" === chartSeries.type || "area" === chartSeries.type) && (chartSeries.stack = !0),
|
|
362
364
|
collectValuesBy[xField] = {
|
|
363
365
|
by: columnKeys,
|
|
364
|
-
range: "horizontal" === chartSeries.direction,
|
|
366
|
+
range: "scatter" === chartSeries.type || "horizontal" === chartSeries.direction,
|
|
365
367
|
sumBy: chartSeries.stack && rowKeys.concat(null == chartSeries ? void 0 : chartSeries.yField),
|
|
366
368
|
sortBy: "horizontal" !== chartSeries.direction ? null !== (_l = null === (_k = null === (_j = null === (_h = null == chartSeries ? void 0 : chartSeries.data) || void 0 === _h ? void 0 : _h.fields) || void 0 === _j ? void 0 : _j[xField]) || void 0 === _k ? void 0 : _k.domain) && void 0 !== _l ? _l : null === (_p = null === (_o = null === (_m = null == indicatorSpec ? void 0 : indicatorSpec.data) || void 0 === _m ? void 0 : _m.fields) || void 0 === _o ? void 0 : _o[xField]) || void 0 === _p ? void 0 : _p.domain : void 0,
|
|
367
369
|
extendRange: (0, tableHelper_1.parseMarkLineGetExtendRange)(indicatorSpec.markLine)
|
|
@@ -371,15 +373,15 @@ class PivotChart extends BaseTable_1.BaseTable {
|
|
|
371
373
|
collectValuesBy[yField] = {
|
|
372
374
|
by: rowKeys,
|
|
373
375
|
type: "horizontal" === indicatorSpec.direction ? "yField" : void 0,
|
|
374
|
-
range: "horizontal" !== indicatorSpec.direction,
|
|
375
|
-
sortBy: "horizontal" === indicatorSpec.direction ? null === (
|
|
376
|
+
range: "scatter" === indicatorSpec.type || "horizontal" !== indicatorSpec.direction,
|
|
377
|
+
sortBy: "horizontal" === indicatorSpec.direction ? null === (_p = null === (_o = null === (_m = null == indicatorSpec ? void 0 : indicatorSpec.data) || void 0 === _m ? void 0 : _m.fields) || void 0 === _o ? void 0 : _o[yField]) || void 0 === _p ? void 0 : _p.domain : void 0
|
|
376
378
|
}, !1 !== (null == indicatorSpec ? void 0 : indicatorSpec.stack) && ("bar" === (null == indicatorSpec ? void 0 : indicatorSpec.type) || "area" === (null == indicatorSpec ? void 0 : indicatorSpec.type)) && (indicatorSpec.stack = !0);
|
|
377
379
|
const xField = indicatorSpec.xField;
|
|
378
380
|
collectValuesBy[xField] = {
|
|
379
381
|
by: columnKeys,
|
|
380
|
-
range: "horizontal" === indicatorSpec.direction,
|
|
382
|
+
range: "scatter" === indicatorSpec.type || "horizontal" === indicatorSpec.direction,
|
|
381
383
|
sumBy: indicatorSpec.stack && rowKeys.concat(null == indicatorSpec ? void 0 : indicatorSpec.yField),
|
|
382
|
-
sortBy: "horizontal" !== indicatorSpec.direction ? null === (
|
|
384
|
+
sortBy: "horizontal" !== indicatorSpec.direction ? null === (_s = null === (_r = null === (_q = null == indicatorSpec ? void 0 : indicatorSpec.data) || void 0 === _q ? void 0 : _q.fields) || void 0 === _r ? void 0 : _r[xField]) || void 0 === _s ? void 0 : _s.domain : void 0,
|
|
383
385
|
extendRange: (0, tableHelper_1.parseMarkLineGetExtendRange)(indicatorSpec.markLine)
|
|
384
386
|
};
|
|
385
387
|
}
|