@visactor/vtable-calendar 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.
@@ -34616,6 +34616,24 @@
34616
34616
  }, delay));
34617
34617
  };
34618
34618
  }
34619
+ function cancellableThrottle(func, delay) {
34620
+ let timer = null,
34621
+ lastArgs = null,
34622
+ context = null;
34623
+ return {
34624
+ throttled: function (...args) {
34625
+ lastArgs = args, context = this, timer || (timer = setTimeout(() => {
34626
+ lastArgs && func.apply(context, lastArgs), timer = null, lastArgs = null, context = null;
34627
+ }, delay));
34628
+ },
34629
+ cancel: () => {
34630
+ timer && (clearTimeout(timer), timer = null, lastArgs = null, context = null);
34631
+ },
34632
+ flush: () => {
34633
+ timer && lastArgs && (clearTimeout(timer), func.apply(context, lastArgs), timer = null, lastArgs = null, context = null);
34634
+ }
34635
+ };
34636
+ }
34619
34637
  function pad(num, totalChars) {
34620
34638
  for (num = `${num}`; num.length < totalChars;) num = "0" + num;
34621
34639
  return num;
@@ -35899,6 +35917,9 @@
35899
35917
  var _a;
35900
35918
  return null !== (_a = defaultStyle.textAlign) && void 0 !== _a ? _a : "left";
35901
35919
  },
35920
+ get textStickBaseOnAlign() {
35921
+ return defaultStyle.textStickBaseOnAlign;
35922
+ },
35902
35923
  get textBaseline() {
35903
35924
  var _a;
35904
35925
  return null !== (_a = defaultStyle.textBaseline) && void 0 !== _a ? _a : "middle";
@@ -36582,6 +36603,9 @@
36582
36603
  get textStick() {
36583
36604
  return style.textStick;
36584
36605
  },
36606
+ get textStickBaseOnAlign() {
36607
+ return style.textStickBaseOnAlign;
36608
+ },
36585
36609
  get marked() {
36586
36610
  return style.marked;
36587
36611
  },
@@ -43735,11 +43759,35 @@
43735
43759
  return hoverMode;
43736
43760
  }
43737
43761
 
43762
+ let brushingChartInstance,
43763
+ brushingChartInstanceCellPos = {
43764
+ col: -1,
43765
+ row: -1
43766
+ };
43767
+ function setBrushingChartInstance(chartInstance, col, row) {
43768
+ brushingChartInstance = chartInstance, brushingChartInstanceCellPos = {
43769
+ col: col,
43770
+ row: row
43771
+ };
43772
+ }
43773
+ function clearBrushingChartInstance() {
43774
+ brushingChartInstance = void 0, brushingChartInstanceCellPos = {
43775
+ col: -1,
43776
+ row: -1
43777
+ };
43778
+ }
43779
+ function getBrushingChartInstance() {
43780
+ return brushingChartInstance;
43781
+ }
43782
+ function getBrushingChartInstanceCellPos() {
43783
+ return brushingChartInstanceCellPos;
43784
+ }
43738
43785
  const chartInstanceListColumnByColumnDirection = {};
43739
43786
  const chartInstanceListRowByRowDirection = {};
43787
+ const delayRunDimensionHoverTimer = [];
43740
43788
  function generateChartInstanceListByColumnDirection(col, dimensionValueOrXValue, positionValueOrYValue, canvasXY, table, hideTooltip = !1, isScatter = !1) {
43741
43789
  var _a;
43742
- isValid$1(chartInstanceListColumnByColumnDirection[col]) || (chartInstanceListColumnByColumnDirection[col] = {});
43790
+ clearDelayRunDimensionHoverTimers(), isValid$1(chartInstanceListColumnByColumnDirection[col]) || (chartInstanceListColumnByColumnDirection[col] = {});
43743
43791
  const {
43744
43792
  rowStart: rowStart
43745
43793
  } = table.getBodyVisibleRowRange();
@@ -43748,76 +43796,40 @@
43748
43796
  for (let i = rowStart; i <= rowEnd; i++) {
43749
43797
  const cellGroup = table.scenegraph.getCell(col, i),
43750
43798
  chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
43751
- chartNode.addUpdateShapeAndBoundsTag(), chartInstanceListColumnByColumnDirection[col][i] || isValid$1(chartNode) && (chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance), setTimeout(() => {
43752
- var _a, _b, _c, _d, _e, _f;
43799
+ chartInstanceListColumnByColumnDirection[col][i] || isValid$1(chartNode) && (chartNode.addUpdateShapeAndBoundsTag(), chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance);
43800
+ const timer = setTimeout(() => {
43801
+ var _a, _b, _c, _d;
43753
43802
  if (null === (_a = chartInstanceListColumnByColumnDirection[col]) || void 0 === _a ? void 0 : _a[i]) {
43754
43803
  const chartDimensionLinkage = table.options.chartDimensionLinkage;
43755
43804
  let isShowTooltip = !isScatter;
43756
- if (!isScatter && "object" == typeof chartDimensionLinkage) if (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, i === rowEnd && isShowTooltip) {
43757
- const heightLimitToShowTooltipForEdgeRow = null !== (_c = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow) && void 0 !== _c ? _c : 0,
43758
- {
43759
- rowEnd: rowEnd1
43760
- } = table.getBodyVisibleRowRange(0, -heightLimitToShowTooltipForEdgeRow);
43761
- if (rowEnd1 === rowEnd) isShowTooltip = !0;else {
43762
- const {
43763
- rowEnd: rowEnd2
43764
- } = table.getBodyVisibleRowRange(0, 5);
43765
- isShowTooltip = rowEnd2 !== rowEnd;
43766
- }
43767
- } else if (i === rowStart && isShowTooltip) {
43768
- const heightLimitToShowTooltipForEdgeRow = null !== (_d = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow) && void 0 !== _d ? _d : 0,
43769
- {
43770
- rowStart: rowStart1
43771
- } = table.getBodyVisibleRowRange(heightLimitToShowTooltipForEdgeRow, 0);
43772
- if (rowStart1 === rowStart) isShowTooltip = !0;else {
43773
- const {
43774
- rowStart: rowStart2
43775
- } = table.getBodyVisibleRowRange(0, -5);
43776
- isShowTooltip = rowStart2 !== rowStart;
43777
- }
43778
- }
43779
- 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 {
43780
- const bodyBoundryTop = table.frozenRowCount ? table.getCellRelativeRect(col, table.frozenRowCount - 1).bottom : 0,
43805
+ 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 {
43806
+ const cellBoundry = table.getCellRelativeRect(col, i),
43807
+ bodyBoundryTop = table.frozenRowCount ? table.getCellRelativeRect(col, table.frozenRowCount - 1).bottom : 0,
43781
43808
  absolutePositionTop = Math.max(bodyBoundryTop, table.getCellRelativeRect(col, i).top);
43782
43809
  hideTooltip ? (table.stateManager.hover.cellPos.col === col && table.stateManager.hover.cellPos.row === i || chartInstanceListColumnByColumnDirection[col][i].hideTooltip(), chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
43783
43810
  tooltip: !1,
43784
43811
  showTooltipOption: {
43785
- x: canvasXY.x,
43786
- y: absolutePositionTop,
43812
+ x: canvasXY.x - cellBoundry.left,
43813
+ y: absolutePositionTop - cellBoundry.top,
43787
43814
  activeType: "dimension"
43788
43815
  }
43789
43816
  })) : chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
43790
43817
  tooltip: isShowTooltip,
43791
43818
  showTooltipOption: {
43792
- x: canvasXY.x,
43793
- y: absolutePositionTop,
43819
+ x: canvasXY.x - cellBoundry.left,
43820
+ y: absolutePositionTop - cellBoundry.top,
43794
43821
  activeType: "dimension"
43795
43822
  }
43796
43823
  });
43797
43824
  }
43798
43825
  }
43799
- }, 0), table.scenegraph.updateNextFrame();
43800
- }
43801
- }
43802
- function clearChartInstanceListByColumnDirection(col, excludedRow, table) {
43803
- var _a;
43804
- if (isValid$1(chartInstanceListColumnByColumnDirection[col])) {
43805
- for (const i in chartInstanceListColumnByColumnDirection[col]) {
43806
- if (isValid$1(excludedRow) && Number(i) === excludedRow) continue;
43807
- const cellGroup = table.scenegraph.getCell(col, Number(i)),
43808
- chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
43809
- chartNode.addUpdateShapeAndBoundsTag(), isValid$1(chartNode) && (chartNode.deactivate(table, {
43810
- releaseChartInstance: !0,
43811
- releaseColumnChartInstance: !1,
43812
- releaseRowChartInstance: !1
43813
- }), chartInstanceListColumnByColumnDirection[col][i] = null);
43814
- }
43815
- delete chartInstanceListColumnByColumnDirection[col];
43826
+ }, 0);
43827
+ delayRunDimensionHoverTimer.push(timer), table.scenegraph.updateNextFrame();
43816
43828
  }
43817
43829
  }
43818
43830
  function generateChartInstanceListByRowDirection(row, dimensionValueOrXValue, positionValueOrYValue, canvasXY, table, hideTooltip = !1, isScatter = !1) {
43819
43831
  var _a;
43820
- isValid$1(chartInstanceListRowByRowDirection[row]) || (chartInstanceListRowByRowDirection[row] = {});
43832
+ clearDelayRunDimensionHoverTimers(), isValid$1(chartInstanceListRowByRowDirection[row]) || (chartInstanceListRowByRowDirection[row] = {});
43821
43833
  const {
43822
43834
  colStart: colStart
43823
43835
  } = table.getBodyVisibleColRange();
@@ -43826,64 +43838,162 @@
43826
43838
  for (let i = colStart; i <= colEnd; i++) {
43827
43839
  const cellGroup = table.scenegraph.getCell(i, row),
43828
43840
  chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
43829
- chartNode.addUpdateShapeAndBoundsTag(), chartInstanceListRowByRowDirection[row][i] || isValid$1(chartNode) && (chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListRowByRowDirection[row][i] = chartNode.activeChartInstance), setTimeout(() => {
43841
+ chartInstanceListRowByRowDirection[row][i] || isValid$1(chartNode) && (chartNode.addUpdateShapeAndBoundsTag(), chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListRowByRowDirection[row][i] = chartNode.activeChartInstance);
43842
+ const timer = setTimeout(() => {
43830
43843
  var _a, _b, _c, _d;
43831
43844
  if (null === (_a = chartInstanceListRowByRowDirection[row]) || void 0 === _a ? void 0 : _a[i]) {
43832
43845
  const chartDimensionLinkage = table.options.chartDimensionLinkage;
43833
43846
  let isShowTooltip = !isScatter;
43834
- if (!isScatter && "object" == typeof chartDimensionLinkage) if (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, i === colEnd && isShowTooltip) {
43835
- const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
43836
- {
43837
- colEnd: colEnd1
43838
- } = table.getBodyVisibleColRange(0, -widthLimitToShowTooltipForEdgeColumn);
43839
- if (colEnd1 === colEnd) isShowTooltip = !0;else {
43840
- const {
43841
- colEnd: colEnd2
43842
- } = table.getBodyVisibleColRange(0, 5);
43843
- isShowTooltip = colEnd2 !== colEnd;
43844
- }
43845
- } else if (i === colStart && isShowTooltip) {
43846
- const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
43847
- {
43848
- colStart: colStart1
43849
- } = table.getBodyVisibleColRange(widthLimitToShowTooltipForEdgeColumn, 0);
43850
- if (colStart1 === colStart) isShowTooltip = !0;else {
43851
- const {
43852
- colStart: colStart2
43853
- } = table.getBodyVisibleColRange(0, -5);
43854
- isShowTooltip = colStart2 !== colStart;
43855
- }
43856
- }
43857
- 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 {
43858
- const bodyBoundryLeft = table.frozenColCount ? table.getCellRelativeRect(table.frozenColCount - 1, row).right : 0,
43847
+ 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 {
43848
+ const cellBoundry = table.getCellRelativeRect(i, row),
43849
+ bodyBoundryLeft = table.frozenColCount ? table.getCellRelativeRect(table.frozenColCount - 1, row).right : 0,
43859
43850
  absolutePositionLeft = Math.max(bodyBoundryLeft, table.getCellRelativeRect(i, row).left);
43860
43851
  hideTooltip ? (table.stateManager.hover.cellPos.col === i && table.stateManager.hover.cellPos.row === row || chartInstanceListRowByRowDirection[row][i].hideTooltip(), chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
43861
43852
  tooltip: !1,
43862
43853
  showTooltipOption: {
43863
- x: absolutePositionLeft,
43864
- y: canvasXY.y,
43854
+ x: absolutePositionLeft - cellBoundry.left,
43855
+ y: canvasXY.y - cellBoundry.top,
43865
43856
  activeType: "dimension"
43866
43857
  }
43867
43858
  })) : chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
43868
43859
  tooltip: isShowTooltip,
43869
43860
  showTooltipOption: {
43870
- x: absolutePositionLeft,
43871
- y: canvasXY.y,
43861
+ x: absolutePositionLeft - cellBoundry.left,
43862
+ y: canvasXY.y - cellBoundry.top,
43872
43863
  activeType: "dimension"
43873
43864
  }
43874
43865
  });
43875
43866
  }
43876
43867
  }
43877
- }, 0), table.scenegraph.updateNextFrame();
43868
+ }, 0);
43869
+ delayRunDimensionHoverTimer.push(timer), table.scenegraph.updateNextFrame();
43870
+ }
43871
+ }
43872
+ function generateChartInstanceListByViewRange(datum, table, deactivate = !1) {
43873
+ var _a;
43874
+ clearDelayRunDimensionHoverTimers();
43875
+ const {
43876
+ rowStart: rowStart
43877
+ } = table.getBodyVisibleRowRange();
43878
+ let rowEnd = table.getBodyVisibleRowRange().rowEnd;
43879
+ rowEnd = Math.min(table.rowCount - 1 - table.bottomFrozenRowCount, rowEnd);
43880
+ const {
43881
+ colStart: colStart
43882
+ } = table.getBodyVisibleColRange();
43883
+ let colEnd = table.getBodyVisibleColRange().colEnd;
43884
+ colEnd = Math.min(table.colCount - 1 - table.rightFrozenColCount, colEnd);
43885
+ for (let col = colStart; col <= colEnd; col++) {
43886
+ isValid$1(chartInstanceListColumnByColumnDirection[col]) || (chartInstanceListColumnByColumnDirection[col] = {});
43887
+ for (let i = rowStart; i <= rowEnd; i++) {
43888
+ const cellGroup = table.scenegraph.getCell(col, i),
43889
+ chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
43890
+ 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));
43891
+ const timer = setTimeout(() => {
43892
+ var _a, _b;
43893
+ if (null === (_a = chartInstanceListColumnByColumnDirection[col]) || void 0 === _a ? void 0 : _a[i]) {
43894
+ const chartDimensionLinkage = table.options.chartDimensionLinkage;
43895
+ let isShowTooltip = !0;
43896
+ "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, {
43897
+ activeType: "mark"
43898
+ })));
43899
+ }
43900
+ }, 0);
43901
+ delayRunDimensionHoverTimer.push(timer), table.scenegraph.updateNextFrame();
43902
+ }
43878
43903
  }
43879
43904
  }
43880
- function clearChartInstanceListByRowDirection(row, excludedCol, table) {
43905
+ function checkIsShowTooltipForEdgeRow(row, table) {
43906
+ var _a, _b;
43907
+ let isShowTooltip = !0;
43908
+ const {
43909
+ rowStart: rowStart
43910
+ } = table.getBodyVisibleRowRange();
43911
+ let rowEnd = table.getBodyVisibleRowRange().rowEnd;
43912
+ rowEnd = Math.min(table.rowCount - 1 - table.bottomFrozenRowCount, rowEnd);
43913
+ const chartDimensionLinkage = table.options.chartDimensionLinkage;
43914
+ if (row === rowEnd && isShowTooltip) {
43915
+ const heightLimitToShowTooltipForEdgeRow = null !== (_a = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow) && void 0 !== _a ? _a : 0,
43916
+ {
43917
+ rowEnd: rowEnd1
43918
+ } = table.getBodyVisibleRowRange(0, -heightLimitToShowTooltipForEdgeRow);
43919
+ if (rowEnd1 === rowEnd) isShowTooltip = !0;else {
43920
+ const {
43921
+ rowEnd: rowEnd2
43922
+ } = table.getBodyVisibleRowRange(0, 5);
43923
+ isShowTooltip = rowEnd2 !== rowEnd;
43924
+ }
43925
+ } else if (row === rowStart && isShowTooltip) {
43926
+ const heightLimitToShowTooltipForEdgeRow = null !== (_b = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow) && void 0 !== _b ? _b : 0,
43927
+ {
43928
+ rowStart: rowStart1
43929
+ } = table.getBodyVisibleRowRange(heightLimitToShowTooltipForEdgeRow, 0);
43930
+ if (rowStart1 === rowStart) isShowTooltip = !0;else {
43931
+ const {
43932
+ rowStart: rowStart2
43933
+ } = table.getBodyVisibleRowRange(0, -5);
43934
+ isShowTooltip = rowStart2 !== rowStart;
43935
+ }
43936
+ }
43937
+ return isShowTooltip;
43938
+ }
43939
+ function checkIsShowTooltipForEdgeColumn(col, table) {
43940
+ let isShowTooltip = !0;
43941
+ const {
43942
+ colStart: colStart
43943
+ } = table.getBodyVisibleColRange();
43944
+ let colEnd = table.getBodyVisibleColRange().colEnd;
43945
+ colEnd = Math.min(table.colCount - 1 - table.rightFrozenColCount, colEnd);
43946
+ const chartDimensionLinkage = table.options.chartDimensionLinkage;
43947
+ if (col === colEnd && isShowTooltip) {
43948
+ const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
43949
+ {
43950
+ colEnd: colEnd1
43951
+ } = table.getBodyVisibleColRange(0, -widthLimitToShowTooltipForEdgeColumn);
43952
+ if (colEnd1 === colEnd) isShowTooltip = !0;else {
43953
+ const {
43954
+ colEnd: colEnd2
43955
+ } = table.getBodyVisibleColRange(0, 5);
43956
+ isShowTooltip = colEnd2 !== colEnd;
43957
+ }
43958
+ } else if (col === colStart && isShowTooltip) {
43959
+ const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
43960
+ {
43961
+ colStart: colStart1
43962
+ } = table.getBodyVisibleColRange(widthLimitToShowTooltipForEdgeColumn, 0);
43963
+ if (colStart1 === colStart) isShowTooltip = !0;else {
43964
+ const {
43965
+ colStart: colStart2
43966
+ } = table.getBodyVisibleColRange(0, -5);
43967
+ isShowTooltip = colStart2 !== colStart;
43968
+ }
43969
+ }
43970
+ return isShowTooltip;
43971
+ }
43972
+ function clearChartInstanceListByColumnDirection(col, excludedRow, table, forceRelease = !1) {
43973
+ var _a;
43974
+ if (isValid$1(chartInstanceListColumnByColumnDirection[col])) {
43975
+ for (const i in chartInstanceListColumnByColumnDirection[col]) {
43976
+ if (isValid$1(excludedRow) && Number(i) === excludedRow) continue;
43977
+ const cellGroup = table.scenegraph.getCell(col, Number(i)),
43978
+ chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
43979
+ isValid$1(chartNode) && (chartNode.addUpdateShapeAndBoundsTag(), chartNode.deactivate(table, {
43980
+ forceRelease: forceRelease,
43981
+ releaseChartInstance: !0,
43982
+ releaseColumnChartInstance: !1,
43983
+ releaseRowChartInstance: !1
43984
+ }), chartInstanceListColumnByColumnDirection[col][i] = null);
43985
+ }
43986
+ delete chartInstanceListColumnByColumnDirection[col];
43987
+ }
43988
+ }
43989
+ function clearChartInstanceListByRowDirection(row, excludedCol, table, forceRelease = !1) {
43881
43990
  var _a;
43882
43991
  if (isValid$1(chartInstanceListRowByRowDirection[row])) for (const i in chartInstanceListRowByRowDirection[row]) {
43883
43992
  if (isValid$1(excludedCol) && Number(i) === excludedCol) continue;
43884
43993
  const cellGroup = table.scenegraph.getCell(Number(i), row),
43885
43994
  chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
43886
- chartNode.addUpdateShapeAndBoundsTag(), isValid$1(chartNode) && (chartNode.deactivate(table, {
43995
+ isValid$1(chartNode) && (chartNode.addUpdateShapeAndBoundsTag(), chartNode.deactivate(table, {
43996
+ forceRelease: forceRelease,
43887
43997
  releaseChartInstance: !0,
43888
43998
  releaseColumnChartInstance: !1,
43889
43999
  releaseRowChartInstance: !1
@@ -43891,6 +44001,15 @@
43891
44001
  }
43892
44002
  delete chartInstanceListRowByRowDirection[row];
43893
44003
  }
44004
+ function clearDelayRunDimensionHoverTimers() {
44005
+ for (const timer of delayRunDimensionHoverTimer) clearTimeout(timer);
44006
+ delayRunDimensionHoverTimer.length = 0;
44007
+ }
44008
+ function clearAllChartInstanceList(table, forceRelease = !1) {
44009
+ clearDelayRunDimensionHoverTimers();
44010
+ for (const col in chartInstanceListColumnByColumnDirection) clearChartInstanceListByColumnDirection(Number(col), void 0, table, forceRelease);
44011
+ for (const row in chartInstanceListRowByRowDirection) clearChartInstanceListByRowDirection(Number(row), void 0, table, forceRelease);
44012
+ }
43894
44013
 
43895
44014
  function isValidAlignDomain(domain) {
43896
44015
  return 2 === domain.length && isValidNumber$1(domain[0]) && isValidNumber$1(domain[1]) && domain[1] >= domain[0];
@@ -44524,7 +44643,7 @@
44524
44643
  const CHART_NUMBER_TYPE = genNumberType();
44525
44644
  class Chart extends Rect$1 {
44526
44645
  constructor(isShareChartSpec, params) {
44527
- 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 {
44646
+ 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 {
44528
44647
  const chartInstance = this.chartInstance = new params.ClassType(params.spec, merge({}, this.attribute.tableChartOption, {
44529
44648
  renderCanvas: params.canvas,
44530
44649
  mode: "node" === this.attribute.mode ? "node" : "desktop-browser",
@@ -44545,7 +44664,7 @@
44545
44664
  }
44546
44665
  }
44547
44666
  activate(table) {
44548
- var _a, _b, _c, _d, _e;
44667
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
44549
44668
  if (this.activeChartInstance) return;
44550
44669
  const {
44551
44670
  col: col,
@@ -44564,7 +44683,7 @@
44564
44683
  y1: y1 - table.scrollTop,
44565
44684
  y2: y2 - table.scrollTop
44566
44685
  });
44567
- 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, {
44686
+ this.attribute.ClassType.globalConfig.uniqueTooltip = !1, this.activeChartInstance = new this.attribute.ClassType(this.attribute.spec, merge({}, this.attribute.tableChartOption, {
44568
44687
  renderCanvas: this.attribute.canvas,
44569
44688
  mode: "desktop-browser",
44570
44689
  canvasControled: !1,
@@ -44598,7 +44717,7 @@
44598
44717
  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());
44599
44718
  }
44600
44719
  },
44601
- componentShowContent: table.options.chartDimensionLinkage && "scatter" !== this.attribute.spec.type ? {
44720
+ componentShowContent: (null === (_a = table.options.chartDimensionLinkage) || void 0 === _a ? void 0 : _a.showTooltip) && "scatter" !== this.attribute.spec.type ? {
44602
44721
  tooltip: {
44603
44722
  dimension: !1,
44604
44723
  mark: !0
@@ -44609,15 +44728,40 @@
44609
44728
  const chartStage = this.activeChartInstance.getStage(),
44610
44729
  matrix = this.globalTransMatrix.clone(),
44611
44730
  stageMatrix = this.stage.window.getViewBoxTransform();
44731
+ let brushChangeThrottle;
44612
44732
  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 => {
44613
44733
  var _a;
44614
- !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);
44734
+ !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");
44735
+ }), (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 => {
44736
+ var _a;
44737
+ brushChangeThrottle.throttled(null === (_a = null == params ? void 0 : params.value) || void 0 === _a ? void 0 : _a.inBrushData, "brush");
44738
+ })), this.activeChartInstance.on("brushStart", params => {
44739
+ const brushingChartInstance = getBrushingChartInstance();
44740
+ brushingChartInstance !== this.activeChartInstance && (brushingChartInstance && brushingChartInstance.getChart().getComponentsByKey("brush")[0].clearBrushStateAndMask(), setBrushingChartInstance(this.activeChartInstance, col, row));
44615
44741
  }), this.activeChartInstance.on("brushEnd", params => {
44616
44742
  var _a;
44617
- table.scenegraph.updateChartState(null === (_a = null == params ? void 0 : params.value) || void 0 === _a ? void 0 : _a.inBrushData), Chart.temp = 0, setTimeout(() => {
44743
+ 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(() => {
44618
44744
  Chart.temp = 1;
44619
44745
  }, 0);
44620
- }), table.options.chartDimensionLinkage && this.activeChartInstance.on("dimensionHover", params => {
44746
+ }), (null === (_g = table.options.chartDimensionLinkage) || void 0 === _g ? void 0 : _g.showTooltip) && ("pie" === this.attribute.spec.type && (this.activeChartInstance.on("pointerover", {
44747
+ markName: "pie"
44748
+ }, params => {
44749
+ var _a;
44750
+ const categoryField = this.attribute.spec.categoryField,
44751
+ datum = {
44752
+ [categoryField]: null === (_a = null == params ? void 0 : params.datum) || void 0 === _a ? void 0 : _a[categoryField]
44753
+ };
44754
+ generateChartInstanceListByViewRange(datum, table, !1);
44755
+ }), this.activeChartInstance.on("pointerout", {
44756
+ markName: "pie"
44757
+ }, params => {
44758
+ var _a;
44759
+ const categoryField = this.attribute.spec.categoryField,
44760
+ datum = {
44761
+ [categoryField]: null === (_a = null == params ? void 0 : params.datum) || void 0 === _a ? void 0 : _a[categoryField]
44762
+ };
44763
+ generateChartInstanceListByViewRange(datum, table, !0);
44764
+ })), this.activeChartInstance.on("dimensionHover", params => {
44621
44765
  var _a, _b;
44622
44766
  const dimensionInfo = null == params ? void 0 : params.dimensionInfo[0],
44623
44767
  canvasXY = null === (_a = null == params ? void 0 : params.event) || void 0 === _a ? void 0 : _a.canvas,
@@ -44680,21 +44824,23 @@
44680
44824
  }
44681
44825
  }
44682
44826
  }
44683
- }), null === (_e = (_d = table)._bindChartEvent) || void 0 === _e || _e.call(_d, this.activeChartInstance);
44827
+ })), null === (_j = (_h = table)._bindChartEvent) || void 0 === _j || _j.call(_h, this.activeChartInstance);
44684
44828
  }
44685
44829
  deactivate(table, {
44830
+ forceRelease = !1,
44686
44831
  releaseChartInstance = !0,
44687
44832
  releaseColumnChartInstance = !0,
44688
- releaseRowChartInstance = !0
44833
+ releaseRowChartInstance = !0,
44834
+ releaseAllChartInstance = !1
44689
44835
  } = {}) {
44690
44836
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
44691
44837
  if (this.activeChartInstanceHoverOnMark = null, this.justShowMarkTooltip = void 0, this.justShowMarkTooltipTimer = Date.now(), clearTimeout(this.delayRunDimensionHoverTimer), this.delayRunDimensionHoverTimer = void 0, releaseChartInstance) {
44692
- null === (_a = this.activeChartInstance) || void 0 === _a || _a.updateViewBox({
44838
+ !forceRelease && getBrushingChartInstance() && getBrushingChartInstance() === this.activeChartInstance || (null === (_a = this.activeChartInstance) || void 0 === _a || _a.updateViewBox({
44693
44839
  x1: -1e3,
44694
44840
  x2: -800,
44695
44841
  y1: -1e3,
44696
44842
  y2: -800
44697
- }, !1, !1), null === (_b = this.activeChartInstance) || void 0 === _b || _b.release(), this.activeChartInstance = null;
44843
+ }, !1, !1), null === (_b = this.activeChartInstance) || void 0 === _b || _b.release(), this.activeChartInstance = null);
44698
44844
  const {
44699
44845
  col: col,
44700
44846
  row: row
@@ -44707,7 +44853,7 @@
44707
44853
  } = this.parent;
44708
44854
  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));
44709
44855
  }
44710
- 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);
44856
+ 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));
44711
44857
  }
44712
44858
  updateData(data) {
44713
44859
  this.attribute.data = data;
@@ -44722,13 +44868,14 @@
44722
44868
  y1: y1,
44723
44869
  x2: x2,
44724
44870
  y2: y2
44725
- } = cellGroup.globalAABBBounds;
44726
- return {
44727
- 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)),
44728
- 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)),
44729
- 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)),
44730
- 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))
44731
- };
44871
+ } = cellGroup.globalAABBBounds,
44872
+ viewBox = {
44873
+ 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)),
44874
+ 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)),
44875
+ 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)),
44876
+ 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))
44877
+ };
44878
+ return this.activeChartInstance ? this.activeChartInstanceLastViewBox = viewBox : this.activeChartInstanceLastViewBox = null, viewBox;
44732
44879
  }
44733
44880
  }
44734
44881
  function getTableBounds(col, row, table) {
@@ -44943,7 +45090,7 @@
44943
45090
  {
44944
45091
  width = groupAttribute.width,
44945
45092
  height = groupAttribute.height
44946
- } = (chart.getViewBox(), chart.attribute),
45093
+ } = chart.attribute,
44947
45094
  {
44948
45095
  table: table
44949
45096
  } = chart.getRootNode(),
@@ -44971,8 +45118,9 @@
44971
45118
  });
44972
45119
  }
44973
45120
  }
44974
- const viewBox = chart.getViewBox();
44975
- activeChartInstance.updateViewBox({
45121
+ const lastViewBox = chart.activeChartInstanceLastViewBox,
45122
+ viewBox = chart.getViewBox();
45123
+ lastViewBox && viewBox.x1 === lastViewBox.x1 && viewBox.x2 === lastViewBox.x2 && viewBox.y1 === lastViewBox.y1 && viewBox.y2 === lastViewBox.y2 || activeChartInstance.updateViewBox({
44976
45124
  x1: 0,
44977
45125
  x2: viewBox.x2 - viewBox.x1,
44978
45126
  y1: 0,
@@ -48490,9 +48638,10 @@
48490
48638
  });
48491
48639
  }
48492
48640
  }
48493
- function updateChartState(scenegraph, datum) {
48641
+ function updateChartState(scenegraph, datum, selectedDataMode) {
48494
48642
  const table = scenegraph.table;
48495
48643
  if (table.isPivotChart()) {
48644
+ table._selectedDataMode = selectedDataMode;
48496
48645
  const preSelectItemsCount = table._selectedDataItemsInChart.length;
48497
48646
  if ((null == datum || 0 === (null == datum ? void 0 : datum.length) || 0 === Object.keys(datum).length) && 0 === preSelectItemsCount) return;
48498
48647
  const newSelectedDataItemsInChart = [];
@@ -49240,16 +49389,36 @@
49240
49389
  resetResidentHoverIcon(col, row) {
49241
49390
  resetResidentHoverIcon(col, row, this);
49242
49391
  }
49243
- deactivateChart(col, row) {
49244
- var _a, _b, _c;
49245
- if (-1 === col || -1 === row) return;
49392
+ deactivateChart(col, row, forceRelease = !1) {
49393
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
49394
+ if (-1 === col || -1 === row) {
49395
+ if (forceRelease) {
49396
+ const brushingChartInstanceCellPos = getBrushingChartInstanceCellPos(),
49397
+ cellGroup = this.getCell(brushingChartInstanceCellPos.col, brushingChartInstanceCellPos.row);
49398
+ (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, {
49399
+ forceRelease: !0,
49400
+ releaseChartInstance: !0,
49401
+ releaseColumnChartInstance: !0,
49402
+ releaseRowChartInstance: !0,
49403
+ releaseAllChartInstance: !0
49404
+ }));
49405
+ }
49406
+ return;
49407
+ }
49246
49408
  const cellGroup = this.getCell(col, row);
49247
- if (null === (_a = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _a ? void 0 : _a.deactivate) {
49409
+ if (null === (_d = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _d ? void 0 : _d.deactivate) {
49410
+ 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, {
49411
+ forceRelease: !0,
49412
+ releaseChartInstance: !0,
49413
+ releaseColumnChartInstance: !0,
49414
+ releaseRowChartInstance: !0,
49415
+ releaseAllChartInstance: !0
49416
+ }));
49248
49417
  const chartType = (null == cellGroup ? void 0 : cellGroup.firstChild).attribute.spec.type;
49249
- 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 ? {
49250
- 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,
49251
- 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,
49252
- 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
49418
+ 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) ? {
49419
+ 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),
49420
+ 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),
49421
+ 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)
49253
49422
  } : void 0);
49254
49423
  }
49255
49424
  }
@@ -49297,8 +49466,15 @@
49297
49466
  updateChartSizeForResizeRowHeight(row) {
49298
49467
  updateChartSizeForResizeRowHeight(this, row);
49299
49468
  }
49300
- updateChartState(datum) {
49301
- this.table.isPivotChart() && updateChartState(this, datum);
49469
+ updateChartState(datum, selectedDataMode) {
49470
+ var _a, _b;
49471
+ if (this.table.isPivotChart()) {
49472
+ if (null == datum || 0 === (null == datum ? void 0 : datum.length) || 0 === Object.keys(datum).length) {
49473
+ const brushingChartInstance = getBrushingChartInstance();
49474
+ 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);
49475
+ }
49476
+ updateChartState(this, datum, selectedDataMode);
49477
+ }
49302
49478
  }
49303
49479
  updateCheckboxCellState(col, row, checked) {
49304
49480
  var _a, _b;
@@ -52325,7 +52501,7 @@
52325
52501
  }, 0 !== e.button) return;
52326
52502
  const eventArgsSet = getCellEventArgsSet(e);
52327
52503
  if (eventManager.downIcon = void 0, stateManager.interactionState !== InteractionState.default) return;
52328
- 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;
52504
+ 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;
52329
52505
  const isCompleteEdit = null === (_e = table.editorManager) || void 0 === _e ? void 0 : _e.completeEdit(e.nativeEvent);
52330
52506
  getPromiseValue(isCompleteEdit, isCompleteEdit => {
52331
52507
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
@@ -52353,7 +52529,7 @@
52353
52529
  }
52354
52530
  eventManager.dealTableHover(eventArgsSet);
52355
52531
  } else {
52356
- if (!eventManager.checkCellFillhandle(eventArgsSet) && (eventManager.checkColumnResize(eventArgsSet, !0) || eventManager.checkRowResize(eventArgsSet, !0))) return table.scenegraph.updateChartState(null), void stateManager.updateInteractionState(InteractionState.grabing);
52532
+ if (!eventManager.checkCellFillhandle(eventArgsSet) && (eventManager.checkColumnResize(eventArgsSet, !0) || eventManager.checkRowResize(eventArgsSet, !0))) return table.scenegraph.updateChartState(null, void 0), void stateManager.updateInteractionState(InteractionState.grabing);
52357
52533
  if (eventManager.checkColumnMover(eventArgsSet)) return void stateManager.updateInteractionState(InteractionState.grabing);
52358
52534
  if (eventManager.checkCellFillhandle(eventArgsSet, !0) && eventManager.dealFillSelect(eventArgsSet)) return void stateManager.updateInteractionState(InteractionState.grabing);
52359
52535
  eventManager.dealTableSelect(eventArgsSet) && stateManager.updateInteractionState(InteractionState.grabing);
@@ -52505,7 +52681,7 @@
52505
52681
  if (!(null === (_a = table.options.customConfig) || void 0 === _a ? void 0 : _a.selectCellWhenCellEditorNotExists) && !1 === isCompleteEdit) return;
52506
52682
  const hitIcon = (null === (_b = e.target.role) || void 0 === _b ? void 0 : _b.startsWith("icon")) ? e.target : void 0;
52507
52683
  if (eventManager.downIcon = hitIcon, "touch" === e.pointerType || hitIcon || eventManager.checkCellFillhandle(eventArgsSet) || stateManager.columnResize.resizing || !eventManager.checkColumnResize(eventArgsSet, !0)) ;else {
52508
- table.scenegraph.updateChartState(null), stateManager.updateInteractionState(InteractionState.grabing);
52684
+ table.scenegraph.updateChartState(null, void 0), stateManager.updateInteractionState(InteractionState.grabing);
52509
52685
  const {
52510
52686
  eventArgs: eventArgs
52511
52687
  } = eventArgsSet;
@@ -52524,7 +52700,7 @@
52524
52700
  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 {
52525
52701
  stateManager.updateInteractionState(InteractionState.default), eventManager.dealTableHover();
52526
52702
  const isHasSelected = !!(null === (_a = stateManager.select.ranges) || void 0 === _a ? void 0 : _a.length);
52527
- (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);
52703
+ (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);
52528
52704
  }
52529
52705
  }), table.scenegraph.stage.addEventListener("pointermove", e => {
52530
52706
  var _a, _b, _c;
@@ -52642,7 +52818,15 @@
52642
52818
  table.stateManager.setCheckedState(col, row, cellInfo.field, e.detail.checked), table.fireListeners(TABLE_EVENT_TYPE.SWITCH_STATE_CHANGE, cellsEvent), table.scenegraph.updateNextFrame();
52643
52819
  }), table.scenegraph.stage.addEventListener("wheel", e => {
52644
52820
  var _a;
52645
- e.path.find(node => "legend" === node.name) || (null === (_a = table.editorManager) || void 0 === _a || _a.completeEdit(), table.eventManager._enableTableScroll && handleWhell(e, stateManager));
52821
+ if (!e.path.find(node => "legend" === node.name)) {
52822
+ null === (_a = table.editorManager) || void 0 === _a || _a.completeEdit();
52823
+ const {
52824
+ cellPos: cellPos
52825
+ } = table.stateManager.hover,
52826
+ prevHoverCellCol = cellPos.col,
52827
+ prevHoverCellRow = cellPos.row;
52828
+ table.scenegraph.deactivateChart(prevHoverCellCol, prevHoverCellRow, !0), table.eventManager._enableTableScroll && handleWhell(e, stateManager);
52829
+ }
52646
52830
  });
52647
52831
  }
52648
52832
  function bindGesture(eventManager) {
@@ -56054,7 +56238,7 @@
56054
56238
  }
56055
56239
  constructor(container, options = {}) {
56056
56240
  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;
56057
- 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");
56241
+ 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");
56058
56242
  this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
56059
56243
  options: options,
56060
56244
  container: container