@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/dist/vtable.js CHANGED
@@ -35210,6 +35210,63 @@
35210
35210
  }
35211
35211
  return 0;
35212
35212
  }
35213
+ function parseMarkLineGetExtendRange(markLine) {
35214
+ if (markLine) {
35215
+ if (Array.isArray(markLine)) {
35216
+ let extendRange;
35217
+ for (let i = 0; i < markLine.length; i++) {
35218
+ if (markLine[i].autoRange) {
35219
+ if (markLine[i].y === 'sum' ||
35220
+ markLine[i].x === 'sum' ||
35221
+ markLine[i].y1 === 'sum' ||
35222
+ markLine[i].x1 === 'sum') {
35223
+ return 'sum';
35224
+ }
35225
+ if (markLine[i].y === 'max' ||
35226
+ markLine[i].x === 'max' ||
35227
+ markLine[i].y1 === 'max' ||
35228
+ markLine[i].x1 === 'max') {
35229
+ extendRange = 'max';
35230
+ }
35231
+ if (typeof markLine[i].y === 'number' && typeof (extendRange ?? 0) === 'number') {
35232
+ extendRange = Math.max(extendRange ?? 0, markLine[i].y);
35233
+ }
35234
+ if (typeof markLine[i].x === 'number' && typeof (extendRange ?? 0) === 'number') {
35235
+ extendRange = Math.max(extendRange ?? 0, markLine[i].x);
35236
+ }
35237
+ if (typeof markLine[i].y1 === 'number' && typeof (extendRange ?? 0) === 'number') {
35238
+ extendRange = Math.max(extendRange ?? 0, markLine[i].y1);
35239
+ }
35240
+ if (typeof markLine[i].x1 === 'number' && typeof (extendRange ?? 0) === 'number') {
35241
+ extendRange = Math.max(extendRange ?? 0, markLine[i].x1);
35242
+ }
35243
+ }
35244
+ }
35245
+ return extendRange;
35246
+ }
35247
+ else if (markLine.autoRange) {
35248
+ if (markLine.y === 'sum' || markLine.x === 'sum' || markLine.y1 === 'sum' || markLine.x1 === 'sum') {
35249
+ return 'sum';
35250
+ }
35251
+ if (markLine.y === 'max' || markLine.x === 'max' || markLine.y1 === 'max' || markLine.x1 === 'max') {
35252
+ return 'max';
35253
+ }
35254
+ if (typeof markLine.y === 'number') {
35255
+ return markLine.y;
35256
+ }
35257
+ if (typeof markLine.x === 'number') {
35258
+ return markLine.x;
35259
+ }
35260
+ if (typeof markLine.y1 === 'number') {
35261
+ return markLine.y1;
35262
+ }
35263
+ if (typeof markLine.x1 === 'number') {
35264
+ return markLine.x1;
35265
+ }
35266
+ }
35267
+ }
35268
+ return undefined;
35269
+ }
35213
35270
 
35214
35271
  let Icon$1 = class Icon extends Image$2 {
35215
35272
  role;
@@ -36278,7 +36335,7 @@
36278
36335
  strokeArrayColor: cellTheme?.group?.strokeArrayColor ?? undefined,
36279
36336
  cursor: cellTheme?.group?.cursor ?? undefined,
36280
36337
  lineDash: cellTheme?.group?.lineDash ?? undefined,
36281
- lineCap: 'square',
36338
+ lineCap: 'butt',
36282
36339
  clip: true,
36283
36340
  cornerRadius: cellTheme.group.cornerRadius
36284
36341
  });
@@ -36983,7 +37040,7 @@
36983
37040
  strokeArrayColor: cellTheme?.group?.strokeArrayColor ?? undefined,
36984
37041
  cursor: cellTheme?.group?.cursor ?? undefined,
36985
37042
  lineDash: cellTheme?.group?.lineDash ?? undefined,
36986
- lineCap: 'square',
37043
+ lineCap: 'butt',
36987
37044
  clip: true,
36988
37045
  cornerRadius: cellTheme.group.cornerRadius
36989
37046
  });
@@ -37367,7 +37424,7 @@
37367
37424
  strokeArrayColor: cellTheme?.group?.strokeArrayColor ?? undefined,
37368
37425
  cursor: cellTheme?.group?.cursor ?? undefined,
37369
37426
  lineDash: cellTheme?.group?.lineDash ?? undefined,
37370
- lineCap: 'square',
37427
+ lineCap: 'butt',
37371
37428
  clip: true,
37372
37429
  cornerRadius: cellTheme.group.cornerRadius
37373
37430
  });
@@ -38125,7 +38182,7 @@
38125
38182
  strokeArrayColor: cellTheme?.group?.strokeArrayColor ?? undefined,
38126
38183
  cursor: cellTheme?.group?.cursor ?? undefined,
38127
38184
  lineDash: cellTheme?.group?.lineDash ?? undefined,
38128
- lineCap: 'square',
38185
+ lineCap: 'butt',
38129
38186
  clip: true,
38130
38187
  cornerRadius: cellTheme.group.cornerRadius
38131
38188
  });
@@ -38198,7 +38255,7 @@
38198
38255
  strokeArrayColor: cellTheme?.group?.strokeArrayColor ?? undefined,
38199
38256
  cursor: cellTheme?.group?.cursor ?? undefined,
38200
38257
  lineDash: cellTheme?.group?.lineDash ?? undefined,
38201
- lineCap: 'square',
38258
+ lineCap: 'butt',
38202
38259
  clip: true,
38203
38260
  cornerRadius: cellTheme.group.cornerRadius
38204
38261
  });
@@ -38300,7 +38357,7 @@
38300
38357
  strokeArrayColor: cellTheme?.group?.strokeArrayColor ?? undefined,
38301
38358
  cursor: cellTheme?.group?.cursor ?? undefined,
38302
38359
  lineDash: cellTheme?.group?.lineDash ?? undefined,
38303
- lineCap: 'square',
38360
+ lineCap: 'butt',
38304
38361
  clip: true,
38305
38362
  cornerRadius: cellTheme.group.cornerRadius
38306
38363
  });
@@ -41891,7 +41948,7 @@
41891
41948
  rectAttributes.stroke = getStroke(borderColor, strokeArray);
41892
41949
  rectAttributes.lineWidth = borderLineWidth;
41893
41950
  borderLineDash && (rectAttributes.lineDash = borderLineDash);
41894
- rectAttributes.lineCap = 'square';
41951
+ rectAttributes.lineCap = 'butt';
41895
41952
  }
41896
41953
  if (Array.isArray(borderColor)) {
41897
41954
  rectAttributes.strokeArrayColor = getQuadProps(borderColor);
@@ -47345,7 +47402,7 @@
47345
47402
  rectAttributes.stroke = getStroke(borderColor, undefined);
47346
47403
  rectAttributes.lineWidth = borderLineWidth;
47347
47404
  borderLineDash && (rectAttributes.lineDash = borderLineDash);
47348
- rectAttributes.lineCap = 'square';
47405
+ rectAttributes.lineCap = 'butt';
47349
47406
  if (Array.isArray(borderColor)) {
47350
47407
  rectAttributes.strokeArrayColor = getQuadProps(borderColor);
47351
47408
  }
@@ -51174,7 +51231,7 @@
51174
51231
  }
51175
51232
  return;
51176
51233
  }
51177
- else if (table.eventManager.isDraging) {
51234
+ else if (table.eventManager.isDraging && stateManager.isSelecting()) {
51178
51235
  eventManager.dealTableSelect(eventArgsSet, true);
51179
51236
  }
51180
51237
  if (stateManager.isResizeCol() || eventManager.checkColumnResize(eventArgsSet)) {
@@ -51293,11 +51350,21 @@
51293
51350
  }
51294
51351
  }
51295
51352
  });
51353
+ table.scenegraph.tableGroup.addEventListener('pointerenter', (e) => {
51354
+ if (table.theme.scrollStyle.visible === 'focus') {
51355
+ stateManager.showHorizontalScrollBar();
51356
+ stateManager.showVerticalScrollBar();
51357
+ }
51358
+ });
51296
51359
  table.scenegraph.tableGroup.addEventListener('pointerleave', (e) => {
51297
51360
  if (!stateManager.isResizeCol() && !stateManager.isMoveCol() && !stateManager.isSelecting()) {
51298
51361
  stateManager.updateInteractionState(InteractionState.default);
51299
51362
  stateManager.updateCursor();
51300
51363
  }
51364
+ if (table.theme.scrollStyle.visible === 'focus') {
51365
+ stateManager.hideHorizontalScrollBar();
51366
+ stateManager.hideVerticalScrollBar();
51367
+ }
51301
51368
  if (table.hasListeners(TABLE_EVENT_TYPE.MOUSELEAVE_CELL)) {
51302
51369
  if (table.stateManager.hover.cellPos.col !== -1 && table.stateManager.hover.cellPos.row !== -1) {
51303
51370
  table.fireListeners(TABLE_EVENT_TYPE.MOUSELEAVE_CELL, {
@@ -51618,7 +51685,7 @@
51618
51685
  stateManager.updateCursor();
51619
51686
  table.scenegraph.updateChartState(null);
51620
51687
  }
51621
- else if (table.eventManager.isDraging) {
51688
+ else if (table.eventManager.isDraging && stateManager.isSelecting()) {
51622
51689
  stateManager.endSelectCells();
51623
51690
  }
51624
51691
  });
@@ -56250,7 +56317,7 @@
56250
56317
  return TABLE_EVENT_TYPE;
56251
56318
  }
56252
56319
  options;
56253
- version = "0.23.1";
56320
+ version = "0.23.2-alpha.0";
56254
56321
  pagination;
56255
56322
  id = `VTable${Date.now()}`;
56256
56323
  headerStyleCache;
@@ -65229,9 +65296,24 @@
65229
65296
  for (const field in this.collectedValues) {
65230
65297
  if (this.collectValuesBy[field]?.sumBy) {
65231
65298
  for (const byKeys in this.collectedValues[field]) {
65232
- const max = Object.values(this.collectedValues[field][byKeys]).reduce((acc, cur) => {
65233
- return cur.value() > acc ? cur.value() : acc;
65234
- }, Number.MIN_SAFE_INTEGER);
65299
+ let max;
65300
+ if (this.collectValuesBy[field]?.extendRange === 'sum') {
65301
+ max = Object.values(this.collectedValues[field][byKeys]).reduce((acc, cur) => {
65302
+ return acc + cur.value();
65303
+ }, 0);
65304
+ max += Math.round(max / 20);
65305
+ }
65306
+ else {
65307
+ max = Object.values(this.collectedValues[field][byKeys]).reduce((acc, cur) => {
65308
+ return cur.value() > acc ? cur.value() : acc;
65309
+ }, Number.MIN_SAFE_INTEGER);
65310
+ if (this.collectValuesBy[field]?.extendRange === 'max') {
65311
+ max += Math.round(max / 20);
65312
+ }
65313
+ else if (typeof this.collectValuesBy[field]?.extendRange === 'number') {
65314
+ max = Math.max(max, this.collectValuesBy[field]?.extendRange);
65315
+ }
65316
+ }
65235
65317
  const min = Object.values(this.collectedValues[field][byKeys]).reduce((acc, cur) => {
65236
65318
  return cur.value() < acc ? cur.value() : acc;
65237
65319
  }, Number.MAX_SAFE_INTEGER);
@@ -67565,28 +67647,26 @@
67565
67647
  if (indicators[i].chartSpec?.type === 'pie') {
67566
67648
  continue;
67567
67649
  }
67650
+ const indicatorDefine = indicators[i];
67651
+ const indicatorSpec = indicatorDefine.chartSpec;
67568
67652
  if (this.options.indicatorsAsCol === false) {
67569
- const indicatorDefine = indicators[i];
67570
- indicatorDefine.chartSpec?.stack !== false &&
67571
- (indicatorDefine.chartSpec?.type === 'bar' ||
67572
- indicatorDefine.chartSpec?.type === 'area') &&
67573
- (indicatorDefine.chartSpec.stack = true);
67653
+ indicatorSpec?.stack !== false &&
67654
+ (indicatorSpec?.type === 'bar' || indicatorSpec?.type === 'area') &&
67655
+ (indicatorSpec.stack = true);
67574
67656
  collectValuesBy[indicatorDefine.indicatorKey] = {
67575
67657
  by: rowKeys,
67576
67658
  range: true,
67577
- sumBy: indicatorDefine.chartSpec?.stack &&
67578
- columnKeys.concat(indicatorDefine.chartSpec?.xField)
67659
+ sumBy: indicatorSpec?.stack && columnKeys.concat(indicatorSpec?.xField)
67579
67660
  };
67580
- if (indicatorDefine.chartSpec.series) {
67581
- indicatorDefine.chartSpec.series.forEach((chartSeries) => {
67661
+ if (indicatorSpec.series) {
67662
+ indicatorSpec.series.forEach((chartSeries) => {
67582
67663
  const xField = typeof chartSeries.xField === 'string' ? chartSeries.xField : chartSeries.xField[0];
67583
67664
  collectValuesBy[xField] = {
67584
67665
  by: columnKeys,
67585
67666
  type: chartSeries.direction !== 'horizontal' ? 'xField' : undefined,
67586
67667
  range: chartSeries.direction === 'horizontal',
67587
67668
  sortBy: chartSeries.direction !== 'horizontal'
67588
- ? chartSeries?.data?.fields?.[xField]?.domain ??
67589
- indicatorDefine.chartSpec?.data?.fields?.[xField]?.domain
67669
+ ? chartSeries?.data?.fields?.[xField]?.domain ?? indicatorSpec?.data?.fields?.[xField]?.domain
67590
67670
  : undefined
67591
67671
  };
67592
67672
  const yField = chartSeries.yField;
@@ -67598,62 +67678,52 @@
67598
67678
  range: chartSeries.direction !== 'horizontal',
67599
67679
  sumBy: chartSeries.stack && columnKeys.concat(chartSeries?.xField),
67600
67680
  sortBy: chartSeries.direction === 'horizontal'
67601
- ? chartSeries?.data?.fields?.[yField]?.domain ??
67602
- indicatorDefine.chartSpec?.data?.fields?.[yField]?.domain
67603
- : undefined
67681
+ ? chartSeries?.data?.fields?.[yField]?.domain ?? indicatorSpec?.data?.fields?.[yField]?.domain
67682
+ : undefined,
67683
+ extendRange: parseMarkLineGetExtendRange(indicatorSpec.markLine)
67604
67684
  };
67605
67685
  });
67606
67686
  }
67607
67687
  else {
67608
- const xField = typeof indicatorDefine.chartSpec.xField === 'string'
67609
- ? indicatorDefine.chartSpec.xField
67610
- : indicatorDefine.chartSpec.xField[0];
67688
+ const xField = typeof indicatorSpec.xField === 'string' ? indicatorSpec.xField : indicatorSpec.xField[0];
67611
67689
  collectValuesBy[xField] = {
67612
67690
  by: columnKeys,
67613
- type: indicatorDefine.chartSpec.direction !== 'horizontal' ? 'xField' : undefined,
67614
- range: indicatorDefine.chartSpec.direction === 'horizontal',
67615
- sortBy: indicatorDefine.chartSpec.direction !== 'horizontal'
67616
- ? indicatorDefine.chartSpec?.data?.fields?.[xField]?.domain
67617
- : undefined
67691
+ type: indicatorSpec.direction !== 'horizontal' ? 'xField' : undefined,
67692
+ range: indicatorSpec.direction === 'horizontal',
67693
+ sortBy: indicatorSpec.direction !== 'horizontal' ? indicatorSpec?.data?.fields?.[xField]?.domain : undefined
67618
67694
  };
67619
- indicatorDefine.chartSpec?.stack !== false &&
67620
- (indicatorDefine.chartSpec?.type === 'bar' ||
67621
- indicatorDefine.chartSpec?.type === 'area') &&
67622
- (indicatorDefine.chartSpec.stack = true);
67623
- const yField = indicatorDefine.chartSpec.yField;
67695
+ indicatorSpec?.stack !== false &&
67696
+ (indicatorSpec?.type === 'bar' || indicatorSpec?.type === 'area') &&
67697
+ (indicatorSpec.stack = true);
67698
+ const yField = indicatorSpec.yField;
67624
67699
  collectValuesBy[yField] = {
67625
67700
  by: rowKeys,
67626
- range: indicators[i].chartSpec.direction !== 'horizontal',
67627
- sumBy: indicatorDefine.chartSpec.stack &&
67628
- columnKeys.concat(indicatorDefine.chartSpec?.xField),
67629
- sortBy: indicatorDefine.chartSpec.direction === 'horizontal'
67630
- ? indicatorDefine.chartSpec?.data?.fields?.[yField]?.domain
67631
- : undefined
67701
+ range: indicatorSpec.direction !== 'horizontal',
67702
+ sumBy: indicatorSpec.stack && columnKeys.concat(indicatorSpec?.xField),
67703
+ sortBy: indicatorSpec.direction === 'horizontal' ? indicatorSpec?.data?.fields?.[yField]?.domain : undefined,
67704
+ extendRange: parseMarkLineGetExtendRange(indicatorSpec.markLine)
67632
67705
  };
67633
67706
  }
67634
67707
  }
67635
67708
  else {
67636
67709
  const indicatorDefine = indicators[i];
67637
- indicatorDefine.chartSpec?.stack !== false &&
67638
- (indicatorDefine.chartSpec?.type === 'bar' ||
67639
- indicatorDefine.chartSpec?.type === 'area') &&
67640
- (indicatorDefine.chartSpec.stack = true);
67710
+ indicatorSpec?.stack !== false &&
67711
+ (indicatorSpec?.type === 'bar' || indicatorSpec?.type === 'area') &&
67712
+ (indicatorSpec.stack = true);
67641
67713
  collectValuesBy[indicatorDefine.indicatorKey] = {
67642
67714
  by: columnKeys,
67643
67715
  range: true,
67644
- sumBy: indicatorDefine.chartSpec?.stack &&
67645
- rowKeys.concat(indicatorDefine.chartSpec?.yField)
67716
+ sumBy: indicatorSpec?.stack && rowKeys.concat(indicatorSpec?.yField)
67646
67717
  };
67647
- if (indicatorDefine.chartSpec.series) {
67648
- indicatorDefine.chartSpec.series.forEach((chartSeries) => {
67718
+ if (indicatorSpec.series) {
67719
+ indicatorSpec.series.forEach((chartSeries) => {
67649
67720
  const yField = typeof chartSeries.yField === 'string' ? chartSeries.yField : chartSeries.yField[0];
67650
67721
  collectValuesBy[yField] = {
67651
67722
  by: rowKeys,
67652
67723
  type: chartSeries.direction === 'horizontal' ? 'yField' : undefined,
67653
67724
  range: chartSeries.direction !== 'horizontal',
67654
67725
  sortBy: chartSeries.direction === 'horizontal'
67655
- ? chartSeries?.data?.fields?.[yField]?.domain ??
67656
- indicatorDefine.chartSpec?.data?.fields?.[yField]?.domain
67726
+ ? chartSeries?.data?.fields?.[yField]?.domain ?? indicatorSpec?.data?.fields?.[yField]?.domain
67657
67727
  : undefined
67658
67728
  };
67659
67729
  const xField = chartSeries.xField;
@@ -67665,37 +67735,30 @@
67665
67735
  range: chartSeries.direction === 'horizontal',
67666
67736
  sumBy: chartSeries.stack && rowKeys.concat(chartSeries?.yField),
67667
67737
  sortBy: chartSeries.direction !== 'horizontal'
67668
- ? chartSeries?.data?.fields?.[xField]?.domain ??
67669
- indicatorDefine.chartSpec?.data?.fields?.[xField]?.domain
67670
- : undefined
67738
+ ? chartSeries?.data?.fields?.[xField]?.domain ?? indicatorSpec?.data?.fields?.[xField]?.domain
67739
+ : undefined,
67740
+ extendRange: parseMarkLineGetExtendRange(indicatorSpec.markLine)
67671
67741
  };
67672
67742
  });
67673
67743
  }
67674
67744
  else {
67675
- const yField = typeof indicatorDefine.chartSpec.yField === 'string'
67676
- ? indicatorDefine.chartSpec.yField
67677
- : indicatorDefine.chartSpec.yField[0];
67745
+ const yField = typeof indicatorSpec.yField === 'string' ? indicatorSpec.yField : indicatorSpec.yField[0];
67678
67746
  collectValuesBy[yField] = {
67679
67747
  by: rowKeys,
67680
- type: indicatorDefine.chartSpec.direction === 'horizontal' ? 'yField' : undefined,
67681
- range: indicatorDefine.chartSpec.direction !== 'horizontal',
67682
- sortBy: indicatorDefine.chartSpec.direction === 'horizontal'
67683
- ? indicatorDefine.chartSpec?.data?.fields?.[yField]?.domain
67684
- : undefined
67748
+ type: indicatorSpec.direction === 'horizontal' ? 'yField' : undefined,
67749
+ range: indicatorSpec.direction !== 'horizontal',
67750
+ sortBy: indicatorSpec.direction === 'horizontal' ? indicatorSpec?.data?.fields?.[yField]?.domain : undefined
67685
67751
  };
67686
- indicatorDefine.chartSpec?.stack !== false &&
67687
- (indicatorDefine.chartSpec?.type === 'bar' ||
67688
- indicatorDefine.chartSpec?.type === 'area') &&
67689
- (indicatorDefine.chartSpec.stack = true);
67690
- const xField = indicatorDefine.chartSpec.xField;
67752
+ indicatorSpec?.stack !== false &&
67753
+ (indicatorSpec?.type === 'bar' || indicatorSpec?.type === 'area') &&
67754
+ (indicatorSpec.stack = true);
67755
+ const xField = indicatorSpec.xField;
67691
67756
  collectValuesBy[xField] = {
67692
67757
  by: columnKeys,
67693
- range: indicators[i].chartSpec.direction === 'horizontal',
67694
- sumBy: indicatorDefine.chartSpec.stack &&
67695
- rowKeys.concat(indicatorDefine.chartSpec?.yField),
67696
- sortBy: indicatorDefine.chartSpec.direction !== 'horizontal'
67697
- ? indicatorDefine.chartSpec?.data?.fields?.[xField]?.domain
67698
- : undefined
67758
+ range: indicatorSpec.direction === 'horizontal',
67759
+ sumBy: indicatorSpec.stack && rowKeys.concat(indicatorSpec?.yField),
67760
+ sortBy: indicatorSpec.direction !== 'horizontal' ? indicatorSpec?.data?.fields?.[xField]?.domain : undefined,
67761
+ extendRange: parseMarkLineGetExtendRange(indicatorSpec.markLine)
67699
67762
  };
67700
67763
  }
67701
67764
  }
@@ -68488,7 +68551,7 @@
68488
68551
  }
68489
68552
 
68490
68553
  registerForVrender();
68491
- const version = "0.23.1";
68554
+ const version = "0.23.2-alpha.0";
68492
68555
  function getIcons() {
68493
68556
  return get$2();
68494
68557
  }