@visactor/vtable 0.18.0-alpha.2 → 0.18.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.
Files changed (127) hide show
  1. package/cjs/ListTable.d.ts +1 -0
  2. package/cjs/ListTable.js +50 -2
  3. package/cjs/ListTable.js.map +1 -1
  4. package/cjs/PivotChart.js +102 -83
  5. package/cjs/PivotChart.js.map +1 -1
  6. package/cjs/core/BaseTable.js +4 -4
  7. package/cjs/core/BaseTable.js.map +1 -1
  8. package/cjs/data/DataSource.d.ts +3 -1
  9. package/cjs/data/DataSource.js +27 -7
  10. package/cjs/data/DataSource.js.map +1 -1
  11. package/cjs/event/pivot-chart/axis-click.js +2 -2
  12. package/cjs/event/pivot-chart/axis-click.js.map +1 -1
  13. package/cjs/index.d.ts +1 -1
  14. package/cjs/index.js +1 -1
  15. package/cjs/index.js.map +1 -1
  16. package/cjs/layout/chart-helper/get-axis-config.js +5 -5
  17. package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
  18. package/cjs/layout/chart-helper/get-chart-spec.d.ts +3 -0
  19. package/cjs/layout/chart-helper/get-chart-spec.js +43 -7
  20. package/cjs/layout/chart-helper/get-chart-spec.js.map +1 -1
  21. package/cjs/layout/pivot-header-layout.d.ts +4 -3
  22. package/cjs/layout/pivot-header-layout.js +43 -23
  23. package/cjs/layout/pivot-header-layout.js.map +1 -1
  24. package/cjs/scenegraph/component/custom.d.ts +5 -0
  25. package/cjs/scenegraph/component/custom.js +20 -3
  26. package/cjs/scenegraph/component/custom.js.map +1 -1
  27. package/cjs/scenegraph/graphic/contributions/chart-render-helper.js +1 -1
  28. package/cjs/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
  29. package/cjs/scenegraph/group-creater/cell-helper.d.ts +6 -3
  30. package/cjs/scenegraph/group-creater/cell-helper.js +38 -36
  31. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  32. package/cjs/scenegraph/group-creater/cell-type/text-cell.d.ts +2 -1
  33. package/cjs/scenegraph/group-creater/cell-type/text-cell.js +6 -2
  34. package/cjs/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
  35. package/cjs/scenegraph/group-creater/column-helper.js +11 -7
  36. package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
  37. package/cjs/scenegraph/group-creater/progress/update-position/sort-horizontal.js +12 -5
  38. package/cjs/scenegraph/group-creater/progress/update-position/sort-horizontal.js.map +1 -1
  39. package/cjs/scenegraph/group-creater/progress/update-position/sort-vertical.js +19 -14
  40. package/cjs/scenegraph/group-creater/progress/update-position/sort-vertical.js.map +1 -1
  41. package/cjs/scenegraph/layout/move-cell.d.ts +2 -1
  42. package/cjs/scenegraph/layout/move-cell.js +15 -27
  43. package/cjs/scenegraph/layout/move-cell.js.map +1 -1
  44. package/cjs/scenegraph/layout/update-height.js +21 -17
  45. package/cjs/scenegraph/layout/update-height.js.map +1 -1
  46. package/cjs/scenegraph/layout/update-width.js +40 -17
  47. package/cjs/scenegraph/layout/update-width.js.map +1 -1
  48. package/cjs/scenegraph/scenegraph.d.ts +2 -2
  49. package/cjs/scenegraph/scenegraph.js +10 -7
  50. package/cjs/scenegraph/scenegraph.js.map +1 -1
  51. package/cjs/scenegraph/utils/get-cell-merge.js +4 -0
  52. package/cjs/scenegraph/utils/get-cell-merge.js.map +1 -1
  53. package/cjs/scenegraph/utils/text-icon-layout.d.ts +3 -3
  54. package/cjs/scenegraph/utils/text-icon-layout.js +12 -10
  55. package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
  56. package/cjs/state/cell-move/index.js +4 -2
  57. package/cjs/state/cell-move/index.js.map +1 -1
  58. package/cjs/state/state.js +1 -1
  59. package/cjs/state/state.js.map +1 -1
  60. package/cjs/ts-types/table-engine.d.ts +5 -1
  61. package/cjs/ts-types/table-engine.js.map +1 -1
  62. package/cjs/vrender.js.map +1 -1
  63. package/dist/vtable.js +1565 -1207
  64. package/dist/vtable.min.js +2 -2
  65. package/es/ListTable.d.ts +1 -0
  66. package/es/ListTable.js +49 -2
  67. package/es/ListTable.js.map +1 -1
  68. package/es/PivotChart.js +102 -83
  69. package/es/PivotChart.js.map +1 -1
  70. package/es/core/BaseTable.js +4 -4
  71. package/es/core/BaseTable.js.map +1 -1
  72. package/es/data/DataSource.d.ts +3 -1
  73. package/es/data/DataSource.js +27 -7
  74. package/es/data/DataSource.js.map +1 -1
  75. package/es/event/pivot-chart/axis-click.js +2 -2
  76. package/es/event/pivot-chart/axis-click.js.map +1 -1
  77. package/es/index.d.ts +1 -1
  78. package/es/index.js +1 -1
  79. package/es/index.js.map +1 -1
  80. package/es/layout/chart-helper/get-axis-config.js +5 -5
  81. package/es/layout/chart-helper/get-axis-config.js.map +1 -1
  82. package/es/layout/chart-helper/get-chart-spec.d.ts +3 -0
  83. package/es/layout/chart-helper/get-chart-spec.js +38 -4
  84. package/es/layout/chart-helper/get-chart-spec.js.map +1 -1
  85. package/es/layout/pivot-header-layout.d.ts +4 -3
  86. package/es/layout/pivot-header-layout.js +38 -23
  87. package/es/layout/pivot-header-layout.js.map +1 -1
  88. package/es/scenegraph/component/custom.d.ts +5 -0
  89. package/es/scenegraph/component/custom.js +18 -0
  90. package/es/scenegraph/component/custom.js.map +1 -1
  91. package/es/scenegraph/graphic/contributions/chart-render-helper.js +1 -1
  92. package/es/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
  93. package/es/scenegraph/group-creater/cell-helper.d.ts +6 -3
  94. package/es/scenegraph/group-creater/cell-helper.js +36 -35
  95. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  96. package/es/scenegraph/group-creater/cell-type/text-cell.d.ts +2 -1
  97. package/es/scenegraph/group-creater/cell-type/text-cell.js +6 -2
  98. package/es/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
  99. package/es/scenegraph/group-creater/column-helper.js +11 -6
  100. package/es/scenegraph/group-creater/column-helper.js.map +1 -1
  101. package/es/scenegraph/group-creater/progress/update-position/sort-horizontal.js +12 -5
  102. package/es/scenegraph/group-creater/progress/update-position/sort-horizontal.js.map +1 -1
  103. package/es/scenegraph/group-creater/progress/update-position/sort-vertical.js +19 -14
  104. package/es/scenegraph/group-creater/progress/update-position/sort-vertical.js.map +1 -1
  105. package/es/scenegraph/layout/move-cell.d.ts +2 -1
  106. package/es/scenegraph/layout/move-cell.js +12 -20
  107. package/es/scenegraph/layout/move-cell.js.map +1 -1
  108. package/es/scenegraph/layout/update-height.js +20 -16
  109. package/es/scenegraph/layout/update-height.js.map +1 -1
  110. package/es/scenegraph/layout/update-width.js +39 -16
  111. package/es/scenegraph/layout/update-width.js.map +1 -1
  112. package/es/scenegraph/scenegraph.d.ts +2 -2
  113. package/es/scenegraph/scenegraph.js +9 -6
  114. package/es/scenegraph/scenegraph.js.map +1 -1
  115. package/es/scenegraph/utils/get-cell-merge.js +4 -0
  116. package/es/scenegraph/utils/get-cell-merge.js.map +1 -1
  117. package/es/scenegraph/utils/text-icon-layout.d.ts +3 -3
  118. package/es/scenegraph/utils/text-icon-layout.js +10 -10
  119. package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
  120. package/es/state/cell-move/index.js +4 -1
  121. package/es/state/cell-move/index.js.map +1 -1
  122. package/es/state/state.js +1 -1
  123. package/es/state/state.js.map +1 -1
  124. package/es/ts-types/table-engine.d.ts +5 -1
  125. package/es/ts-types/table-engine.js.map +1 -1
  126. package/es/vrender.js.map +1 -1
  127. package/package.json +3 -3
package/es/PivotChart.js CHANGED
@@ -146,10 +146,18 @@ export class PivotChart extends BaseTable {
146
146
  return layoutMap.getBodyIndexByCol(col);
147
147
  }
148
148
  getCellValue(col, row) {
149
- var _a;
149
+ var _a, _b, _c;
150
150
  const customMergeText = this.getCustomMergeValue(col, row);
151
151
  if (customMergeText) return customMergeText;
152
152
  if (this.internalProps.layoutMap.isHeader(col, row)) {
153
+ if (this.internalProps.layoutMap.isBottomFrozenRow(col, row) || this.internalProps.layoutMap.isRightFrozenColumn(col, row)) {
154
+ const indicatorKeys = this.internalProps.layoutMap.getIndicatorKeyInChartSpec(col, row);
155
+ let indicatorInfo;
156
+ return null == indicatorKeys || indicatorKeys.forEach((key => {
157
+ const info = this.internalProps.layoutMap.getIndicatorInfo(key);
158
+ info && (indicatorInfo = info);
159
+ })), null !== (_b = null !== (_a = null == indicatorInfo ? void 0 : indicatorInfo.title) && void 0 !== _a ? _a : null == indicatorInfo ? void 0 : indicatorInfo.indicatorKey) && void 0 !== _b ? _b : "";
160
+ }
153
161
  const {title: title, fieldFormat: fieldFormat} = this.internalProps.layoutMap.getHeader(col, row);
154
162
  return "function" == typeof fieldFormat ? fieldFormat(title, col, row, this) : title;
155
163
  }
@@ -163,16 +171,24 @@ export class PivotChart extends BaseTable {
163
171
  })), aggregator = this.dataset.getAggregator(this.internalProps.layoutMap.indicatorsAsCol ? rowKeys : rowKeys.slice(0, -1), this.internalProps.layoutMap.indicatorsAsCol ? colKeys.slice(0, -1) : colKeys, this.internalProps.layoutMap.getIndicatorKey(col, row));
164
172
  return aggregator.value ? aggregator.value() : void 0;
165
173
  }
166
- const {fieldFormat: fieldFormat} = this.internalProps.layoutMap.getBody(col, row), rowIndex = this.getBodyIndexByRow(row), colIndex = this.getBodyIndexByCol(col), dataValue = null === (_a = this.records[rowIndex]) || void 0 === _a ? void 0 : _a[colIndex];
174
+ const {fieldFormat: fieldFormat} = this.internalProps.layoutMap.getBody(col, row), rowIndex = this.getBodyIndexByRow(row), colIndex = this.getBodyIndexByCol(col), dataValue = null === (_c = this.records[rowIndex]) || void 0 === _c ? void 0 : _c[colIndex];
167
175
  if ("function" == typeof fieldFormat) {
168
176
  return fieldFormat(dataValue, col, row, this);
169
177
  }
170
178
  return dataValue;
171
179
  }
172
180
  getCellOriginValue(col, row) {
173
- var _a;
181
+ var _a, _b, _c;
174
182
  const table = this;
175
183
  if (table.internalProps.layoutMap.isHeader(col, row)) {
184
+ if (this.internalProps.layoutMap.isBottomFrozenRow(col, row) || this.internalProps.layoutMap.isRightFrozenColumn(col, row)) {
185
+ const indicatorKeys = this.internalProps.layoutMap.getIndicatorKeyInChartSpec(col, row);
186
+ let indicatorInfo;
187
+ return null == indicatorKeys || indicatorKeys.forEach((key => {
188
+ const info = this.internalProps.layoutMap.getIndicatorInfo(key);
189
+ info && (indicatorInfo = info);
190
+ })), null !== (_b = null !== (_a = null == indicatorInfo ? void 0 : indicatorInfo.title) && void 0 !== _a ? _a : null == indicatorInfo ? void 0 : indicatorInfo.indicatorKey) && void 0 !== _b ? _b : "";
191
+ }
176
192
  const {title: title} = table.internalProps.layoutMap.getHeader(col, row);
177
193
  return "function" == typeof title ? title() : title;
178
194
  }
@@ -187,7 +203,7 @@ export class PivotChart extends BaseTable {
187
203
  return aggregator.value ? aggregator.value() : void 0;
188
204
  }
189
205
  const rowIndex = this.getBodyIndexByRow(row), colIndex = this.getBodyIndexByCol(col);
190
- return null === (_a = this.records[rowIndex]) || void 0 === _a ? void 0 : _a[colIndex];
206
+ return null === (_c = this.records[rowIndex]) || void 0 === _c ? void 0 : _c[colIndex];
191
207
  }
192
208
  getCellRawValue(col, row) {
193
209
  return this.getCellOriginValue(col, row);
@@ -299,87 +315,90 @@ export class PivotChart extends BaseTable {
299
315
  };
300
316
  }
301
317
  _generateCollectValuesConfig(columnKeys, rowKeys) {
302
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9;
318
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10;
303
319
  const indicators = this.internalProps.indicators, collectValuesBy = {};
304
- for (let i = 0, len = null == indicators ? void 0 : indicators.length; i < len; i++) if ("string" != typeof indicators[i] && indicators[i].chartSpec) if (!1 === this.options.indicatorsAsCol) {
305
- const indicatorDefine = indicators[i];
306
- if (!1 !== (null === (_a = indicatorDefine.chartSpec) || void 0 === _a ? void 0 : _a.stack) && ("bar" === (null === (_b = indicatorDefine.chartSpec) || void 0 === _b ? void 0 : _b.type) || "area" === (null === (_c = indicatorDefine.chartSpec) || void 0 === _c ? void 0 : _c.type)) && (indicatorDefine.chartSpec.stack = !0),
307
- collectValuesBy[indicatorDefine.indicatorKey] = {
308
- by: rowKeys,
309
- range: !0,
310
- sumBy: (null === (_d = indicatorDefine.chartSpec) || void 0 === _d ? void 0 : _d.stack) && columnKeys.concat(null === (_e = indicatorDefine.chartSpec) || void 0 === _e ? void 0 : _e.xField)
311
- }, indicatorDefine.chartSpec.series) indicatorDefine.chartSpec.series.forEach((chartSeries => {
312
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
313
- const xField = "string" == typeof chartSeries.xField ? chartSeries.xField : chartSeries.xField[0];
314
- collectValuesBy[xField] = {
315
- by: columnKeys,
316
- type: "horizontal" !== chartSeries.direction ? "xField" : void 0,
317
- range: "horizontal" === chartSeries.direction,
318
- 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 === (_h = null === (_g = null === (_f = null === (_e = indicatorDefine.chartSpec) || void 0 === _e ? void 0 : _e.data) || void 0 === _f ? void 0 : _f.fields) || void 0 === _g ? void 0 : _g[xField]) || void 0 === _h ? void 0 : _h.domain : void 0
319
- };
320
- const yField = chartSeries.yField;
321
- !1 !== chartSeries.stack && ("bar" === chartSeries.type || "area" === chartSeries.type) && (chartSeries.stack = !0),
322
- collectValuesBy[yField] = {
323
- by: rowKeys,
324
- range: "horizontal" !== chartSeries.direction,
325
- sumBy: chartSeries.stack && columnKeys.concat(null == chartSeries ? void 0 : chartSeries.xField),
326
- sortBy: "horizontal" === chartSeries.direction ? null !== (_m = null === (_l = null === (_k = null === (_j = null == chartSeries ? void 0 : chartSeries.data) || void 0 === _j ? void 0 : _j.fields) || void 0 === _k ? void 0 : _k[yField]) || void 0 === _l ? void 0 : _l.domain) && void 0 !== _m ? _m : null === (_r = null === (_q = null === (_p = null === (_o = indicatorDefine.chartSpec) || void 0 === _o ? void 0 : _o.data) || void 0 === _p ? void 0 : _p.fields) || void 0 === _q ? void 0 : _q[yField]) || void 0 === _r ? void 0 : _r.domain : void 0
327
- };
328
- })); else {
329
- const xField = "string" == typeof indicatorDefine.chartSpec.xField ? indicatorDefine.chartSpec.xField : indicatorDefine.chartSpec.xField[0];
330
- collectValuesBy[xField] = {
331
- by: columnKeys,
332
- type: "horizontal" !== indicatorDefine.chartSpec.direction ? "xField" : void 0,
333
- range: "horizontal" === indicatorDefine.chartSpec.direction,
334
- sortBy: "horizontal" !== indicatorDefine.chartSpec.direction ? null === (_j = null === (_h = null === (_g = null === (_f = indicatorDefine.chartSpec) || void 0 === _f ? void 0 : _f.data) || void 0 === _g ? void 0 : _g.fields) || void 0 === _h ? void 0 : _h[xField]) || void 0 === _j ? void 0 : _j.domain : void 0
335
- }, !1 !== (null === (_k = indicatorDefine.chartSpec) || void 0 === _k ? void 0 : _k.stack) && ("bar" === (null === (_l = indicatorDefine.chartSpec) || void 0 === _l ? void 0 : _l.type) || "area" === (null === (_m = indicatorDefine.chartSpec) || void 0 === _m ? void 0 : _m.type)) && (indicatorDefine.chartSpec.stack = !0);
336
- const yField = indicatorDefine.chartSpec.yField;
337
- collectValuesBy[yField] = {
320
+ for (let i = 0, len = null == indicators ? void 0 : indicators.length; i < len; i++) if ("string" != typeof indicators[i] && indicators[i].chartSpec) {
321
+ if ("pie" === (null === (_a = indicators[i].chartSpec) || void 0 === _a ? void 0 : _a.type)) continue;
322
+ if (!1 === this.options.indicatorsAsCol) {
323
+ const indicatorDefine = indicators[i];
324
+ if (!1 !== (null === (_b = indicatorDefine.chartSpec) || void 0 === _b ? void 0 : _b.stack) && ("bar" === (null === (_c = indicatorDefine.chartSpec) || void 0 === _c ? void 0 : _c.type) || "area" === (null === (_d = indicatorDefine.chartSpec) || void 0 === _d ? void 0 : _d.type)) && (indicatorDefine.chartSpec.stack = !0),
325
+ collectValuesBy[indicatorDefine.indicatorKey] = {
338
326
  by: rowKeys,
339
- range: "horizontal" !== indicators[i].chartSpec.direction,
340
- sumBy: indicatorDefine.chartSpec.stack && columnKeys.concat(null === (_o = indicatorDefine.chartSpec) || void 0 === _o ? void 0 : _o.xField),
341
- sortBy: "horizontal" === indicatorDefine.chartSpec.direction ? null === (_s = null === (_r = null === (_q = null === (_p = indicatorDefine.chartSpec) || void 0 === _p ? void 0 : _p.data) || void 0 === _q ? void 0 : _q.fields) || void 0 === _r ? void 0 : _r[yField]) || void 0 === _s ? void 0 : _s.domain : void 0
342
- };
343
- }
344
- } else {
345
- const indicatorDefine = indicators[i];
346
- if (!1 !== (null === (_t = indicatorDefine.chartSpec) || void 0 === _t ? void 0 : _t.stack) && ("bar" === (null === (_u = indicatorDefine.chartSpec) || void 0 === _u ? void 0 : _u.type) || "area" === (null === (_v = indicatorDefine.chartSpec) || void 0 === _v ? void 0 : _v.type)) && (indicatorDefine.chartSpec.stack = !0),
347
- collectValuesBy[indicatorDefine.indicatorKey] = {
348
- by: columnKeys,
349
- range: !0,
350
- sumBy: (null === (_w = indicatorDefine.chartSpec) || void 0 === _w ? void 0 : _w.stack) && rowKeys.concat(null === (_x = indicatorDefine.chartSpec) || void 0 === _x ? void 0 : _x.yField)
351
- }, indicatorDefine.chartSpec.series) indicatorDefine.chartSpec.series.forEach((chartSeries => {
352
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
353
- const yField = "string" == typeof chartSeries.yField ? chartSeries.yField : chartSeries.yField[0];
354
- collectValuesBy[yField] = {
355
- by: rowKeys,
356
- type: "horizontal" === chartSeries.direction ? "yField" : void 0,
357
- range: "horizontal" !== chartSeries.direction,
358
- 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 === (_h = null === (_g = null === (_f = null === (_e = indicatorDefine.chartSpec) || void 0 === _e ? void 0 : _e.data) || void 0 === _f ? void 0 : _f.fields) || void 0 === _g ? void 0 : _g[yField]) || void 0 === _h ? void 0 : _h.domain : void 0
359
- };
360
- const xField = chartSeries.xField;
361
- !1 !== chartSeries.stack && ("bar" === chartSeries.type || "area" === chartSeries.type) && (chartSeries.stack = !0),
362
- collectValuesBy[xField] = {
363
- by: columnKeys,
364
- range: "horizontal" === chartSeries.direction,
365
- sumBy: chartSeries.stack && rowKeys.concat(null == chartSeries ? void 0 : chartSeries.yField),
366
- sortBy: "horizontal" !== chartSeries.direction ? null !== (_m = null === (_l = null === (_k = null === (_j = null == chartSeries ? void 0 : chartSeries.data) || void 0 === _j ? void 0 : _j.fields) || void 0 === _k ? void 0 : _k[xField]) || void 0 === _l ? void 0 : _l.domain) && void 0 !== _m ? _m : null === (_r = null === (_q = null === (_p = null === (_o = indicatorDefine.chartSpec) || void 0 === _o ? void 0 : _o.data) || void 0 === _p ? void 0 : _p.fields) || void 0 === _q ? void 0 : _q[xField]) || void 0 === _r ? void 0 : _r.domain : void 0
367
- };
368
- })); else {
369
- const yField = "string" == typeof indicatorDefine.chartSpec.yField ? indicatorDefine.chartSpec.yField : indicatorDefine.chartSpec.yField[0];
370
- collectValuesBy[yField] = {
371
- by: rowKeys,
372
- type: "horizontal" === indicatorDefine.chartSpec.direction ? "yField" : void 0,
373
- range: "horizontal" !== indicatorDefine.chartSpec.direction,
374
- sortBy: "horizontal" === indicatorDefine.chartSpec.direction ? null === (_1 = null === (_0 = null === (_z = null === (_y = indicatorDefine.chartSpec) || void 0 === _y ? void 0 : _y.data) || void 0 === _z ? void 0 : _z.fields) || void 0 === _0 ? void 0 : _0[yField]) || void 0 === _1 ? void 0 : _1.domain : void 0
375
- }, !1 !== (null === (_2 = indicatorDefine.chartSpec) || void 0 === _2 ? void 0 : _2.stack) && ("bar" === (null === (_3 = indicatorDefine.chartSpec) || void 0 === _3 ? void 0 : _3.type) || "area" === (null === (_4 = indicatorDefine.chartSpec) || void 0 === _4 ? void 0 : _4.type)) && (indicatorDefine.chartSpec.stack = !0);
376
- const xField = indicatorDefine.chartSpec.xField;
377
- collectValuesBy[xField] = {
327
+ range: !0,
328
+ sumBy: (null === (_e = indicatorDefine.chartSpec) || void 0 === _e ? void 0 : _e.stack) && columnKeys.concat(null === (_f = indicatorDefine.chartSpec) || void 0 === _f ? void 0 : _f.xField)
329
+ }, indicatorDefine.chartSpec.series) indicatorDefine.chartSpec.series.forEach((chartSeries => {
330
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
331
+ const xField = "string" == typeof chartSeries.xField ? chartSeries.xField : chartSeries.xField[0];
332
+ collectValuesBy[xField] = {
333
+ by: columnKeys,
334
+ type: "horizontal" !== chartSeries.direction ? "xField" : void 0,
335
+ range: "horizontal" === chartSeries.direction,
336
+ 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 === (_h = null === (_g = null === (_f = null === (_e = indicatorDefine.chartSpec) || void 0 === _e ? void 0 : _e.data) || void 0 === _f ? void 0 : _f.fields) || void 0 === _g ? void 0 : _g[xField]) || void 0 === _h ? void 0 : _h.domain : void 0
337
+ };
338
+ const yField = chartSeries.yField;
339
+ !1 !== chartSeries.stack && ("bar" === chartSeries.type || "area" === chartSeries.type) && (chartSeries.stack = !0),
340
+ collectValuesBy[yField] = {
341
+ by: rowKeys,
342
+ range: "horizontal" !== chartSeries.direction,
343
+ sumBy: chartSeries.stack && columnKeys.concat(null == chartSeries ? void 0 : chartSeries.xField),
344
+ sortBy: "horizontal" === chartSeries.direction ? null !== (_m = null === (_l = null === (_k = null === (_j = null == chartSeries ? void 0 : chartSeries.data) || void 0 === _j ? void 0 : _j.fields) || void 0 === _k ? void 0 : _k[yField]) || void 0 === _l ? void 0 : _l.domain) && void 0 !== _m ? _m : null === (_r = null === (_q = null === (_p = null === (_o = indicatorDefine.chartSpec) || void 0 === _o ? void 0 : _o.data) || void 0 === _p ? void 0 : _p.fields) || void 0 === _q ? void 0 : _q[yField]) || void 0 === _r ? void 0 : _r.domain : void 0
345
+ };
346
+ })); else {
347
+ const xField = "string" == typeof indicatorDefine.chartSpec.xField ? indicatorDefine.chartSpec.xField : indicatorDefine.chartSpec.xField[0];
348
+ collectValuesBy[xField] = {
349
+ by: columnKeys,
350
+ type: "horizontal" !== indicatorDefine.chartSpec.direction ? "xField" : void 0,
351
+ range: "horizontal" === indicatorDefine.chartSpec.direction,
352
+ sortBy: "horizontal" !== indicatorDefine.chartSpec.direction ? null === (_k = null === (_j = null === (_h = null === (_g = indicatorDefine.chartSpec) || void 0 === _g ? void 0 : _g.data) || void 0 === _h ? void 0 : _h.fields) || void 0 === _j ? void 0 : _j[xField]) || void 0 === _k ? void 0 : _k.domain : void 0
353
+ }, !1 !== (null === (_l = indicatorDefine.chartSpec) || void 0 === _l ? void 0 : _l.stack) && ("bar" === (null === (_m = indicatorDefine.chartSpec) || void 0 === _m ? void 0 : _m.type) || "area" === (null === (_o = indicatorDefine.chartSpec) || void 0 === _o ? void 0 : _o.type)) && (indicatorDefine.chartSpec.stack = !0);
354
+ const yField = indicatorDefine.chartSpec.yField;
355
+ collectValuesBy[yField] = {
356
+ by: rowKeys,
357
+ range: "horizontal" !== indicators[i].chartSpec.direction,
358
+ sumBy: indicatorDefine.chartSpec.stack && columnKeys.concat(null === (_p = indicatorDefine.chartSpec) || void 0 === _p ? void 0 : _p.xField),
359
+ sortBy: "horizontal" === indicatorDefine.chartSpec.direction ? null === (_t = null === (_s = null === (_r = null === (_q = indicatorDefine.chartSpec) || void 0 === _q ? void 0 : _q.data) || void 0 === _r ? void 0 : _r.fields) || void 0 === _s ? void 0 : _s[yField]) || void 0 === _t ? void 0 : _t.domain : void 0
360
+ };
361
+ }
362
+ } else {
363
+ const indicatorDefine = indicators[i];
364
+ if (!1 !== (null === (_u = indicatorDefine.chartSpec) || void 0 === _u ? void 0 : _u.stack) && ("bar" === (null === (_v = indicatorDefine.chartSpec) || void 0 === _v ? void 0 : _v.type) || "area" === (null === (_w = indicatorDefine.chartSpec) || void 0 === _w ? void 0 : _w.type)) && (indicatorDefine.chartSpec.stack = !0),
365
+ collectValuesBy[indicatorDefine.indicatorKey] = {
378
366
  by: columnKeys,
379
- range: "horizontal" === indicators[i].chartSpec.direction,
380
- sumBy: indicatorDefine.chartSpec.stack && rowKeys.concat(null === (_5 = indicatorDefine.chartSpec) || void 0 === _5 ? void 0 : _5.yField),
381
- sortBy: "horizontal" !== indicatorDefine.chartSpec.direction ? null === (_9 = null === (_8 = null === (_7 = null === (_6 = indicatorDefine.chartSpec) || void 0 === _6 ? void 0 : _6.data) || void 0 === _7 ? void 0 : _7.fields) || void 0 === _8 ? void 0 : _8[xField]) || void 0 === _9 ? void 0 : _9.domain : void 0
382
- };
367
+ range: !0,
368
+ sumBy: (null === (_x = indicatorDefine.chartSpec) || void 0 === _x ? void 0 : _x.stack) && rowKeys.concat(null === (_y = indicatorDefine.chartSpec) || void 0 === _y ? void 0 : _y.yField)
369
+ }, indicatorDefine.chartSpec.series) indicatorDefine.chartSpec.series.forEach((chartSeries => {
370
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
371
+ const yField = "string" == typeof chartSeries.yField ? chartSeries.yField : chartSeries.yField[0];
372
+ collectValuesBy[yField] = {
373
+ by: rowKeys,
374
+ type: "horizontal" === chartSeries.direction ? "yField" : void 0,
375
+ range: "horizontal" !== chartSeries.direction,
376
+ 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 === (_h = null === (_g = null === (_f = null === (_e = indicatorDefine.chartSpec) || void 0 === _e ? void 0 : _e.data) || void 0 === _f ? void 0 : _f.fields) || void 0 === _g ? void 0 : _g[yField]) || void 0 === _h ? void 0 : _h.domain : void 0
377
+ };
378
+ const xField = chartSeries.xField;
379
+ !1 !== chartSeries.stack && ("bar" === chartSeries.type || "area" === chartSeries.type) && (chartSeries.stack = !0),
380
+ collectValuesBy[xField] = {
381
+ by: columnKeys,
382
+ range: "horizontal" === chartSeries.direction,
383
+ sumBy: chartSeries.stack && rowKeys.concat(null == chartSeries ? void 0 : chartSeries.yField),
384
+ sortBy: "horizontal" !== chartSeries.direction ? null !== (_m = null === (_l = null === (_k = null === (_j = null == chartSeries ? void 0 : chartSeries.data) || void 0 === _j ? void 0 : _j.fields) || void 0 === _k ? void 0 : _k[xField]) || void 0 === _l ? void 0 : _l.domain) && void 0 !== _m ? _m : null === (_r = null === (_q = null === (_p = null === (_o = indicatorDefine.chartSpec) || void 0 === _o ? void 0 : _o.data) || void 0 === _p ? void 0 : _p.fields) || void 0 === _q ? void 0 : _q[xField]) || void 0 === _r ? void 0 : _r.domain : void 0
385
+ };
386
+ })); else {
387
+ const yField = "string" == typeof indicatorDefine.chartSpec.yField ? indicatorDefine.chartSpec.yField : indicatorDefine.chartSpec.yField[0];
388
+ collectValuesBy[yField] = {
389
+ by: rowKeys,
390
+ type: "horizontal" === indicatorDefine.chartSpec.direction ? "yField" : void 0,
391
+ range: "horizontal" !== indicatorDefine.chartSpec.direction,
392
+ sortBy: "horizontal" === indicatorDefine.chartSpec.direction ? null === (_2 = null === (_1 = null === (_0 = null === (_z = indicatorDefine.chartSpec) || void 0 === _z ? void 0 : _z.data) || void 0 === _0 ? void 0 : _0.fields) || void 0 === _1 ? void 0 : _1[yField]) || void 0 === _2 ? void 0 : _2.domain : void 0
393
+ }, !1 !== (null === (_3 = indicatorDefine.chartSpec) || void 0 === _3 ? void 0 : _3.stack) && ("bar" === (null === (_4 = indicatorDefine.chartSpec) || void 0 === _4 ? void 0 : _4.type) || "area" === (null === (_5 = indicatorDefine.chartSpec) || void 0 === _5 ? void 0 : _5.type)) && (indicatorDefine.chartSpec.stack = !0);
394
+ const xField = indicatorDefine.chartSpec.xField;
395
+ collectValuesBy[xField] = {
396
+ by: columnKeys,
397
+ range: "horizontal" === indicators[i].chartSpec.direction,
398
+ sumBy: indicatorDefine.chartSpec.stack && rowKeys.concat(null === (_6 = indicatorDefine.chartSpec) || void 0 === _6 ? void 0 : _6.yField),
399
+ sortBy: "horizontal" !== indicatorDefine.chartSpec.direction ? null === (_10 = null === (_9 = null === (_8 = null === (_7 = indicatorDefine.chartSpec) || void 0 === _7 ? void 0 : _7.data) || void 0 === _8 ? void 0 : _8.fields) || void 0 === _9 ? void 0 : _9[xField]) || void 0 === _10 ? void 0 : _10.domain : void 0
400
+ };
401
+ }
383
402
  }
384
403
  }
385
404
  return collectValuesBy;
@@ -491,7 +510,7 @@ export class PivotChart extends BaseTable {
491
510
  if (chartNode.attribute.chartInstance) {
492
511
  chartInstance = chartNode.attribute.chartInstance;
493
512
  const {dataId: dataId, data: data, axes: axes, spec: spec} = chartNode.attribute, viewBox = chartNode.getViewBox();
494
- if (axes.forEach(((axis, index) => {
513
+ if (null == axes || axes.forEach(((axis, index) => {
495
514
  var _a, _b, _c, _d;
496
515
  "linear" === axis.type ? chartInstance.updateModelSpecSync({
497
516
  type: "axes",