@visactor/vtable 0.23.1 → 0.23.2-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.
Files changed (71) hide show
  1. package/cjs/PivotChart.js +58 -56
  2. package/cjs/PivotChart.js.map +1 -1
  3. package/cjs/core/BaseTable.js +1 -1
  4. package/cjs/core/BaseTable.js.map +1 -1
  5. package/cjs/core/tableHelper.d.ts +1 -0
  6. package/cjs/core/tableHelper.js +29 -2
  7. package/cjs/core/tableHelper.js.map +1 -1
  8. package/cjs/dataset/dataset.js +6 -2
  9. package/cjs/dataset/dataset.js.map +1 -1
  10. package/cjs/event/listener/table-group.js +7 -3
  11. package/cjs/event/listener/table-group.js.map +1 -1
  12. package/cjs/index.d.ts +1 -1
  13. package/cjs/index.js +1 -1
  14. package/cjs/index.js.map +1 -1
  15. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  16. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +1 -1
  17. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  18. package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js +1 -1
  19. package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
  20. package/cjs/scenegraph/group-creater/cell-type/image-cell.js +1 -1
  21. package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
  22. package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js +1 -1
  23. package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
  24. package/cjs/scenegraph/group-creater/cell-type/text-cell.js +1 -1
  25. package/cjs/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
  26. package/cjs/scenegraph/group-creater/cell-type/video-cell.js +1 -1
  27. package/cjs/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
  28. package/cjs/scenegraph/style/corner-cell.js +1 -1
  29. package/cjs/scenegraph/style/corner-cell.js.map +1 -1
  30. package/cjs/scenegraph/style/frame-border.js +1 -1
  31. package/cjs/scenegraph/style/frame-border.js.map +1 -1
  32. package/cjs/ts-types/new-data-set.d.ts +1 -0
  33. package/cjs/ts-types/new-data-set.js.map +1 -1
  34. package/cjs/vrender.js.map +1 -1
  35. package/dist/vtable.js +143 -80
  36. package/dist/vtable.min.js +2 -2
  37. package/es/PivotChart.js +59 -55
  38. package/es/PivotChart.js.map +1 -1
  39. package/es/core/BaseTable.js +1 -1
  40. package/es/core/BaseTable.js.map +1 -1
  41. package/es/core/tableHelper.d.ts +1 -0
  42. package/es/core/tableHelper.js +26 -0
  43. package/es/core/tableHelper.js.map +1 -1
  44. package/es/dataset/dataset.js +6 -2
  45. package/es/dataset/dataset.js.map +1 -1
  46. package/es/event/listener/table-group.js +7 -3
  47. package/es/event/listener/table-group.js.map +1 -1
  48. package/es/index.d.ts +1 -1
  49. package/es/index.js +1 -1
  50. package/es/index.js.map +1 -1
  51. package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  52. package/es/scenegraph/group-creater/cell-type/chart-cell.js +1 -1
  53. package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  54. package/es/scenegraph/group-creater/cell-type/checkbox-cell.js +1 -1
  55. package/es/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
  56. package/es/scenegraph/group-creater/cell-type/image-cell.js +1 -1
  57. package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
  58. package/es/scenegraph/group-creater/cell-type/spark-line-cell.js +1 -1
  59. package/es/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
  60. package/es/scenegraph/group-creater/cell-type/text-cell.js +1 -1
  61. package/es/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
  62. package/es/scenegraph/group-creater/cell-type/video-cell.js +1 -1
  63. package/es/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
  64. package/es/scenegraph/style/corner-cell.js +1 -1
  65. package/es/scenegraph/style/corner-cell.js.map +1 -1
  66. package/es/scenegraph/style/frame-border.js +1 -1
  67. package/es/scenegraph/style/frame-border.js.map +1 -1
  68. package/es/ts-types/new-data-set.d.ts +1 -0
  69. package/es/ts-types/new-data-set.js.map +1 -1
  70. package/es/vrender.js.map +1 -1
  71. package/package.json +5 -5
package/cjs/PivotChart.js CHANGED
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  }), exports.PivotChart = void 0;
6
6
 
7
- const ts_types_1 = require("./ts-types"), ts_types_2 = require("./ts-types"), pivot_header_layout_1 = require("./layout/pivot-header-layout"), PIVOT_TABLE_EVENT_TYPE_1 = require("./ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE"), helper_1 = require("./tools/helper"), dataset_1 = require("./dataset/dataset"), BaseTable_1 = require("./core/BaseTable"), update_chart_1 = require("./scenegraph/refresh-node/update-chart"), vutils_1 = require("@visactor/vutils"), title_1 = require("./components/title/title"), env_1 = require("./tools/env"), TABLE_EVENT_TYPE_1 = require("./core/TABLE_EVENT_TYPE");
7
+ const ts_types_1 = require("./ts-types"), ts_types_2 = require("./ts-types"), pivot_header_layout_1 = require("./layout/pivot-header-layout"), PIVOT_TABLE_EVENT_TYPE_1 = require("./ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE"), helper_1 = require("./tools/helper"), dataset_1 = require("./dataset/dataset"), tableHelper_1 = require("./core/tableHelper"), BaseTable_1 = require("./core/BaseTable"), update_chart_1 = require("./scenegraph/refresh-node/update-chart"), vutils_1 = require("@visactor/vutils"), title_1 = require("./components/title/title"), env_1 = require("./tools/env"), TABLE_EVENT_TYPE_1 = require("./core/TABLE_EVENT_TYPE");
8
8
 
9
9
  class PivotChart extends BaseTable_1.BaseTable {
10
10
  constructor(container, options) {
@@ -306,65 +306,65 @@ class PivotChart extends BaseTable_1.BaseTable {
306
306
  };
307
307
  }
308
308
  _generateCollectValuesConfig(columnKeys, rowKeys) {
309
- 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;
309
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
310
310
  const indicators = this.internalProps.indicators, collectValuesBy = {};
311
311
  for (let i = 0, len = null == indicators ? void 0 : indicators.length; i < len; i++) if ("string" != typeof indicators[i] && indicators[i].chartSpec) {
312
312
  if ("pie" === (null === (_a = indicators[i].chartSpec) || void 0 === _a ? void 0 : _a.type)) continue;
313
- if (!1 === this.options.indicatorsAsCol) {
314
- const indicatorDefine = indicators[i];
315
- 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),
316
- collectValuesBy[indicatorDefine.indicatorKey] = {
313
+ const indicatorDefine = indicators[i], indicatorSpec = indicatorDefine.chartSpec;
314
+ 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),
315
+ collectValuesBy[indicatorDefine.indicatorKey] = {
316
+ by: rowKeys,
317
+ range: !0,
318
+ sumBy: (null == indicatorSpec ? void 0 : indicatorSpec.stack) && columnKeys.concat(null == indicatorSpec ? void 0 : indicatorSpec.xField)
319
+ }, indicatorSpec.series) indicatorSpec.series.forEach((chartSeries => {
320
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
321
+ const xField = "string" == typeof chartSeries.xField ? chartSeries.xField : chartSeries.xField[0];
322
+ collectValuesBy[xField] = {
323
+ by: columnKeys,
324
+ type: "horizontal" !== chartSeries.direction ? "xField" : void 0,
325
+ range: "horizontal" === chartSeries.direction,
326
+ 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
327
+ };
328
+ const yField = chartSeries.yField;
329
+ !1 !== chartSeries.stack && ("bar" === chartSeries.type || "area" === chartSeries.type) && (chartSeries.stack = !0),
330
+ collectValuesBy[yField] = {
317
331
  by: rowKeys,
318
- range: !0,
319
- 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)
320
- }, indicatorDefine.chartSpec.series) indicatorDefine.chartSpec.series.forEach((chartSeries => {
321
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
322
- const xField = "string" == typeof chartSeries.xField ? chartSeries.xField : chartSeries.xField[0];
323
- collectValuesBy[xField] = {
324
- by: columnKeys,
325
- type: "horizontal" !== chartSeries.direction ? "xField" : void 0,
326
- range: "horizontal" === chartSeries.direction,
327
- 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
328
- };
329
- const yField = chartSeries.yField;
330
- !1 !== chartSeries.stack && ("bar" === chartSeries.type || "area" === chartSeries.type) && (chartSeries.stack = !0),
331
- collectValuesBy[yField] = {
332
- by: rowKeys,
333
- range: "horizontal" !== chartSeries.direction,
334
- sumBy: chartSeries.stack && columnKeys.concat(null == chartSeries ? void 0 : chartSeries.xField),
335
- 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
336
- };
337
- })); else {
338
- const xField = "string" == typeof indicatorDefine.chartSpec.xField ? indicatorDefine.chartSpec.xField : indicatorDefine.chartSpec.xField[0];
339
- collectValuesBy[xField] = {
340
- by: columnKeys,
341
- type: "horizontal" !== indicatorDefine.chartSpec.direction ? "xField" : void 0,
342
- range: "horizontal" === indicatorDefine.chartSpec.direction,
343
- 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
344
- }, !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);
345
- const yField = indicatorDefine.chartSpec.yField;
346
- collectValuesBy[yField] = {
347
- by: rowKeys,
348
- range: "horizontal" !== indicators[i].chartSpec.direction,
349
- sumBy: indicatorDefine.chartSpec.stack && columnKeys.concat(null === (_p = indicatorDefine.chartSpec) || void 0 === _p ? void 0 : _p.xField),
350
- 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
351
- };
352
- }
332
+ range: "horizontal" !== chartSeries.direction,
333
+ sumBy: chartSeries.stack && columnKeys.concat(null == chartSeries ? void 0 : chartSeries.xField),
334
+ 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,
335
+ extendRange: (0, tableHelper_1.parseMarkLineGetExtendRange)(indicatorSpec.markLine)
336
+ };
337
+ })); else {
338
+ const xField = "string" == typeof indicatorSpec.xField ? indicatorSpec.xField : indicatorSpec.xField[0];
339
+ collectValuesBy[xField] = {
340
+ by: columnKeys,
341
+ type: "horizontal" !== indicatorSpec.direction ? "xField" : void 0,
342
+ range: "horizontal" === indicatorSpec.direction,
343
+ sortBy: "horizontal" !== indicatorSpec.direction ? null === (_d = null === (_c = null === (_b = null == indicatorSpec ? void 0 : indicatorSpec.data) || void 0 === _b ? void 0 : _b.fields) || void 0 === _c ? void 0 : _c[xField]) || void 0 === _d ? void 0 : _d.domain : void 0
344
+ }, !1 !== (null == indicatorSpec ? void 0 : indicatorSpec.stack) && ("bar" === (null == indicatorSpec ? void 0 : indicatorSpec.type) || "area" === (null == indicatorSpec ? void 0 : indicatorSpec.type)) && (indicatorSpec.stack = !0);
345
+ const yField = indicatorSpec.yField;
346
+ collectValuesBy[yField] = {
347
+ by: rowKeys,
348
+ range: "horizontal" !== indicatorSpec.direction,
349
+ sumBy: indicatorSpec.stack && columnKeys.concat(null == indicatorSpec ? void 0 : indicatorSpec.xField),
350
+ sortBy: "horizontal" === indicatorSpec.direction ? 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,
351
+ extendRange: (0, tableHelper_1.parseMarkLineGetExtendRange)(indicatorSpec.markLine)
352
+ };
353
353
  } else {
354
354
  const indicatorDefine = indicators[i];
355
- 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),
355
+ 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),
356
356
  collectValuesBy[indicatorDefine.indicatorKey] = {
357
357
  by: columnKeys,
358
358
  range: !0,
359
- 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)
360
- }, indicatorDefine.chartSpec.series) indicatorDefine.chartSpec.series.forEach((chartSeries => {
361
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
359
+ sumBy: (null == indicatorSpec ? void 0 : indicatorSpec.stack) && rowKeys.concat(null == indicatorSpec ? void 0 : indicatorSpec.yField)
360
+ }, indicatorSpec.series) indicatorSpec.series.forEach((chartSeries => {
361
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
362
362
  const yField = "string" == typeof chartSeries.yField ? chartSeries.yField : chartSeries.yField[0];
363
363
  collectValuesBy[yField] = {
364
364
  by: rowKeys,
365
365
  type: "horizontal" === chartSeries.direction ? "yField" : void 0,
366
366
  range: "horizontal" !== chartSeries.direction,
367
- 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
367
+ 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
368
368
  };
369
369
  const xField = chartSeries.xField;
370
370
  !1 !== chartSeries.stack && ("bar" === chartSeries.type || "area" === chartSeries.type) && (chartSeries.stack = !0),
@@ -372,22 +372,24 @@ class PivotChart extends BaseTable_1.BaseTable {
372
372
  by: columnKeys,
373
373
  range: "horizontal" === chartSeries.direction,
374
374
  sumBy: chartSeries.stack && rowKeys.concat(null == chartSeries ? void 0 : chartSeries.yField),
375
- 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
375
+ 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,
376
+ extendRange: (0, tableHelper_1.parseMarkLineGetExtendRange)(indicatorSpec.markLine)
376
377
  };
377
378
  })); else {
378
- const yField = "string" == typeof indicatorDefine.chartSpec.yField ? indicatorDefine.chartSpec.yField : indicatorDefine.chartSpec.yField[0];
379
+ const yField = "string" == typeof indicatorSpec.yField ? indicatorSpec.yField : indicatorSpec.yField[0];
379
380
  collectValuesBy[yField] = {
380
381
  by: rowKeys,
381
- type: "horizontal" === indicatorDefine.chartSpec.direction ? "yField" : void 0,
382
- range: "horizontal" !== indicatorDefine.chartSpec.direction,
383
- 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
384
- }, !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);
385
- const xField = indicatorDefine.chartSpec.xField;
382
+ type: "horizontal" === indicatorSpec.direction ? "yField" : void 0,
383
+ range: "horizontal" !== indicatorSpec.direction,
384
+ sortBy: "horizontal" === indicatorSpec.direction ? null === (_k = null === (_j = null === (_h = null == indicatorSpec ? void 0 : indicatorSpec.data) || void 0 === _h ? void 0 : _h.fields) || void 0 === _j ? void 0 : _j[yField]) || void 0 === _k ? void 0 : _k.domain : void 0
385
+ }, !1 !== (null == indicatorSpec ? void 0 : indicatorSpec.stack) && ("bar" === (null == indicatorSpec ? void 0 : indicatorSpec.type) || "area" === (null == indicatorSpec ? void 0 : indicatorSpec.type)) && (indicatorSpec.stack = !0);
386
+ const xField = indicatorSpec.xField;
386
387
  collectValuesBy[xField] = {
387
388
  by: columnKeys,
388
- range: "horizontal" === indicators[i].chartSpec.direction,
389
- sumBy: indicatorDefine.chartSpec.stack && rowKeys.concat(null === (_6 = indicatorDefine.chartSpec) || void 0 === _6 ? void 0 : _6.yField),
390
- 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
389
+ range: "horizontal" === indicatorSpec.direction,
390
+ sumBy: indicatorSpec.stack && rowKeys.concat(null == indicatorSpec ? void 0 : indicatorSpec.yField),
391
+ sortBy: "horizontal" !== indicatorSpec.direction ? null === (_o = null === (_m = null === (_l = null == indicatorSpec ? void 0 : indicatorSpec.data) || void 0 === _l ? void 0 : _l.fields) || void 0 === _m ? void 0 : _m[xField]) || void 0 === _o ? void 0 : _o.domain : void 0,
392
+ extendRange: (0, tableHelper_1.parseMarkLineGetExtendRange)(indicatorSpec.markLine)
391
393
  };
392
394
  }
393
395
  }