@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.
Files changed (167) hide show
  1. package/cjs/ListTable.js +5 -3
  2. package/cjs/ListTable.js.map +1 -1
  3. package/cjs/PivotChart.js +27 -25
  4. package/cjs/PivotChart.js.map +1 -1
  5. package/cjs/PivotTable.js +89 -43
  6. package/cjs/PivotTable.js.map +1 -1
  7. package/cjs/core/BaseTable.d.ts +1 -0
  8. package/cjs/core/BaseTable.js +62 -16
  9. package/cjs/core/BaseTable.js.map +1 -1
  10. package/cjs/core/TABLE_EVENT_TYPE.d.ts +3 -1
  11. package/cjs/core/TABLE_EVENT_TYPE.js +3 -0
  12. package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
  13. package/cjs/dataset/dataset.d.ts +1 -0
  14. package/cjs/dataset/dataset.js +15 -1
  15. package/cjs/dataset/dataset.js.map +1 -1
  16. package/cjs/dataset/flatDataToObject.d.ts +8 -3
  17. package/cjs/dataset/flatDataToObject.js +39 -8
  18. package/cjs/dataset/flatDataToObject.js.map +1 -1
  19. package/cjs/edit/edit-manager.js +0 -2
  20. package/cjs/edit/edit-manager.js.map +1 -1
  21. package/cjs/event/event.d.ts +2 -0
  22. package/cjs/event/event.js +12 -2
  23. package/cjs/event/event.js.map +1 -1
  24. package/cjs/event/listener/container-dom.js +5 -2
  25. package/cjs/event/listener/container-dom.js.map +1 -1
  26. package/cjs/event/listener/scroll-bar.js +8 -0
  27. package/cjs/event/listener/scroll-bar.js.map +1 -1
  28. package/cjs/event/listener/table-group.js +23 -8
  29. package/cjs/event/listener/table-group.js.map +1 -1
  30. package/cjs/index.d.ts +1 -1
  31. package/cjs/index.js +1 -1
  32. package/cjs/index.js.map +1 -1
  33. package/cjs/layout/chart-helper/get-axis-config.js +21 -13
  34. package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
  35. package/cjs/layout/chart-helper/get-chart-spec.js +15 -13
  36. package/cjs/layout/chart-helper/get-chart-spec.js.map +1 -1
  37. package/cjs/layout/pivot-header-layout.d.ts +1 -0
  38. package/cjs/layout/pivot-header-layout.js +16 -4
  39. package/cjs/layout/pivot-header-layout.js.map +1 -1
  40. package/cjs/scenegraph/component/table-component.d.ts +8 -0
  41. package/cjs/scenegraph/component/table-component.js +180 -2
  42. package/cjs/scenegraph/component/table-component.js.map +1 -1
  43. package/cjs/scenegraph/component/util.d.ts +1 -0
  44. package/cjs/scenegraph/component/util.js +8 -2
  45. package/cjs/scenegraph/component/util.js.map +1 -1
  46. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +18 -9
  47. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  48. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +5 -5
  49. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
  50. package/cjs/scenegraph/group-creater/progress/proxy.js +4 -2
  51. package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
  52. package/cjs/scenegraph/layout/frozen.js +4 -2
  53. package/cjs/scenegraph/layout/frozen.js.map +1 -1
  54. package/cjs/scenegraph/scenegraph.d.ts +7 -0
  55. package/cjs/scenegraph/scenegraph.js +42 -19
  56. package/cjs/scenegraph/scenegraph.js.map +1 -1
  57. package/cjs/scenegraph/select/update-select-border.js +4 -4
  58. package/cjs/scenegraph/select/update-select-border.js.map +1 -1
  59. package/cjs/state/cell-move/index.js +2 -1
  60. package/cjs/state/cell-move/index.js.map +1 -1
  61. package/cjs/state/resize/update-resize-column.js +4 -3
  62. package/cjs/state/resize/update-resize-column.js.map +1 -1
  63. package/cjs/state/resize/update-resize-row.d.ts +2 -0
  64. package/cjs/state/resize/update-resize-row.js +63 -0
  65. package/cjs/state/resize/update-resize-row.js.map +1 -0
  66. package/cjs/state/state.d.ts +11 -1
  67. package/cjs/state/state.js +29 -4
  68. package/cjs/state/state.js.map +1 -1
  69. package/cjs/tools/global.d.ts +1 -0
  70. package/cjs/tools/global.js +2 -2
  71. package/cjs/tools/global.js.map +1 -1
  72. package/cjs/ts-types/base-table.d.ts +7 -0
  73. package/cjs/ts-types/base-table.js.map +1 -1
  74. package/cjs/ts-types/events.d.ts +11 -0
  75. package/cjs/ts-types/events.js.map +1 -1
  76. package/cjs/ts-types/pivot-table/dimension/basic-dimension.d.ts +6 -1
  77. package/cjs/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -1
  78. package/cjs/ts-types/pivot-table/indicator/basic-indicator.d.ts +3 -0
  79. package/cjs/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
  80. package/cjs/ts-types/table-engine.d.ts +5 -0
  81. package/cjs/ts-types/table-engine.js.map +1 -1
  82. package/cjs/vrender.js.map +1 -1
  83. package/dist/vtable.js +990 -136
  84. package/dist/vtable.min.js +2 -2
  85. package/es/ListTable.js +5 -3
  86. package/es/ListTable.js.map +1 -1
  87. package/es/PivotChart.js +27 -25
  88. package/es/PivotChart.js.map +1 -1
  89. package/es/PivotTable.js +89 -43
  90. package/es/PivotTable.js.map +1 -1
  91. package/es/core/BaseTable.d.ts +1 -0
  92. package/es/core/BaseTable.js +62 -17
  93. package/es/core/BaseTable.js.map +1 -1
  94. package/es/core/TABLE_EVENT_TYPE.d.ts +3 -1
  95. package/es/core/TABLE_EVENT_TYPE.js +3 -0
  96. package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
  97. package/es/dataset/dataset.d.ts +1 -0
  98. package/es/dataset/dataset.js +15 -1
  99. package/es/dataset/dataset.js.map +1 -1
  100. package/es/dataset/flatDataToObject.d.ts +8 -3
  101. package/es/dataset/flatDataToObject.js +38 -8
  102. package/es/dataset/flatDataToObject.js.map +1 -1
  103. package/es/edit/edit-manager.js +0 -2
  104. package/es/edit/edit-manager.js.map +1 -1
  105. package/es/event/event.d.ts +2 -0
  106. package/es/event/event.js +12 -2
  107. package/es/event/event.js.map +1 -1
  108. package/es/event/listener/container-dom.js +5 -2
  109. package/es/event/listener/container-dom.js.map +1 -1
  110. package/es/event/listener/scroll-bar.js +8 -0
  111. package/es/event/listener/scroll-bar.js.map +1 -1
  112. package/es/event/listener/table-group.js +23 -8
  113. package/es/event/listener/table-group.js.map +1 -1
  114. package/es/index.d.ts +1 -1
  115. package/es/index.js +1 -1
  116. package/es/index.js.map +1 -1
  117. package/es/layout/chart-helper/get-axis-config.js +21 -12
  118. package/es/layout/chart-helper/get-axis-config.js.map +1 -1
  119. package/es/layout/chart-helper/get-chart-spec.js +15 -13
  120. package/es/layout/chart-helper/get-chart-spec.js.map +1 -1
  121. package/es/layout/pivot-header-layout.d.ts +1 -0
  122. package/es/layout/pivot-header-layout.js +12 -2
  123. package/es/layout/pivot-header-layout.js.map +1 -1
  124. package/es/scenegraph/component/table-component.d.ts +8 -0
  125. package/es/scenegraph/component/table-component.js +181 -3
  126. package/es/scenegraph/component/table-component.js.map +1 -1
  127. package/es/scenegraph/component/util.d.ts +1 -0
  128. package/es/scenegraph/component/util.js +7 -1
  129. package/es/scenegraph/component/util.js.map +1 -1
  130. package/es/scenegraph/graphic/contributions/group-contribution-render.js +18 -9
  131. package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  132. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +5 -4
  133. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
  134. package/es/scenegraph/group-creater/progress/proxy.js +4 -2
  135. package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
  136. package/es/scenegraph/layout/frozen.js +4 -2
  137. package/es/scenegraph/layout/frozen.js.map +1 -1
  138. package/es/scenegraph/scenegraph.d.ts +7 -0
  139. package/es/scenegraph/scenegraph.js +44 -19
  140. package/es/scenegraph/scenegraph.js.map +1 -1
  141. package/es/scenegraph/select/update-select-border.js +4 -4
  142. package/es/scenegraph/select/update-select-border.js.map +1 -1
  143. package/es/state/cell-move/index.js +2 -1
  144. package/es/state/cell-move/index.js.map +1 -1
  145. package/es/state/resize/update-resize-column.js +4 -3
  146. package/es/state/resize/update-resize-column.js.map +1 -1
  147. package/es/state/resize/update-resize-row.d.ts +2 -0
  148. package/es/state/resize/update-resize-row.js +57 -0
  149. package/es/state/resize/update-resize-row.js.map +1 -0
  150. package/es/state/state.d.ts +11 -1
  151. package/es/state/state.js +30 -3
  152. package/es/state/state.js.map +1 -1
  153. package/es/tools/global.d.ts +1 -0
  154. package/es/tools/global.js +2 -0
  155. package/es/tools/global.js.map +1 -1
  156. package/es/ts-types/base-table.d.ts +7 -0
  157. package/es/ts-types/base-table.js.map +1 -1
  158. package/es/ts-types/events.d.ts +11 -0
  159. package/es/ts-types/events.js.map +1 -1
  160. package/es/ts-types/pivot-table/dimension/basic-dimension.d.ts +6 -1
  161. package/es/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -1
  162. package/es/ts-types/pivot-table/indicator/basic-indicator.d.ts +3 -0
  163. package/es/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
  164. package/es/ts-types/table-engine.d.ts +5 -0
  165. package/es/ts-types/table-engine.js.map +1 -1
  166. package/es/vrender.js.map +1 -1
  167. 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 !== (_e = null === (_d = options.rows) || void 0 === _d ? void 0 : _d.reduce(((keys, rowObj) => ("string" == typeof rowObj ? keys.push(rowObj) : keys.push(rowObj.dimensionKey),
26
- keys)), [])) && void 0 !== _e ? _e : [], columnKeys = null !== (_g = null === (_f = options.columns) || void 0 === _f ? void 0 : _f.reduce(((keys, columnObj) => ("string" == typeof columnObj ? keys.push(columnObj) : keys.push(columnObj.dimensionKey),
27
- keys)), [])) && void 0 !== _g ? _g : [], indicatorKeys = null !== (_j = null === (_h = options.indicators) || void 0 === _h ? void 0 : _h.reduce(((keys, indicatorObj) => ("string" == typeof indicatorObj ? keys.push(indicatorObj) : keys.push(indicatorObj.indicatorKey),
28
- keys)), [])) && void 0 !== _j ? _j : [];
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 === (_k = options.indicatorsAsCol) || void 0 === _k || _k, options.records, void 0, this.internalProps.columnTree, this.internalProps.rowTree, !0),
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 !== (_f = null === (_e = options.rows) || void 0 === _e ? void 0 : _e.reduce(((keys, rowObj) => ("string" == typeof rowObj ? keys.push(rowObj) : keys.push(rowObj.dimensionKey),
79
- 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),
80
- 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),
81
- keys)), [])) && void 0 !== _k ? _k : [];
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 === (_l = options.indicatorsAsCol) || void 0 === _l || _l, null !== (_m = options.records) && void 0 !== _m ? _m : this.internalProps.records, void 0, this.internalProps.columnTree, this.internalProps.rowTree, !0),
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 === (_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
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 === (_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,
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 === (_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
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 === (_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,
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
  }