@visactor/vtable-gantt 1.22.11-alpha.4 → 1.22.11-alpha.6

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.
@@ -38455,6 +38455,24 @@
38455
38455
  }, delay));
38456
38456
  };
38457
38457
  }
38458
+ function cancellableThrottle(func, delay) {
38459
+ let timer = null,
38460
+ lastArgs = null,
38461
+ context = null;
38462
+ return {
38463
+ throttled: function (...args) {
38464
+ lastArgs = args, context = this, timer || (timer = setTimeout(() => {
38465
+ lastArgs && func.apply(context, lastArgs), timer = null, lastArgs = null, context = null;
38466
+ }, delay));
38467
+ },
38468
+ cancel: () => {
38469
+ timer && (clearTimeout(timer), timer = null, lastArgs = null, context = null);
38470
+ },
38471
+ flush: () => {
38472
+ timer && lastArgs && (clearTimeout(timer), func.apply(context, lastArgs), timer = null, lastArgs = null, context = null);
38473
+ }
38474
+ };
38475
+ }
38458
38476
  function pad(num, totalChars) {
38459
38477
  for (num = `${num}`; num.length < totalChars;) num = "0" + num;
38460
38478
  return num;
@@ -39738,6 +39756,9 @@
39738
39756
  var _a;
39739
39757
  return null !== (_a = defaultStyle.textAlign) && void 0 !== _a ? _a : "left";
39740
39758
  },
39759
+ get textStickBaseOnAlign() {
39760
+ return defaultStyle.textStickBaseOnAlign;
39761
+ },
39741
39762
  get textBaseline() {
39742
39763
  var _a;
39743
39764
  return null !== (_a = defaultStyle.textBaseline) && void 0 !== _a ? _a : "middle";
@@ -40421,6 +40442,9 @@
40421
40442
  get textStick() {
40422
40443
  return style.textStick;
40423
40444
  },
40445
+ get textStickBaseOnAlign() {
40446
+ return style.textStickBaseOnAlign;
40447
+ },
40424
40448
  get marked() {
40425
40449
  return style.marked;
40426
40450
  },
@@ -47588,11 +47612,35 @@
47588
47612
  return hoverMode;
47589
47613
  }
47590
47614
 
47615
+ let brushingChartInstance,
47616
+ brushingChartInstanceCellPos = {
47617
+ col: -1,
47618
+ row: -1
47619
+ };
47620
+ function setBrushingChartInstance(chartInstance, col, row) {
47621
+ brushingChartInstance = chartInstance, brushingChartInstanceCellPos = {
47622
+ col: col,
47623
+ row: row
47624
+ };
47625
+ }
47626
+ function clearBrushingChartInstance() {
47627
+ brushingChartInstance = void 0, brushingChartInstanceCellPos = {
47628
+ col: -1,
47629
+ row: -1
47630
+ };
47631
+ }
47632
+ function getBrushingChartInstance() {
47633
+ return brushingChartInstance;
47634
+ }
47635
+ function getBrushingChartInstanceCellPos() {
47636
+ return brushingChartInstanceCellPos;
47637
+ }
47591
47638
  const chartInstanceListColumnByColumnDirection = {};
47592
47639
  const chartInstanceListRowByRowDirection = {};
47640
+ const delayRunDimensionHoverTimer = [];
47593
47641
  function generateChartInstanceListByColumnDirection(col, dimensionValueOrXValue, positionValueOrYValue, canvasXY, table, hideTooltip = !1, isScatter = !1) {
47594
47642
  var _a;
47595
- isValid$1(chartInstanceListColumnByColumnDirection[col]) || (chartInstanceListColumnByColumnDirection[col] = {});
47643
+ clearDelayRunDimensionHoverTimers(), isValid$1(chartInstanceListColumnByColumnDirection[col]) || (chartInstanceListColumnByColumnDirection[col] = {});
47596
47644
  const {
47597
47645
  rowStart: rowStart
47598
47646
  } = table.getBodyVisibleRowRange();
@@ -47601,76 +47649,40 @@
47601
47649
  for (let i = rowStart; i <= rowEnd; i++) {
47602
47650
  const cellGroup = table.scenegraph.getCell(col, i),
47603
47651
  chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
47604
- chartNode.addUpdateShapeAndBoundsTag(), chartInstanceListColumnByColumnDirection[col][i] || isValid$1(chartNode) && (chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance), setTimeout(() => {
47605
- var _a, _b, _c, _d, _e, _f;
47652
+ chartInstanceListColumnByColumnDirection[col][i] || isValid$1(chartNode) && (chartNode.addUpdateShapeAndBoundsTag(), chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance);
47653
+ const timer = setTimeout(() => {
47654
+ var _a, _b, _c, _d;
47606
47655
  if (null === (_a = chartInstanceListColumnByColumnDirection[col]) || void 0 === _a ? void 0 : _a[i]) {
47607
47656
  const chartDimensionLinkage = table.options.chartDimensionLinkage;
47608
47657
  let isShowTooltip = !isScatter;
47609
- if (!isScatter && "object" == typeof chartDimensionLinkage) if (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, i === rowEnd && isShowTooltip) {
47610
- const heightLimitToShowTooltipForEdgeRow = null !== (_c = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow) && void 0 !== _c ? _c : 0,
47611
- {
47612
- rowEnd: rowEnd1
47613
- } = table.getBodyVisibleRowRange(0, -heightLimitToShowTooltipForEdgeRow);
47614
- if (rowEnd1 === rowEnd) isShowTooltip = !0;else {
47615
- const {
47616
- rowEnd: rowEnd2
47617
- } = table.getBodyVisibleRowRange(0, 5);
47618
- isShowTooltip = rowEnd2 !== rowEnd;
47619
- }
47620
- } else if (i === rowStart && isShowTooltip) {
47621
- const heightLimitToShowTooltipForEdgeRow = null !== (_d = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow) && void 0 !== _d ? _d : 0,
47622
- {
47623
- rowStart: rowStart1
47624
- } = table.getBodyVisibleRowRange(heightLimitToShowTooltipForEdgeRow, 0);
47625
- if (rowStart1 === rowStart) isShowTooltip = !0;else {
47626
- const {
47627
- rowStart: rowStart2
47628
- } = table.getBodyVisibleRowRange(0, -5);
47629
- isShowTooltip = rowStart2 !== rowStart;
47630
- }
47631
- }
47632
- if (isScatter) table.stateManager.hover.cellPos.col === col && table.stateManager.hover.cellPos.row === i || null === (_f = (_e = chartInstanceListColumnByColumnDirection[col][i]).showCrosshair) || void 0 === _f || _f.call(_e, axis => "left" === axis.layoutOrient ? positionValueOrYValue : dimensionValueOrXValue);else {
47633
- const bodyBoundryTop = table.frozenRowCount ? table.getCellRelativeRect(col, table.frozenRowCount - 1).bottom : 0,
47658
+ if (isScatter || "object" != typeof chartDimensionLinkage || (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, isShowTooltip = isShowTooltip && checkIsShowTooltipForEdgeRow(i, table)), isScatter) table.stateManager.hover.cellPos.col === col && table.stateManager.hover.cellPos.row === i || null === (_d = (_c = chartInstanceListColumnByColumnDirection[col][i]).showCrosshair) || void 0 === _d || _d.call(_c, axis => "left" === axis.layoutOrient ? positionValueOrYValue : dimensionValueOrXValue);else {
47659
+ const cellBoundry = table.getCellRelativeRect(col, i),
47660
+ bodyBoundryTop = table.frozenRowCount ? table.getCellRelativeRect(col, table.frozenRowCount - 1).bottom : 0,
47634
47661
  absolutePositionTop = Math.max(bodyBoundryTop, table.getCellRelativeRect(col, i).top);
47635
47662
  hideTooltip ? (table.stateManager.hover.cellPos.col === col && table.stateManager.hover.cellPos.row === i || chartInstanceListColumnByColumnDirection[col][i].hideTooltip(), chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
47636
47663
  tooltip: !1,
47637
47664
  showTooltipOption: {
47638
- x: canvasXY.x,
47639
- y: absolutePositionTop,
47665
+ x: canvasXY.x - cellBoundry.left,
47666
+ y: absolutePositionTop - cellBoundry.top,
47640
47667
  activeType: "dimension"
47641
47668
  }
47642
47669
  })) : chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
47643
47670
  tooltip: isShowTooltip,
47644
47671
  showTooltipOption: {
47645
- x: canvasXY.x,
47646
- y: absolutePositionTop,
47672
+ x: canvasXY.x - cellBoundry.left,
47673
+ y: absolutePositionTop - cellBoundry.top,
47647
47674
  activeType: "dimension"
47648
47675
  }
47649
47676
  });
47650
47677
  }
47651
47678
  }
47652
- }, 0), table.scenegraph.updateNextFrame();
47653
- }
47654
- }
47655
- function clearChartInstanceListByColumnDirection(col, excludedRow, table) {
47656
- var _a;
47657
- if (isValid$1(chartInstanceListColumnByColumnDirection[col])) {
47658
- for (const i in chartInstanceListColumnByColumnDirection[col]) {
47659
- if (isValid$1(excludedRow) && Number(i) === excludedRow) continue;
47660
- const cellGroup = table.scenegraph.getCell(col, Number(i)),
47661
- chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
47662
- chartNode.addUpdateShapeAndBoundsTag(), isValid$1(chartNode) && (chartNode.deactivate(table, {
47663
- releaseChartInstance: !0,
47664
- releaseColumnChartInstance: !1,
47665
- releaseRowChartInstance: !1
47666
- }), chartInstanceListColumnByColumnDirection[col][i] = null);
47667
- }
47668
- delete chartInstanceListColumnByColumnDirection[col];
47679
+ }, 0);
47680
+ delayRunDimensionHoverTimer.push(timer), table.scenegraph.updateNextFrame();
47669
47681
  }
47670
47682
  }
47671
47683
  function generateChartInstanceListByRowDirection(row, dimensionValueOrXValue, positionValueOrYValue, canvasXY, table, hideTooltip = !1, isScatter = !1) {
47672
47684
  var _a;
47673
- isValid$1(chartInstanceListRowByRowDirection[row]) || (chartInstanceListRowByRowDirection[row] = {});
47685
+ clearDelayRunDimensionHoverTimers(), isValid$1(chartInstanceListRowByRowDirection[row]) || (chartInstanceListRowByRowDirection[row] = {});
47674
47686
  const {
47675
47687
  colStart: colStart
47676
47688
  } = table.getBodyVisibleColRange();
@@ -47679,64 +47691,162 @@
47679
47691
  for (let i = colStart; i <= colEnd; i++) {
47680
47692
  const cellGroup = table.scenegraph.getCell(i, row),
47681
47693
  chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
47682
- chartNode.addUpdateShapeAndBoundsTag(), chartInstanceListRowByRowDirection[row][i] || isValid$1(chartNode) && (chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListRowByRowDirection[row][i] = chartNode.activeChartInstance), setTimeout(() => {
47694
+ chartInstanceListRowByRowDirection[row][i] || isValid$1(chartNode) && (chartNode.addUpdateShapeAndBoundsTag(), chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListRowByRowDirection[row][i] = chartNode.activeChartInstance);
47695
+ const timer = setTimeout(() => {
47683
47696
  var _a, _b, _c, _d;
47684
47697
  if (null === (_a = chartInstanceListRowByRowDirection[row]) || void 0 === _a ? void 0 : _a[i]) {
47685
47698
  const chartDimensionLinkage = table.options.chartDimensionLinkage;
47686
47699
  let isShowTooltip = !isScatter;
47687
- if (!isScatter && "object" == typeof chartDimensionLinkage) if (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, i === colEnd && isShowTooltip) {
47688
- const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
47689
- {
47690
- colEnd: colEnd1
47691
- } = table.getBodyVisibleColRange(0, -widthLimitToShowTooltipForEdgeColumn);
47692
- if (colEnd1 === colEnd) isShowTooltip = !0;else {
47693
- const {
47694
- colEnd: colEnd2
47695
- } = table.getBodyVisibleColRange(0, 5);
47696
- isShowTooltip = colEnd2 !== colEnd;
47697
- }
47698
- } else if (i === colStart && isShowTooltip) {
47699
- const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
47700
- {
47701
- colStart: colStart1
47702
- } = table.getBodyVisibleColRange(widthLimitToShowTooltipForEdgeColumn, 0);
47703
- if (colStart1 === colStart) isShowTooltip = !0;else {
47704
- const {
47705
- colStart: colStart2
47706
- } = table.getBodyVisibleColRange(0, -5);
47707
- isShowTooltip = colStart2 !== colStart;
47708
- }
47709
- }
47710
- if (isScatter) table.stateManager.hover.cellPos.col === i && table.stateManager.hover.cellPos.row === row || null === (_d = (_c = chartInstanceListRowByRowDirection[row][i]).showCrosshair) || void 0 === _d || _d.call(_c, axis => "left" === axis.layoutOrient ? positionValueOrYValue : dimensionValueOrXValue);else {
47711
- const bodyBoundryLeft = table.frozenColCount ? table.getCellRelativeRect(table.frozenColCount - 1, row).right : 0,
47700
+ if (isScatter || "object" != typeof chartDimensionLinkage || (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, isShowTooltip = isShowTooltip && checkIsShowTooltipForEdgeColumn(i, table)), isScatter) table.stateManager.hover.cellPos.col === i && table.stateManager.hover.cellPos.row === row || null === (_d = (_c = chartInstanceListRowByRowDirection[row][i]).showCrosshair) || void 0 === _d || _d.call(_c, axis => "left" === axis.layoutOrient ? positionValueOrYValue : dimensionValueOrXValue);else {
47701
+ const cellBoundry = table.getCellRelativeRect(i, row),
47702
+ bodyBoundryLeft = table.frozenColCount ? table.getCellRelativeRect(table.frozenColCount - 1, row).right : 0,
47712
47703
  absolutePositionLeft = Math.max(bodyBoundryLeft, table.getCellRelativeRect(i, row).left);
47713
47704
  hideTooltip ? (table.stateManager.hover.cellPos.col === i && table.stateManager.hover.cellPos.row === row || chartInstanceListRowByRowDirection[row][i].hideTooltip(), chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
47714
47705
  tooltip: !1,
47715
47706
  showTooltipOption: {
47716
- x: absolutePositionLeft,
47717
- y: canvasXY.y,
47707
+ x: absolutePositionLeft - cellBoundry.left,
47708
+ y: canvasXY.y - cellBoundry.top,
47718
47709
  activeType: "dimension"
47719
47710
  }
47720
47711
  })) : chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
47721
47712
  tooltip: isShowTooltip,
47722
47713
  showTooltipOption: {
47723
- x: absolutePositionLeft,
47724
- y: canvasXY.y,
47714
+ x: absolutePositionLeft - cellBoundry.left,
47715
+ y: canvasXY.y - cellBoundry.top,
47725
47716
  activeType: "dimension"
47726
47717
  }
47727
47718
  });
47728
47719
  }
47729
47720
  }
47730
- }, 0), table.scenegraph.updateNextFrame();
47721
+ }, 0);
47722
+ delayRunDimensionHoverTimer.push(timer), table.scenegraph.updateNextFrame();
47723
+ }
47724
+ }
47725
+ function generateChartInstanceListByViewRange(datum, table, deactivate = !1) {
47726
+ var _a;
47727
+ clearDelayRunDimensionHoverTimers();
47728
+ const {
47729
+ rowStart: rowStart
47730
+ } = table.getBodyVisibleRowRange();
47731
+ let rowEnd = table.getBodyVisibleRowRange().rowEnd;
47732
+ rowEnd = Math.min(table.rowCount - 1 - table.bottomFrozenRowCount, rowEnd);
47733
+ const {
47734
+ colStart: colStart
47735
+ } = table.getBodyVisibleColRange();
47736
+ let colEnd = table.getBodyVisibleColRange().colEnd;
47737
+ colEnd = Math.min(table.colCount - 1 - table.rightFrozenColCount, colEnd);
47738
+ for (let col = colStart; col <= colEnd; col++) {
47739
+ isValid$1(chartInstanceListColumnByColumnDirection[col]) || (chartInstanceListColumnByColumnDirection[col] = {});
47740
+ for (let i = rowStart; i <= rowEnd; i++) {
47741
+ const cellGroup = table.scenegraph.getCell(col, i),
47742
+ chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
47743
+ chartInstanceListColumnByColumnDirection[col][i] || isValid$1(chartNode) && (chartNode.addUpdateShapeAndBoundsTag(), chartNode.activeChartInstance ? chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance : "pie" === chartNode.attribute.spec.type && (chartNode.activate(table), chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance));
47744
+ const timer = setTimeout(() => {
47745
+ var _a, _b;
47746
+ if (null === (_a = chartInstanceListColumnByColumnDirection[col]) || void 0 === _a ? void 0 : _a[i]) {
47747
+ const chartDimensionLinkage = table.options.chartDimensionLinkage;
47748
+ let isShowTooltip = !0;
47749
+ "object" == typeof chartDimensionLinkage && (deactivate ? (chartInstanceListColumnByColumnDirection[col][i].setHovered(), chartInstanceListColumnByColumnDirection[col][i].hideTooltip()) : (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, isShowTooltip = isShowTooltip && checkIsShowTooltipForEdgeRow(i, table), isShowTooltip = isShowTooltip && checkIsShowTooltipForEdgeColumn(col, table), chartInstanceListColumnByColumnDirection[col][i].setHovered(datum), isShowTooltip && chartInstanceListColumnByColumnDirection[col][i].showTooltip(datum, {
47750
+ activeType: "mark"
47751
+ })));
47752
+ }
47753
+ }, 0);
47754
+ delayRunDimensionHoverTimer.push(timer), table.scenegraph.updateNextFrame();
47755
+ }
47731
47756
  }
47732
47757
  }
47733
- function clearChartInstanceListByRowDirection(row, excludedCol, table) {
47758
+ function checkIsShowTooltipForEdgeRow(row, table) {
47759
+ var _a, _b;
47760
+ let isShowTooltip = !0;
47761
+ const {
47762
+ rowStart: rowStart
47763
+ } = table.getBodyVisibleRowRange();
47764
+ let rowEnd = table.getBodyVisibleRowRange().rowEnd;
47765
+ rowEnd = Math.min(table.rowCount - 1 - table.bottomFrozenRowCount, rowEnd);
47766
+ const chartDimensionLinkage = table.options.chartDimensionLinkage;
47767
+ if (row === rowEnd && isShowTooltip) {
47768
+ const heightLimitToShowTooltipForEdgeRow = null !== (_a = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow) && void 0 !== _a ? _a : 0,
47769
+ {
47770
+ rowEnd: rowEnd1
47771
+ } = table.getBodyVisibleRowRange(0, -heightLimitToShowTooltipForEdgeRow);
47772
+ if (rowEnd1 === rowEnd) isShowTooltip = !0;else {
47773
+ const {
47774
+ rowEnd: rowEnd2
47775
+ } = table.getBodyVisibleRowRange(0, 5);
47776
+ isShowTooltip = rowEnd2 !== rowEnd;
47777
+ }
47778
+ } else if (row === rowStart && isShowTooltip) {
47779
+ const heightLimitToShowTooltipForEdgeRow = null !== (_b = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow) && void 0 !== _b ? _b : 0,
47780
+ {
47781
+ rowStart: rowStart1
47782
+ } = table.getBodyVisibleRowRange(heightLimitToShowTooltipForEdgeRow, 0);
47783
+ if (rowStart1 === rowStart) isShowTooltip = !0;else {
47784
+ const {
47785
+ rowStart: rowStart2
47786
+ } = table.getBodyVisibleRowRange(0, -5);
47787
+ isShowTooltip = rowStart2 !== rowStart;
47788
+ }
47789
+ }
47790
+ return isShowTooltip;
47791
+ }
47792
+ function checkIsShowTooltipForEdgeColumn(col, table) {
47793
+ let isShowTooltip = !0;
47794
+ const {
47795
+ colStart: colStart
47796
+ } = table.getBodyVisibleColRange();
47797
+ let colEnd = table.getBodyVisibleColRange().colEnd;
47798
+ colEnd = Math.min(table.colCount - 1 - table.rightFrozenColCount, colEnd);
47799
+ const chartDimensionLinkage = table.options.chartDimensionLinkage;
47800
+ if (col === colEnd && isShowTooltip) {
47801
+ const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
47802
+ {
47803
+ colEnd: colEnd1
47804
+ } = table.getBodyVisibleColRange(0, -widthLimitToShowTooltipForEdgeColumn);
47805
+ if (colEnd1 === colEnd) isShowTooltip = !0;else {
47806
+ const {
47807
+ colEnd: colEnd2
47808
+ } = table.getBodyVisibleColRange(0, 5);
47809
+ isShowTooltip = colEnd2 !== colEnd;
47810
+ }
47811
+ } else if (col === colStart && isShowTooltip) {
47812
+ const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
47813
+ {
47814
+ colStart: colStart1
47815
+ } = table.getBodyVisibleColRange(widthLimitToShowTooltipForEdgeColumn, 0);
47816
+ if (colStart1 === colStart) isShowTooltip = !0;else {
47817
+ const {
47818
+ colStart: colStart2
47819
+ } = table.getBodyVisibleColRange(0, -5);
47820
+ isShowTooltip = colStart2 !== colStart;
47821
+ }
47822
+ }
47823
+ return isShowTooltip;
47824
+ }
47825
+ function clearChartInstanceListByColumnDirection(col, excludedRow, table, forceRelease = !1) {
47826
+ var _a;
47827
+ if (isValid$1(chartInstanceListColumnByColumnDirection[col])) {
47828
+ for (const i in chartInstanceListColumnByColumnDirection[col]) {
47829
+ if (isValid$1(excludedRow) && Number(i) === excludedRow) continue;
47830
+ const cellGroup = table.scenegraph.getCell(col, Number(i)),
47831
+ chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
47832
+ isValid$1(chartNode) && (chartNode.addUpdateShapeAndBoundsTag(), chartNode.deactivate(table, {
47833
+ forceRelease: forceRelease,
47834
+ releaseChartInstance: !0,
47835
+ releaseColumnChartInstance: !1,
47836
+ releaseRowChartInstance: !1
47837
+ }), chartInstanceListColumnByColumnDirection[col][i] = null);
47838
+ }
47839
+ delete chartInstanceListColumnByColumnDirection[col];
47840
+ }
47841
+ }
47842
+ function clearChartInstanceListByRowDirection(row, excludedCol, table, forceRelease = !1) {
47734
47843
  var _a;
47735
47844
  if (isValid$1(chartInstanceListRowByRowDirection[row])) for (const i in chartInstanceListRowByRowDirection[row]) {
47736
47845
  if (isValid$1(excludedCol) && Number(i) === excludedCol) continue;
47737
47846
  const cellGroup = table.scenegraph.getCell(Number(i), row),
47738
47847
  chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
47739
- chartNode.addUpdateShapeAndBoundsTag(), isValid$1(chartNode) && (chartNode.deactivate(table, {
47848
+ isValid$1(chartNode) && (chartNode.addUpdateShapeAndBoundsTag(), chartNode.deactivate(table, {
47849
+ forceRelease: forceRelease,
47740
47850
  releaseChartInstance: !0,
47741
47851
  releaseColumnChartInstance: !1,
47742
47852
  releaseRowChartInstance: !1
@@ -47744,6 +47854,15 @@
47744
47854
  }
47745
47855
  delete chartInstanceListRowByRowDirection[row];
47746
47856
  }
47857
+ function clearDelayRunDimensionHoverTimers() {
47858
+ for (const timer of delayRunDimensionHoverTimer) clearTimeout(timer);
47859
+ delayRunDimensionHoverTimer.length = 0;
47860
+ }
47861
+ function clearAllChartInstanceList(table, forceRelease = !1) {
47862
+ clearDelayRunDimensionHoverTimers();
47863
+ for (const col in chartInstanceListColumnByColumnDirection) clearChartInstanceListByColumnDirection(Number(col), void 0, table, forceRelease);
47864
+ for (const row in chartInstanceListRowByRowDirection) clearChartInstanceListByRowDirection(Number(row), void 0, table, forceRelease);
47865
+ }
47747
47866
 
47748
47867
  function isValidAlignDomain(domain) {
47749
47868
  return 2 === domain.length && isValidNumber$1(domain[0]) && isValidNumber$1(domain[1]) && domain[1] >= domain[0];
@@ -48377,7 +48496,7 @@
48377
48496
  const CHART_NUMBER_TYPE = genNumberType();
48378
48497
  class Chart extends Rect$2 {
48379
48498
  constructor(isShareChartSpec, params) {
48380
- if (super(params), this.type = "chart", this.activeChartInstanceHoverOnMark = null, this.justShowMarkTooltip = void 0, this.justShowMarkTooltipTimer = Date.now(), this.delayRunDimensionHoverTimer = void 0, this.numberType = CHART_NUMBER_TYPE, this.isShareChartSpec = isShareChartSpec, params.chartInstance) this.chartInstance = params.chartInstance;else {
48499
+ if (super(params), this.type = "chart", this.activeChartInstanceLastViewBox = null, this.activeChartInstanceHoverOnMark = null, this.justShowMarkTooltip = void 0, this.justShowMarkTooltipTimer = Date.now(), this.delayRunDimensionHoverTimer = void 0, this.numberType = CHART_NUMBER_TYPE, this.isShareChartSpec = isShareChartSpec, params.chartInstance) this.chartInstance = params.chartInstance;else {
48381
48500
  const chartInstance = this.chartInstance = new params.ClassType(params.spec, merge({}, this.attribute.tableChartOption, {
48382
48501
  renderCanvas: params.canvas,
48383
48502
  mode: "node" === this.attribute.mode ? "node" : "desktop-browser",
@@ -48398,7 +48517,7 @@
48398
48517
  }
48399
48518
  }
48400
48519
  activate(table) {
48401
- var _a, _b, _c, _d, _e;
48520
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
48402
48521
  if (this.activeChartInstance) return;
48403
48522
  const {
48404
48523
  col: col,
@@ -48417,7 +48536,7 @@
48417
48536
  y1: y1 - table.scrollTop,
48418
48537
  y2: y2 - table.scrollTop
48419
48538
  });
48420
- null === (_a = this.activeChartInstance) || void 0 === _a || _a.release(), this.attribute.ClassType.globalConfig.uniqueTooltip = !1, this.activeChartInstance = new this.attribute.ClassType(this.attribute.spec, merge({}, this.attribute.tableChartOption, {
48539
+ this.attribute.ClassType.globalConfig.uniqueTooltip = !1, this.activeChartInstance = new this.attribute.ClassType(this.attribute.spec, merge({}, this.attribute.tableChartOption, {
48421
48540
  renderCanvas: this.attribute.canvas,
48422
48541
  mode: "desktop-browser",
48423
48542
  canvasControled: !1,
@@ -48451,7 +48570,7 @@
48451
48570
  layer.main && drawParams.clear && hoverColor && (context.beginPath(), context.fillStyle = hoverColor, context.rect(viewBox.x1, viewBox.y1, viewBox.x2 - viewBox.x1, viewBox.y2 - viewBox.y1), context.fill());
48452
48571
  }
48453
48572
  },
48454
- componentShowContent: table.options.chartDimensionLinkage && "scatter" !== this.attribute.spec.type ? {
48573
+ componentShowContent: (null === (_a = table.options.chartDimensionLinkage) || void 0 === _a ? void 0 : _a.showTooltip) && "scatter" !== this.attribute.spec.type ? {
48455
48574
  tooltip: {
48456
48575
  dimension: !1,
48457
48576
  mark: !0
@@ -48462,15 +48581,40 @@
48462
48581
  const chartStage = this.activeChartInstance.getStage(),
48463
48582
  matrix = this.globalTransMatrix.clone(),
48464
48583
  stageMatrix = this.stage.window.getViewBoxTransform();
48584
+ let brushChangeThrottle;
48465
48585
  matrix.multiply(stageMatrix.a, stageMatrix.b, stageMatrix.c, stageMatrix.d, stageMatrix.e, stageMatrix.f), chartStage.window.setViewBoxTransform && chartStage.window.setViewBoxTransform(matrix.a, matrix.b, matrix.c, matrix.d, matrix.e, matrix.f), this.activeChartInstance.renderSync(), null === (_c = null === (_b = table.internalProps.layoutMap) || void 0 === _b ? void 0 : _b.updateDataStateToActiveChartInstance) || void 0 === _c || _c.call(_b, this.activeChartInstance), this.activeChartInstance.on("click", params => {
48466
48586
  var _a;
48467
- !1 === (null === (_a = this.attribute.spec.select) || void 0 === _a ? void 0 : _a.enable) ? table.scenegraph.updateChartState(null) : Chart.temp && table.scenegraph.updateChartState(null == params ? void 0 : params.datum);
48587
+ !1 === (null === (_a = this.attribute.spec.select) || void 0 === _a ? void 0 : _a.enable) ? table.scenegraph.updateChartState(null, void 0) : Chart.temp && table.scenegraph.updateChartState(null == params ? void 0 : params.datum, "click");
48588
+ }), (null === (_d = table.options.chartDimensionLinkage) || void 0 === _d ? void 0 : _d.listenBrushChange) && (brushChangeThrottle = cancellableThrottle(table.scenegraph.updateChartState.bind(table.scenegraph), null !== (_f = null === (_e = table.options.chartDimensionLinkage) || void 0 === _e ? void 0 : _e.brushChangeDelay) && void 0 !== _f ? _f : 100), this.activeChartInstance.on("brushChange", params => {
48589
+ var _a;
48590
+ brushChangeThrottle.throttled(null === (_a = null == params ? void 0 : params.value) || void 0 === _a ? void 0 : _a.inBrushData, "brush");
48591
+ })), this.activeChartInstance.on("brushStart", params => {
48592
+ const brushingChartInstance = getBrushingChartInstance();
48593
+ brushingChartInstance !== this.activeChartInstance && (brushingChartInstance && brushingChartInstance.getChart().getComponentsByKey("brush")[0].clearBrushStateAndMask(), setBrushingChartInstance(this.activeChartInstance, col, row));
48468
48594
  }), this.activeChartInstance.on("brushEnd", params => {
48469
48595
  var _a;
48470
- table.scenegraph.updateChartState(null === (_a = null == params ? void 0 : params.value) || void 0 === _a ? void 0 : _a.inBrushData), Chart.temp = 0, setTimeout(() => {
48596
+ null == brushChangeThrottle || brushChangeThrottle.cancel(), table.scenegraph.updateChartState(null === (_a = null == params ? void 0 : params.value) || void 0 === _a ? void 0 : _a.inBrushData, "brush"), Chart.temp = 0, setTimeout(() => {
48471
48597
  Chart.temp = 1;
48472
48598
  }, 0);
48473
- }), table.options.chartDimensionLinkage && this.activeChartInstance.on("dimensionHover", params => {
48599
+ }), (null === (_g = table.options.chartDimensionLinkage) || void 0 === _g ? void 0 : _g.showTooltip) && ("pie" === this.attribute.spec.type && (this.activeChartInstance.on("pointerover", {
48600
+ markName: "pie"
48601
+ }, params => {
48602
+ var _a;
48603
+ const categoryField = this.attribute.spec.categoryField,
48604
+ datum = {
48605
+ [categoryField]: null === (_a = null == params ? void 0 : params.datum) || void 0 === _a ? void 0 : _a[categoryField]
48606
+ };
48607
+ generateChartInstanceListByViewRange(datum, table, !1);
48608
+ }), this.activeChartInstance.on("pointerout", {
48609
+ markName: "pie"
48610
+ }, params => {
48611
+ var _a;
48612
+ const categoryField = this.attribute.spec.categoryField,
48613
+ datum = {
48614
+ [categoryField]: null === (_a = null == params ? void 0 : params.datum) || void 0 === _a ? void 0 : _a[categoryField]
48615
+ };
48616
+ generateChartInstanceListByViewRange(datum, table, !0);
48617
+ })), this.activeChartInstance.on("dimensionHover", params => {
48474
48618
  var _a, _b;
48475
48619
  const dimensionInfo = null == params ? void 0 : params.dimensionInfo[0],
48476
48620
  canvasXY = null === (_a = null == params ? void 0 : params.event) || void 0 === _a ? void 0 : _a.canvas,
@@ -48533,21 +48677,23 @@
48533
48677
  }
48534
48678
  }
48535
48679
  }
48536
- }), null === (_e = (_d = table)._bindChartEvent) || void 0 === _e || _e.call(_d, this.activeChartInstance);
48680
+ })), null === (_j = (_h = table)._bindChartEvent) || void 0 === _j || _j.call(_h, this.activeChartInstance);
48537
48681
  }
48538
48682
  deactivate(table, {
48683
+ forceRelease = !1,
48539
48684
  releaseChartInstance = !0,
48540
48685
  releaseColumnChartInstance = !0,
48541
- releaseRowChartInstance = !0
48686
+ releaseRowChartInstance = !0,
48687
+ releaseAllChartInstance = !1
48542
48688
  } = {}) {
48543
48689
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
48544
48690
  if (this.activeChartInstanceHoverOnMark = null, this.justShowMarkTooltip = void 0, this.justShowMarkTooltipTimer = Date.now(), clearTimeout(this.delayRunDimensionHoverTimer), this.delayRunDimensionHoverTimer = void 0, releaseChartInstance) {
48545
- null === (_a = this.activeChartInstance) || void 0 === _a || _a.updateViewBox({
48691
+ !forceRelease && getBrushingChartInstance() && getBrushingChartInstance() === this.activeChartInstance || (null === (_a = this.activeChartInstance) || void 0 === _a || _a.updateViewBox({
48546
48692
  x1: -1e3,
48547
48693
  x2: -800,
48548
48694
  y1: -1e3,
48549
48695
  y2: -800
48550
- }, !1, !1), null === (_b = this.activeChartInstance) || void 0 === _b || _b.release(), this.activeChartInstance = null;
48696
+ }, !1, !1), null === (_b = this.activeChartInstance) || void 0 === _b || _b.release(), this.activeChartInstance = null);
48551
48697
  const {
48552
48698
  col: col,
48553
48699
  row: row
@@ -48560,7 +48706,7 @@
48560
48706
  } = this.parent;
48561
48707
  releaseColumnChartInstance && table.internalProps.layoutMap.isAxisCell(col, table.rowCount - table.bottomFrozenRowCount) && (null === (_h = null === (_g = table.scenegraph.getCell(col, table.rowCount - table.bottomFrozenRowCount).firstChild) || void 0 === _g ? void 0 : _g.hideLabelHoverOnAxis) || void 0 === _h || _h.call(_g)), releaseRowChartInstance && table.internalProps.layoutMap.isAxisCell(table.rowHeaderLevelCount - 1, row) && (null === (_k = null === (_j = table.scenegraph.getCell(table.rowHeaderLevelCount - 1, row).firstChild) || void 0 === _j ? void 0 : _j.hideLabelHoverOnAxis) || void 0 === _k || _k.call(_j));
48562
48708
  }
48563
- releaseColumnChartInstance && clearChartInstanceListByColumnDirection(this.parent.col, "scatter" === this.attribute.spec.type ? this.parent.row : void 0, table), releaseRowChartInstance && clearChartInstanceListByRowDirection(this.parent.row, "scatter" === this.attribute.spec.type ? this.parent.col : void 0, table);
48709
+ releaseAllChartInstance ? clearAllChartInstanceList(table, forceRelease) : (releaseColumnChartInstance && clearChartInstanceListByColumnDirection(this.parent.col, "scatter" === this.attribute.spec.type ? this.parent.row : void 0, table, forceRelease), releaseRowChartInstance && clearChartInstanceListByRowDirection(this.parent.row, "scatter" === this.attribute.spec.type ? this.parent.col : void 0, table, forceRelease));
48564
48710
  }
48565
48711
  updateData(data) {
48566
48712
  this.attribute.data = data;
@@ -48575,13 +48721,14 @@
48575
48721
  y1: y1,
48576
48722
  x2: x2,
48577
48723
  y2: y2
48578
- } = cellGroup.globalAABBBounds;
48579
- return {
48580
- x1: Math.ceil(x1 + padding[3] + table.scrollLeft + (null !== (_b = null === (_a = table.options.viewBox) || void 0 === _a ? void 0 : _a.x1) && void 0 !== _b ? _b : 0)),
48581
- x2: Math.ceil(x1 + cellGroup.attribute.width - padding[1] + table.scrollLeft + (null !== (_d = null === (_c = table.options.viewBox) || void 0 === _c ? void 0 : _c.x1) && void 0 !== _d ? _d : 0)),
48582
- y1: Math.ceil(y1 + padding[0] + table.scrollTop + (null !== (_f = null === (_e = table.options.viewBox) || void 0 === _e ? void 0 : _e.y1) && void 0 !== _f ? _f : 0)),
48583
- y2: Math.ceil(y1 + cellGroup.attribute.height - padding[2] + table.scrollTop + (null !== (_h = null === (_g = table.options.viewBox) || void 0 === _g ? void 0 : _g.y1) && void 0 !== _h ? _h : 0))
48584
- };
48724
+ } = cellGroup.globalAABBBounds,
48725
+ viewBox = {
48726
+ x1: Math.ceil(x1 + padding[3] + table.scrollLeft + (null !== (_b = null === (_a = table.options.viewBox) || void 0 === _a ? void 0 : _a.x1) && void 0 !== _b ? _b : 0)),
48727
+ x2: Math.ceil(x1 + cellGroup.attribute.width - padding[1] + table.scrollLeft + (null !== (_d = null === (_c = table.options.viewBox) || void 0 === _c ? void 0 : _c.x1) && void 0 !== _d ? _d : 0)),
48728
+ y1: Math.ceil(y1 + padding[0] + table.scrollTop + (null !== (_f = null === (_e = table.options.viewBox) || void 0 === _e ? void 0 : _e.y1) && void 0 !== _f ? _f : 0)),
48729
+ y2: Math.ceil(y1 + cellGroup.attribute.height - padding[2] + table.scrollTop + (null !== (_h = null === (_g = table.options.viewBox) || void 0 === _g ? void 0 : _g.y1) && void 0 !== _h ? _h : 0))
48730
+ };
48731
+ return this.activeChartInstance ? this.activeChartInstanceLastViewBox = viewBox : this.activeChartInstanceLastViewBox = null, viewBox;
48585
48732
  }
48586
48733
  }
48587
48734
  function getTableBounds(col, row, table) {
@@ -48796,7 +48943,7 @@
48796
48943
  {
48797
48944
  width = groupAttribute.width,
48798
48945
  height = groupAttribute.height
48799
- } = (chart.getViewBox(), chart.attribute),
48946
+ } = chart.attribute,
48800
48947
  {
48801
48948
  table: table
48802
48949
  } = chart.getRootNode(),
@@ -48824,8 +48971,9 @@
48824
48971
  });
48825
48972
  }
48826
48973
  }
48827
- const viewBox = chart.getViewBox();
48828
- activeChartInstance.updateViewBox({
48974
+ const lastViewBox = chart.activeChartInstanceLastViewBox,
48975
+ viewBox = chart.getViewBox();
48976
+ lastViewBox && viewBox.x1 === lastViewBox.x1 && viewBox.x2 === lastViewBox.x2 && viewBox.y1 === lastViewBox.y1 && viewBox.y2 === lastViewBox.y2 || activeChartInstance.updateViewBox({
48829
48977
  x1: 0,
48830
48978
  x2: viewBox.x2 - viewBox.x1,
48831
48979
  y1: 0,
@@ -52343,9 +52491,10 @@
52343
52491
  });
52344
52492
  }
52345
52493
  }
52346
- function updateChartState(scenegraph, datum) {
52494
+ function updateChartState(scenegraph, datum, selectedDataMode) {
52347
52495
  const table = scenegraph.table;
52348
52496
  if (table.isPivotChart()) {
52497
+ table._selectedDataMode = selectedDataMode;
52349
52498
  const preSelectItemsCount = table._selectedDataItemsInChart.length;
52350
52499
  if ((null == datum || 0 === (null == datum ? void 0 : datum.length) || 0 === Object.keys(datum).length) && 0 === preSelectItemsCount) return;
52351
52500
  const newSelectedDataItemsInChart = [];
@@ -53093,16 +53242,36 @@
53093
53242
  resetResidentHoverIcon(col, row) {
53094
53243
  resetResidentHoverIcon(col, row, this);
53095
53244
  }
53096
- deactivateChart(col, row) {
53097
- var _a, _b, _c;
53098
- if (-1 === col || -1 === row) return;
53245
+ deactivateChart(col, row, forceRelease = !1) {
53246
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
53247
+ if (-1 === col || -1 === row) {
53248
+ if (forceRelease) {
53249
+ const brushingChartInstanceCellPos = getBrushingChartInstanceCellPos(),
53250
+ cellGroup = this.getCell(brushingChartInstanceCellPos.col, brushingChartInstanceCellPos.row);
53251
+ (null === (_a = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _a ? void 0 : _a.deactivate) && (clearBrushingChartInstance(), null === (_c = null === (_b = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _b ? void 0 : _b.deactivate) || void 0 === _c || _c.call(_b, this.table, {
53252
+ forceRelease: !0,
53253
+ releaseChartInstance: !0,
53254
+ releaseColumnChartInstance: !0,
53255
+ releaseRowChartInstance: !0,
53256
+ releaseAllChartInstance: !0
53257
+ }));
53258
+ }
53259
+ return;
53260
+ }
53099
53261
  const cellGroup = this.getCell(col, row);
53100
- if (null === (_a = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _a ? void 0 : _a.deactivate) {
53262
+ if (null === (_d = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _d ? void 0 : _d.deactivate) {
53263
+ if (forceRelease) return clearBrushingChartInstance(), void (null === (_f = null === (_e = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _e ? void 0 : _e.deactivate) || void 0 === _f || _f.call(_e, this.table, {
53264
+ forceRelease: !0,
53265
+ releaseChartInstance: !0,
53266
+ releaseColumnChartInstance: !0,
53267
+ releaseRowChartInstance: !0,
53268
+ releaseAllChartInstance: !0
53269
+ }));
53101
53270
  const chartType = (null == cellGroup ? void 0 : cellGroup.firstChild).attribute.spec.type;
53102
- null === (_c = null === (_b = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _b ? void 0 : _b.deactivate) || void 0 === _c || _c.call(_b, this.table, this.table.options.chartDimensionLinkage ? {
53103
- releaseChartInstance: "scatter" === chartType ? col !== this.table.stateManager.hover.cellPos.col && row !== this.table.stateManager.hover.cellPos.row || this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount || this.table.stateManager.hover.cellPos.row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount || this.table.stateManager.hover.cellPos.col < this.table.frozenColCount || this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount : this.table.options.indicatorsAsCol ? row !== this.table.stateManager.hover.cellPos.row || this.table.stateManager.hover.cellPos.col < this.table.frozenColCount || this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount : col !== this.table.stateManager.hover.cellPos.col || this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount || this.table.stateManager.hover.cellPos.row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount,
53104
- releaseColumnChartInstance: col !== this.table.stateManager.hover.cellPos.col || this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount || this.table.stateManager.hover.cellPos.row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount,
53105
- releaseRowChartInstance: row !== this.table.stateManager.hover.cellPos.row || this.table.stateManager.hover.cellPos.col < this.table.frozenColCount || this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount
53271
+ null === (_h = null === (_g = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _g ? void 0 : _g.deactivate) || void 0 === _h || _h.call(_g, this.table, (null === (_j = this.table.options.chartDimensionLinkage) || void 0 === _j ? void 0 : _j.showTooltip) ? {
53272
+ releaseChartInstance: "pie" !== chartType && ("scatter" === chartType ? col !== this.table.stateManager.hover.cellPos.col && row !== this.table.stateManager.hover.cellPos.row || this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount || this.table.stateManager.hover.cellPos.row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount || this.table.stateManager.hover.cellPos.col < this.table.frozenColCount || this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount : this.table.options.indicatorsAsCol ? row !== this.table.stateManager.hover.cellPos.row || this.table.stateManager.hover.cellPos.col < this.table.frozenColCount || this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount : col !== this.table.stateManager.hover.cellPos.col || this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount || this.table.stateManager.hover.cellPos.row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount),
53273
+ releaseColumnChartInstance: "pie" !== chartType && (col !== this.table.stateManager.hover.cellPos.col || this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount || this.table.stateManager.hover.cellPos.row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount),
53274
+ releaseRowChartInstance: "pie" !== chartType && (row !== this.table.stateManager.hover.cellPos.row || this.table.stateManager.hover.cellPos.col < this.table.frozenColCount || this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount)
53106
53275
  } : void 0);
53107
53276
  }
53108
53277
  }
@@ -53150,8 +53319,15 @@
53150
53319
  updateChartSizeForResizeRowHeight(row) {
53151
53320
  updateChartSizeForResizeRowHeight(this, row);
53152
53321
  }
53153
- updateChartState(datum) {
53154
- this.table.isPivotChart() && updateChartState(this, datum);
53322
+ updateChartState(datum, selectedDataMode) {
53323
+ var _a, _b;
53324
+ if (this.table.isPivotChart()) {
53325
+ if (null == datum || 0 === (null == datum ? void 0 : datum.length) || 0 === Object.keys(datum).length) {
53326
+ const brushingChartInstance = getBrushingChartInstance();
53327
+ brushingChartInstance && brushingChartInstance.getChart().getComponentsByKey("brush")[0].clearBrushStateAndMask(), null === (_b = null === (_a = this.table.options.chartDimensionLinkage) || void 0 === _a ? void 0 : _a.clearChartState) || void 0 === _b || _b.call(_a);
53328
+ }
53329
+ updateChartState(this, datum, selectedDataMode);
53330
+ }
53155
53331
  }
53156
53332
  updateCheckboxCellState(col, row, checked) {
53157
53333
  var _a, _b;
@@ -56178,7 +56354,7 @@
56178
56354
  }, 0 !== e.button) return;
56179
56355
  const eventArgsSet = getCellEventArgsSet(e);
56180
56356
  if (eventManager.downIcon = void 0, stateManager.interactionState !== InteractionState.default) return;
56181
- if (table.isPivotChart() && "chart" !== (null === (_a = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _a ? void 0 : _a.target.type) && table.scenegraph.updateChartState(null), (null === (_b = eventArgsSet.eventArgs) || void 0 === _b ? void 0 : _b.target) !== (null === (_c = stateManager.residentHoverIcon) || void 0 === _c ? void 0 : _c.icon) && stateManager.hideMenu(), "chart" === (null === (_d = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _d ? void 0 : _d.target.type)) return;
56357
+ if (table.isPivotChart() && "chart" !== (null === (_a = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _a ? void 0 : _a.target.type) && table.scenegraph.updateChartState(null, void 0), (null === (_b = eventArgsSet.eventArgs) || void 0 === _b ? void 0 : _b.target) !== (null === (_c = stateManager.residentHoverIcon) || void 0 === _c ? void 0 : _c.icon) && stateManager.hideMenu(), "chart" === (null === (_d = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _d ? void 0 : _d.target.type)) return;
56182
56358
  const isCompleteEdit = null === (_e = table.editorManager) || void 0 === _e ? void 0 : _e.completeEdit(e.nativeEvent);
56183
56359
  getPromiseValue(isCompleteEdit, isCompleteEdit => {
56184
56360
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
@@ -56206,7 +56382,7 @@
56206
56382
  }
56207
56383
  eventManager.dealTableHover(eventArgsSet);
56208
56384
  } else {
56209
- if (!eventManager.checkCellFillhandle(eventArgsSet) && (eventManager.checkColumnResize(eventArgsSet, !0) || eventManager.checkRowResize(eventArgsSet, !0))) return table.scenegraph.updateChartState(null), void stateManager.updateInteractionState(InteractionState.grabing);
56385
+ if (!eventManager.checkCellFillhandle(eventArgsSet) && (eventManager.checkColumnResize(eventArgsSet, !0) || eventManager.checkRowResize(eventArgsSet, !0))) return table.scenegraph.updateChartState(null, void 0), void stateManager.updateInteractionState(InteractionState.grabing);
56210
56386
  if (eventManager.checkColumnMover(eventArgsSet)) return void stateManager.updateInteractionState(InteractionState.grabing);
56211
56387
  if (eventManager.checkCellFillhandle(eventArgsSet, !0) && eventManager.dealFillSelect(eventArgsSet)) return void stateManager.updateInteractionState(InteractionState.grabing);
56212
56388
  eventManager.dealTableSelect(eventArgsSet) && stateManager.updateInteractionState(InteractionState.grabing);
@@ -56358,7 +56534,7 @@
56358
56534
  if (!(null === (_a = table.options.customConfig) || void 0 === _a ? void 0 : _a.selectCellWhenCellEditorNotExists) && !1 === isCompleteEdit) return;
56359
56535
  const hitIcon = (null === (_b = e.target.role) || void 0 === _b ? void 0 : _b.startsWith("icon")) ? e.target : void 0;
56360
56536
  if (eventManager.downIcon = hitIcon, "touch" === e.pointerType || hitIcon || eventManager.checkCellFillhandle(eventArgsSet) || stateManager.columnResize.resizing || !eventManager.checkColumnResize(eventArgsSet, !0)) ;else {
56361
- table.scenegraph.updateChartState(null), stateManager.updateInteractionState(InteractionState.grabing);
56537
+ table.scenegraph.updateChartState(null, void 0), stateManager.updateInteractionState(InteractionState.grabing);
56362
56538
  const {
56363
56539
  eventArgs: eventArgs
56364
56540
  } = eventArgsSet;
@@ -56377,7 +56553,7 @@
56377
56553
  if (table.eventManager.isDraging || !target || !target.isDescendantsOf(table.scenegraph.stage) && target.stage !== target || target.isDescendantsOf(table.scenegraph.tableGroup)) table.eventManager.isDraging && stateManager.isSelecting() && stateManager.endSelectCells();else {
56378
56554
  stateManager.updateInteractionState(InteractionState.default), eventManager.dealTableHover();
56379
56555
  const isHasSelected = !!(null === (_a = stateManager.select.ranges) || void 0 === _a ? void 0 : _a.length);
56380
- (null === (_b = table.options.customConfig) || void 0 === _b ? void 0 : _b.cancelSelectCellHook) ? (null === (_c = table.options.customConfig) || void 0 === _c ? void 0 : _c.cancelSelectCellHook(e)) && eventManager.dealTableSelect() : (null === (_e = null === (_d = table.options.select) || void 0 === _d ? void 0 : _d.blankAreaClickDeselect) || void 0 === _e || _e) && eventManager.dealTableSelect(), stateManager.endSelectCells(!0, isHasSelected), stateManager.updateCursor(), table.scenegraph.updateChartState(null);
56556
+ (null === (_b = table.options.customConfig) || void 0 === _b ? void 0 : _b.cancelSelectCellHook) ? (null === (_c = table.options.customConfig) || void 0 === _c ? void 0 : _c.cancelSelectCellHook(e)) && eventManager.dealTableSelect() : (null === (_e = null === (_d = table.options.select) || void 0 === _d ? void 0 : _d.blankAreaClickDeselect) || void 0 === _e || _e) && eventManager.dealTableSelect(), stateManager.endSelectCells(!0, isHasSelected), stateManager.updateCursor(), table.scenegraph.updateChartState(null, void 0);
56381
56557
  }
56382
56558
  }), table.scenegraph.stage.addEventListener("pointermove", e => {
56383
56559
  var _a, _b, _c;
@@ -56495,7 +56671,15 @@
56495
56671
  table.stateManager.setCheckedState(col, row, cellInfo.field, e.detail.checked), table.fireListeners(TABLE_EVENT_TYPE.SWITCH_STATE_CHANGE, cellsEvent), table.scenegraph.updateNextFrame();
56496
56672
  }), table.scenegraph.stage.addEventListener("wheel", e => {
56497
56673
  var _a;
56498
- e.path.find(node => "legend" === node.name) || (null === (_a = table.editorManager) || void 0 === _a || _a.completeEdit(), table.eventManager._enableTableScroll && handleWhell(e, stateManager));
56674
+ if (!e.path.find(node => "legend" === node.name)) {
56675
+ null === (_a = table.editorManager) || void 0 === _a || _a.completeEdit();
56676
+ const {
56677
+ cellPos: cellPos
56678
+ } = table.stateManager.hover,
56679
+ prevHoverCellCol = cellPos.col,
56680
+ prevHoverCellRow = cellPos.row;
56681
+ table.scenegraph.deactivateChart(prevHoverCellCol, prevHoverCellRow, !0), table.eventManager._enableTableScroll && handleWhell(e, stateManager);
56682
+ }
56499
56683
  });
56500
56684
  }
56501
56685
  function bindGesture(eventManager) {
@@ -59907,7 +60091,7 @@
59907
60091
  }
59908
60092
  constructor(container, options = {}) {
59909
60093
  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;
59910
- if (super(), this.showFrozenIcon = !0, this.version = "1.22.11-alpha.4", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
60094
+ if (super(), this.showFrozenIcon = !0, this.version = "1.22.11-alpha.6", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
59911
60095
  this.pluginManager = new PluginManager$1(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
59912
60096
  options: options,
59913
60097
  container: container
@@ -76212,7 +76396,7 @@
76212
76396
  PluginManager: PluginManager
76213
76397
  });
76214
76398
 
76215
- const version = "1.22.11-alpha.4";
76399
+ const version = "1.22.11-alpha.6";
76216
76400
 
76217
76401
  exports.Gantt = Gantt;
76218
76402
  exports.TYPES = index$4;