@visactor/vtable 1.22.11 → 1.22.12-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/PivotChart.d.ts +3 -0
- package/cjs/PivotChart.js +16 -7
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/core/BaseTable.js +1 -1
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/event/listener/container-dom.js +4 -4
- package/cjs/event/listener/container-dom.js.map +1 -1
- package/cjs/event/listener/scroll-bar.js +8 -2
- package/cjs/event/listener/scroll-bar.js.map +1 -1
- package/cjs/event/listener/table-group.js +14 -8
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/pivot-header-layout.d.ts +6 -0
- package/cjs/layout/pivot-header-layout.js +45 -25
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/scenegraph/graphic/active-cell-chart-list.d.ts +19 -2
- package/cjs/scenegraph/graphic/active-cell-chart-list.js +231 -75
- package/cjs/scenegraph/graphic/active-cell-chart-list.js.map +1 -1
- package/cjs/scenegraph/graphic/chart.d.ts +10 -1
- package/cjs/scenegraph/graphic/chart.js +63 -27
- package/cjs/scenegraph/graphic/chart.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render.js +3 -4
- package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/cjs/scenegraph/refresh-node/update-chart.d.ts +1 -1
- package/cjs/scenegraph/refresh-node/update-chart.js +8 -4
- package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +2 -2
- package/cjs/scenegraph/scenegraph.js +30 -9
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/tools/util.d.ts +5 -0
- package/cjs/tools/util.js +22 -4
- package/cjs/tools/util.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +1 -1
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +7 -0
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +645 -199
- package/dist/vtable.min.js +2 -2
- package/es/PivotChart.d.ts +3 -0
- package/es/PivotChart.js +17 -6
- package/es/PivotChart.js.map +1 -1
- package/es/core/BaseTable.js +1 -1
- package/es/core/BaseTable.js.map +1 -1
- package/es/event/listener/container-dom.js +4 -4
- package/es/event/listener/container-dom.js.map +1 -1
- package/es/event/listener/scroll-bar.js +8 -2
- package/es/event/listener/scroll-bar.js.map +1 -1
- package/es/event/listener/table-group.js +13 -8
- package/es/event/listener/table-group.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/layout/pivot-header-layout.d.ts +6 -0
- package/es/layout/pivot-header-layout.js +45 -24
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/scenegraph/graphic/active-cell-chart-list.d.ts +19 -2
- package/es/scenegraph/graphic/active-cell-chart-list.js +216 -68
- package/es/scenegraph/graphic/active-cell-chart-list.js.map +1 -1
- package/es/scenegraph/graphic/chart.d.ts +10 -1
- package/es/scenegraph/graphic/chart.js +59 -25
- package/es/scenegraph/graphic/chart.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render.js +3 -4
- package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/es/scenegraph/refresh-node/update-chart.d.ts +1 -1
- package/es/scenegraph/refresh-node/update-chart.js +9 -3
- package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +2 -2
- package/es/scenegraph/scenegraph.js +31 -9
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/tools/util.d.ts +5 -0
- package/es/tools/util.js +18 -0
- package/es/tools/util.js.map +1 -1
- package/es/ts-types/base-table.d.ts +1 -1
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +7 -0
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +5 -5
package/dist/vtable.js
CHANGED
|
@@ -36018,6 +36018,47 @@
|
|
|
36018
36018
|
}
|
|
36019
36019
|
};
|
|
36020
36020
|
}
|
|
36021
|
+
function cancellableThrottle(func, delay) {
|
|
36022
|
+
let timer = null;
|
|
36023
|
+
let lastArgs = null;
|
|
36024
|
+
let context = null;
|
|
36025
|
+
const throttled = function (...args) {
|
|
36026
|
+
lastArgs = args;
|
|
36027
|
+
context = this;
|
|
36028
|
+
if (!timer) {
|
|
36029
|
+
timer = setTimeout(() => {
|
|
36030
|
+
if (lastArgs) {
|
|
36031
|
+
func.apply(context, lastArgs);
|
|
36032
|
+
}
|
|
36033
|
+
timer = null;
|
|
36034
|
+
lastArgs = null;
|
|
36035
|
+
context = null;
|
|
36036
|
+
}, delay);
|
|
36037
|
+
}
|
|
36038
|
+
};
|
|
36039
|
+
const cancel = () => {
|
|
36040
|
+
if (timer) {
|
|
36041
|
+
clearTimeout(timer);
|
|
36042
|
+
timer = null;
|
|
36043
|
+
lastArgs = null;
|
|
36044
|
+
context = null;
|
|
36045
|
+
}
|
|
36046
|
+
};
|
|
36047
|
+
const flush = () => {
|
|
36048
|
+
if (timer && lastArgs) {
|
|
36049
|
+
clearTimeout(timer);
|
|
36050
|
+
func.apply(context, lastArgs);
|
|
36051
|
+
timer = null;
|
|
36052
|
+
lastArgs = null;
|
|
36053
|
+
context = null;
|
|
36054
|
+
}
|
|
36055
|
+
};
|
|
36056
|
+
return {
|
|
36057
|
+
throttled,
|
|
36058
|
+
cancel,
|
|
36059
|
+
flush
|
|
36060
|
+
};
|
|
36061
|
+
}
|
|
36021
36062
|
function pad(num, totalChars) {
|
|
36022
36063
|
const pad = '0';
|
|
36023
36064
|
num = `${num}`;
|
|
@@ -48974,9 +49015,46 @@
|
|
|
48974
49015
|
return hoverMode;
|
|
48975
49016
|
}
|
|
48976
49017
|
|
|
49018
|
+
let brushingChartInstance;
|
|
49019
|
+
let brushingChartInstanceCellPos = { col: -1, row: -1 };
|
|
49020
|
+
function setBrushingChartInstance(chartInstance, col, row) {
|
|
49021
|
+
brushingChartInstance = chartInstance;
|
|
49022
|
+
brushingChartInstanceCellPos = { col, row };
|
|
49023
|
+
}
|
|
49024
|
+
function clearAndReleaseBrushingChartInstance(scenegraph) {
|
|
49025
|
+
enableTooltipToAllChartInstances();
|
|
49026
|
+
const cellGroup = scenegraph.getCell(brushingChartInstanceCellPos.col, brushingChartInstanceCellPos.row);
|
|
49027
|
+
if (cellGroup?.firstChild?.deactivate) {
|
|
49028
|
+
cellGroup?.firstChild?.deactivate?.(scenegraph.table, {
|
|
49029
|
+
forceRelease: true,
|
|
49030
|
+
releaseChartInstance: true,
|
|
49031
|
+
releaseColumnChartInstance: false,
|
|
49032
|
+
releaseRowChartInstance: false,
|
|
49033
|
+
releaseAllChartInstance: false
|
|
49034
|
+
});
|
|
49035
|
+
}
|
|
49036
|
+
if (isValid$1(chartInstanceListColumnByColumnDirection[brushingChartInstanceCellPos.col])) {
|
|
49037
|
+
delete chartInstanceListColumnByColumnDirection[brushingChartInstanceCellPos.col][brushingChartInstanceCellPos.row];
|
|
49038
|
+
}
|
|
49039
|
+
if (isValid$1(chartInstanceListRowByRowDirection[brushingChartInstanceCellPos.row])) {
|
|
49040
|
+
delete chartInstanceListRowByRowDirection[brushingChartInstanceCellPos.row][brushingChartInstanceCellPos.col];
|
|
49041
|
+
}
|
|
49042
|
+
brushingChartInstance = undefined;
|
|
49043
|
+
brushingChartInstanceCellPos = { col: -1, row: -1 };
|
|
49044
|
+
}
|
|
49045
|
+
function getBrushingChartInstance() {
|
|
49046
|
+
return brushingChartInstance;
|
|
49047
|
+
}
|
|
49048
|
+
function getBrushingChartInstanceCellPos() {
|
|
49049
|
+
return brushingChartInstanceCellPos;
|
|
49050
|
+
}
|
|
48977
49051
|
const chartInstanceListColumnByColumnDirection = {};
|
|
48978
49052
|
const chartInstanceListRowByRowDirection = {};
|
|
49053
|
+
const delayRunDimensionHoverTimerForColumnDirection = [];
|
|
49054
|
+
const delayRunDimensionHoverTimerForRowDirection = [];
|
|
49055
|
+
const delayRunDimensionHoverTimerForViewRange = [];
|
|
48979
49056
|
function generateChartInstanceListByColumnDirection(col, dimensionValueOrXValue, positionValueOrYValue, canvasXY, table, hideTooltip = false, isScatter = false) {
|
|
49057
|
+
clearDelayRunDimensionHoverTimerForColumnDirection();
|
|
48980
49058
|
if (!isValid$1(chartInstanceListColumnByColumnDirection[col])) {
|
|
48981
49059
|
chartInstanceListColumnByColumnDirection[col] = {};
|
|
48982
49060
|
}
|
|
@@ -48986,9 +49064,9 @@
|
|
|
48986
49064
|
for (let i = rowStart; i <= rowEnd; i++) {
|
|
48987
49065
|
const cellGroup = table.scenegraph.getCell(col, i);
|
|
48988
49066
|
const chartNode = cellGroup?.getChildren()?.[0];
|
|
48989
|
-
chartNode.addUpdateShapeAndBoundsTag();
|
|
48990
49067
|
if (chartInstanceListColumnByColumnDirection[col][i]) ;
|
|
48991
49068
|
else if (isValid$1(chartNode)) {
|
|
49069
|
+
chartNode.addUpdateShapeAndBoundsTag();
|
|
48992
49070
|
if (chartNode.activeChartInstance) {
|
|
48993
49071
|
chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance;
|
|
48994
49072
|
}
|
|
@@ -48997,44 +49075,13 @@
|
|
|
48997
49075
|
chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance;
|
|
48998
49076
|
}
|
|
48999
49077
|
}
|
|
49000
|
-
setTimeout(() => {
|
|
49078
|
+
const timer = setTimeout(() => {
|
|
49001
49079
|
if (chartInstanceListColumnByColumnDirection[col]?.[i]) {
|
|
49002
49080
|
const chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
49003
49081
|
let isShowTooltip = !isScatter;
|
|
49004
49082
|
if (!isScatter && typeof chartDimensionLinkage === 'object') {
|
|
49005
49083
|
isShowTooltip = chartDimensionLinkage.showTooltip ?? true;
|
|
49006
|
-
|
|
49007
|
-
const heightLimitToShowTooltipForEdgeRow = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow ?? 0;
|
|
49008
|
-
const { rowEnd: rowEnd1 } = table.getBodyVisibleRowRange(0, -heightLimitToShowTooltipForEdgeRow);
|
|
49009
|
-
if (rowEnd1 === rowEnd) {
|
|
49010
|
-
isShowTooltip = true;
|
|
49011
|
-
}
|
|
49012
|
-
else {
|
|
49013
|
-
const { rowEnd: rowEnd2 } = table.getBodyVisibleRowRange(0, 5);
|
|
49014
|
-
if (rowEnd2 !== rowEnd) {
|
|
49015
|
-
isShowTooltip = true;
|
|
49016
|
-
}
|
|
49017
|
-
else {
|
|
49018
|
-
isShowTooltip = false;
|
|
49019
|
-
}
|
|
49020
|
-
}
|
|
49021
|
-
}
|
|
49022
|
-
else if (i === rowStart && isShowTooltip) {
|
|
49023
|
-
const heightLimitToShowTooltipForEdgeRow = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow ?? 0;
|
|
49024
|
-
const { rowStart: rowStart1 } = table.getBodyVisibleRowRange(heightLimitToShowTooltipForEdgeRow, 0);
|
|
49025
|
-
if (rowStart1 === rowStart) {
|
|
49026
|
-
isShowTooltip = true;
|
|
49027
|
-
}
|
|
49028
|
-
else {
|
|
49029
|
-
const { rowStart: rowStart2 } = table.getBodyVisibleRowRange(0, -5);
|
|
49030
|
-
if (rowStart2 !== rowStart) {
|
|
49031
|
-
isShowTooltip = true;
|
|
49032
|
-
}
|
|
49033
|
-
else {
|
|
49034
|
-
isShowTooltip = false;
|
|
49035
|
-
}
|
|
49036
|
-
}
|
|
49037
|
-
}
|
|
49084
|
+
isShowTooltip = isShowTooltip && checkIsShowTooltipForEdgeRow(i, table);
|
|
49038
49085
|
}
|
|
49039
49086
|
if (isScatter) {
|
|
49040
49087
|
if (table.stateManager.hover.cellPos.col !== col || table.stateManager.hover.cellPos.row !== i) {
|
|
@@ -49047,6 +49094,7 @@
|
|
|
49047
49094
|
}
|
|
49048
49095
|
}
|
|
49049
49096
|
else {
|
|
49097
|
+
const cellBoundry = table.getCellRelativeRect(col, i);
|
|
49050
49098
|
const bodyBoundryTop = table.frozenRowCount
|
|
49051
49099
|
? table.getCellRelativeRect(col, table.frozenRowCount - 1).bottom
|
|
49052
49100
|
: 0;
|
|
@@ -49057,43 +49105,32 @@
|
|
|
49057
49105
|
}
|
|
49058
49106
|
chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
49059
49107
|
tooltip: false,
|
|
49060
|
-
showTooltipOption: {
|
|
49108
|
+
showTooltipOption: {
|
|
49109
|
+
x: canvasXY.x - cellBoundry.left,
|
|
49110
|
+
y: absolutePositionTop - cellBoundry.top,
|
|
49111
|
+
activeType: 'dimension'
|
|
49112
|
+
}
|
|
49061
49113
|
});
|
|
49062
49114
|
}
|
|
49063
49115
|
else {
|
|
49064
49116
|
chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
49065
49117
|
tooltip: isShowTooltip,
|
|
49066
|
-
showTooltipOption: {
|
|
49118
|
+
showTooltipOption: {
|
|
49119
|
+
x: canvasXY.x - cellBoundry.left,
|
|
49120
|
+
y: absolutePositionTop - cellBoundry.top,
|
|
49121
|
+
activeType: 'dimension'
|
|
49122
|
+
}
|
|
49067
49123
|
});
|
|
49068
49124
|
}
|
|
49069
49125
|
}
|
|
49070
49126
|
}
|
|
49071
49127
|
}, 0);
|
|
49128
|
+
delayRunDimensionHoverTimerForColumnDirection.push(timer);
|
|
49072
49129
|
table.scenegraph.updateNextFrame();
|
|
49073
49130
|
}
|
|
49074
49131
|
}
|
|
49075
|
-
function clearChartInstanceListByColumnDirection(col, excludedRow, table) {
|
|
49076
|
-
if (isValid$1(chartInstanceListColumnByColumnDirection[col])) {
|
|
49077
|
-
for (const i in chartInstanceListColumnByColumnDirection[col]) {
|
|
49078
|
-
if (isValid$1(excludedRow) && Number(i) === excludedRow) {
|
|
49079
|
-
continue;
|
|
49080
|
-
}
|
|
49081
|
-
const cellGroup = table.scenegraph.getCell(col, Number(i));
|
|
49082
|
-
const chartNode = cellGroup?.getChildren()?.[0];
|
|
49083
|
-
chartNode.addUpdateShapeAndBoundsTag();
|
|
49084
|
-
if (isValid$1(chartNode)) {
|
|
49085
|
-
chartNode.deactivate(table, {
|
|
49086
|
-
releaseChartInstance: true,
|
|
49087
|
-
releaseColumnChartInstance: false,
|
|
49088
|
-
releaseRowChartInstance: false
|
|
49089
|
-
});
|
|
49090
|
-
chartInstanceListColumnByColumnDirection[col][i] = null;
|
|
49091
|
-
}
|
|
49092
|
-
}
|
|
49093
|
-
delete chartInstanceListColumnByColumnDirection[col];
|
|
49094
|
-
}
|
|
49095
|
-
}
|
|
49096
49132
|
function generateChartInstanceListByRowDirection(row, dimensionValueOrXValue, positionValueOrYValue, canvasXY, table, hideTooltip = false, isScatter = false) {
|
|
49133
|
+
clearDelayRunDimensionHoverTimerForRowDirection();
|
|
49097
49134
|
if (!isValid$1(chartInstanceListRowByRowDirection[row])) {
|
|
49098
49135
|
chartInstanceListRowByRowDirection[row] = {};
|
|
49099
49136
|
}
|
|
@@ -49103,9 +49140,9 @@
|
|
|
49103
49140
|
for (let i = colStart; i <= colEnd; i++) {
|
|
49104
49141
|
const cellGroup = table.scenegraph.getCell(i, row);
|
|
49105
49142
|
const chartNode = cellGroup?.getChildren()?.[0];
|
|
49106
|
-
chartNode.addUpdateShapeAndBoundsTag();
|
|
49107
49143
|
if (chartInstanceListRowByRowDirection[row][i]) ;
|
|
49108
49144
|
else if (isValid$1(chartNode)) {
|
|
49145
|
+
chartNode.addUpdateShapeAndBoundsTag();
|
|
49109
49146
|
if (chartNode.activeChartInstance) {
|
|
49110
49147
|
chartInstanceListRowByRowDirection[row][i] = chartNode.activeChartInstance;
|
|
49111
49148
|
}
|
|
@@ -49114,44 +49151,13 @@
|
|
|
49114
49151
|
chartInstanceListRowByRowDirection[row][i] = chartNode.activeChartInstance;
|
|
49115
49152
|
}
|
|
49116
49153
|
}
|
|
49117
|
-
setTimeout(() => {
|
|
49154
|
+
const timer = setTimeout(() => {
|
|
49118
49155
|
if (chartInstanceListRowByRowDirection[row]?.[i]) {
|
|
49119
49156
|
const chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
49120
49157
|
let isShowTooltip = !isScatter;
|
|
49121
49158
|
if (!isScatter && typeof chartDimensionLinkage === 'object') {
|
|
49122
49159
|
isShowTooltip = chartDimensionLinkage.showTooltip ?? true;
|
|
49123
|
-
|
|
49124
|
-
const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn;
|
|
49125
|
-
const { colEnd: colEnd1 } = table.getBodyVisibleColRange(0, -widthLimitToShowTooltipForEdgeColumn);
|
|
49126
|
-
if (colEnd1 === colEnd) {
|
|
49127
|
-
isShowTooltip = true;
|
|
49128
|
-
}
|
|
49129
|
-
else {
|
|
49130
|
-
const { colEnd: colEnd2 } = table.getBodyVisibleColRange(0, 5);
|
|
49131
|
-
if (colEnd2 !== colEnd) {
|
|
49132
|
-
isShowTooltip = true;
|
|
49133
|
-
}
|
|
49134
|
-
else {
|
|
49135
|
-
isShowTooltip = false;
|
|
49136
|
-
}
|
|
49137
|
-
}
|
|
49138
|
-
}
|
|
49139
|
-
else if (i === colStart && isShowTooltip) {
|
|
49140
|
-
const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn;
|
|
49141
|
-
const { colStart: colStart1 } = table.getBodyVisibleColRange(widthLimitToShowTooltipForEdgeColumn, 0);
|
|
49142
|
-
if (colStart1 === colStart) {
|
|
49143
|
-
isShowTooltip = true;
|
|
49144
|
-
}
|
|
49145
|
-
else {
|
|
49146
|
-
const { colStart: colStart2 } = table.getBodyVisibleColRange(0, -5);
|
|
49147
|
-
if (colStart2 !== colStart) {
|
|
49148
|
-
isShowTooltip = true;
|
|
49149
|
-
}
|
|
49150
|
-
else {
|
|
49151
|
-
isShowTooltip = false;
|
|
49152
|
-
}
|
|
49153
|
-
}
|
|
49154
|
-
}
|
|
49160
|
+
isShowTooltip = isShowTooltip && checkIsShowTooltipForEdgeColumn(i, table);
|
|
49155
49161
|
}
|
|
49156
49162
|
if (isScatter) {
|
|
49157
49163
|
if (table.stateManager.hover.cellPos.col !== i || table.stateManager.hover.cellPos.row !== row) {
|
|
@@ -49164,6 +49170,7 @@
|
|
|
49164
49170
|
}
|
|
49165
49171
|
}
|
|
49166
49172
|
else {
|
|
49173
|
+
const cellBoundry = table.getCellRelativeRect(i, row);
|
|
49167
49174
|
const bodyBoundryLeft = table.frozenColCount
|
|
49168
49175
|
? table.getCellRelativeRect(table.frozenColCount - 1, row).right
|
|
49169
49176
|
: 0;
|
|
@@ -49174,22 +49181,188 @@
|
|
|
49174
49181
|
}
|
|
49175
49182
|
chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
49176
49183
|
tooltip: false,
|
|
49177
|
-
showTooltipOption: {
|
|
49184
|
+
showTooltipOption: {
|
|
49185
|
+
x: absolutePositionLeft - cellBoundry.left,
|
|
49186
|
+
y: canvasXY.y - cellBoundry.top,
|
|
49187
|
+
activeType: 'dimension'
|
|
49188
|
+
}
|
|
49178
49189
|
});
|
|
49179
49190
|
}
|
|
49180
49191
|
else {
|
|
49181
49192
|
chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
49182
49193
|
tooltip: isShowTooltip,
|
|
49183
|
-
showTooltipOption: {
|
|
49194
|
+
showTooltipOption: {
|
|
49195
|
+
x: absolutePositionLeft - cellBoundry.left,
|
|
49196
|
+
y: canvasXY.y - cellBoundry.top,
|
|
49197
|
+
activeType: 'dimension'
|
|
49198
|
+
}
|
|
49184
49199
|
});
|
|
49185
49200
|
}
|
|
49186
49201
|
}
|
|
49187
49202
|
}
|
|
49188
49203
|
}, 0);
|
|
49204
|
+
delayRunDimensionHoverTimerForRowDirection.push(timer);
|
|
49189
49205
|
table.scenegraph.updateNextFrame();
|
|
49190
49206
|
}
|
|
49191
49207
|
}
|
|
49192
|
-
function
|
|
49208
|
+
function generateChartInstanceListByViewRange(datum, table, deactivate = false) {
|
|
49209
|
+
clearDelayRunDimensionHoverTimerForViewRange();
|
|
49210
|
+
const { rowStart } = table.getBodyVisibleRowRange();
|
|
49211
|
+
let rowEnd = table.getBodyVisibleRowRange().rowEnd;
|
|
49212
|
+
rowEnd = Math.min(table.rowCount - 1 - table.bottomFrozenRowCount, rowEnd);
|
|
49213
|
+
const { colStart } = table.getBodyVisibleColRange();
|
|
49214
|
+
let colEnd = table.getBodyVisibleColRange().colEnd;
|
|
49215
|
+
colEnd = Math.min(table.colCount - 1 - table.rightFrozenColCount, colEnd);
|
|
49216
|
+
for (let col = colStart; col <= colEnd; col++) {
|
|
49217
|
+
if (!isValid$1(chartInstanceListColumnByColumnDirection[col])) {
|
|
49218
|
+
chartInstanceListColumnByColumnDirection[col] = {};
|
|
49219
|
+
}
|
|
49220
|
+
for (let i = rowStart; i <= rowEnd; i++) {
|
|
49221
|
+
const cellGroup = table.scenegraph.getCell(col, i);
|
|
49222
|
+
const chartNode = cellGroup?.getChildren()?.[0];
|
|
49223
|
+
if (chartInstanceListColumnByColumnDirection[col][i]) ;
|
|
49224
|
+
else if (isValid$1(chartNode)) {
|
|
49225
|
+
chartNode.addUpdateShapeAndBoundsTag();
|
|
49226
|
+
if (chartNode.activeChartInstance) {
|
|
49227
|
+
chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance;
|
|
49228
|
+
}
|
|
49229
|
+
else {
|
|
49230
|
+
if (chartNode.attribute.spec.type === 'pie') {
|
|
49231
|
+
chartNode.activate(table);
|
|
49232
|
+
chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance;
|
|
49233
|
+
}
|
|
49234
|
+
}
|
|
49235
|
+
}
|
|
49236
|
+
const timer = setTimeout(() => {
|
|
49237
|
+
if (chartInstanceListColumnByColumnDirection[col]?.[i]) {
|
|
49238
|
+
const chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
49239
|
+
let isShowTooltip = true;
|
|
49240
|
+
if (typeof chartDimensionLinkage === 'object') {
|
|
49241
|
+
if (deactivate) {
|
|
49242
|
+
chartInstanceListColumnByColumnDirection[col][i].setHovered();
|
|
49243
|
+
chartInstanceListColumnByColumnDirection[col][i].hideTooltip();
|
|
49244
|
+
}
|
|
49245
|
+
else {
|
|
49246
|
+
isShowTooltip = chartDimensionLinkage.showTooltip ?? true;
|
|
49247
|
+
isShowTooltip = isShowTooltip && checkIsShowTooltipForEdgeRow(i, table);
|
|
49248
|
+
isShowTooltip = isShowTooltip && checkIsShowTooltipForEdgeColumn(col, table);
|
|
49249
|
+
chartInstanceListColumnByColumnDirection[col][i].setHovered(datum);
|
|
49250
|
+
isShowTooltip &&
|
|
49251
|
+
chartInstanceListColumnByColumnDirection[col][i].showTooltip(datum, {
|
|
49252
|
+
activeType: 'mark'
|
|
49253
|
+
});
|
|
49254
|
+
}
|
|
49255
|
+
}
|
|
49256
|
+
}
|
|
49257
|
+
}, 0);
|
|
49258
|
+
delayRunDimensionHoverTimerForViewRange.push(timer);
|
|
49259
|
+
table.scenegraph.updateNextFrame();
|
|
49260
|
+
}
|
|
49261
|
+
}
|
|
49262
|
+
}
|
|
49263
|
+
function checkIsShowTooltipForEdgeRow(row, table) {
|
|
49264
|
+
let isShowTooltip = true;
|
|
49265
|
+
const { rowStart } = table.getBodyVisibleRowRange();
|
|
49266
|
+
let rowEnd = table.getBodyVisibleRowRange().rowEnd;
|
|
49267
|
+
rowEnd = Math.min(table.rowCount - 1 - table.bottomFrozenRowCount, rowEnd);
|
|
49268
|
+
const chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
49269
|
+
if (row === rowEnd && isShowTooltip) {
|
|
49270
|
+
const heightLimitToShowTooltipForEdgeRow = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow ?? 0;
|
|
49271
|
+
const { rowEnd: rowEnd1 } = table.getBodyVisibleRowRange(0, -heightLimitToShowTooltipForEdgeRow);
|
|
49272
|
+
if (rowEnd1 === rowEnd) {
|
|
49273
|
+
isShowTooltip = true;
|
|
49274
|
+
}
|
|
49275
|
+
else {
|
|
49276
|
+
const { rowEnd: rowEnd2 } = table.getBodyVisibleRowRange(0, 5);
|
|
49277
|
+
if (rowEnd2 !== rowEnd) {
|
|
49278
|
+
isShowTooltip = true;
|
|
49279
|
+
}
|
|
49280
|
+
else {
|
|
49281
|
+
isShowTooltip = false;
|
|
49282
|
+
}
|
|
49283
|
+
}
|
|
49284
|
+
}
|
|
49285
|
+
else if (row === rowStart && isShowTooltip) {
|
|
49286
|
+
const heightLimitToShowTooltipForEdgeRow = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow ?? 0;
|
|
49287
|
+
const { rowStart: rowStart1 } = table.getBodyVisibleRowRange(heightLimitToShowTooltipForEdgeRow, 0);
|
|
49288
|
+
if (rowStart1 === rowStart) {
|
|
49289
|
+
isShowTooltip = true;
|
|
49290
|
+
}
|
|
49291
|
+
else {
|
|
49292
|
+
const { rowStart: rowStart2 } = table.getBodyVisibleRowRange(0, -5);
|
|
49293
|
+
if (rowStart2 !== rowStart) {
|
|
49294
|
+
isShowTooltip = true;
|
|
49295
|
+
}
|
|
49296
|
+
else {
|
|
49297
|
+
isShowTooltip = false;
|
|
49298
|
+
}
|
|
49299
|
+
}
|
|
49300
|
+
}
|
|
49301
|
+
return isShowTooltip;
|
|
49302
|
+
}
|
|
49303
|
+
function checkIsShowTooltipForEdgeColumn(col, table) {
|
|
49304
|
+
let isShowTooltip = true;
|
|
49305
|
+
const { colStart } = table.getBodyVisibleColRange();
|
|
49306
|
+
let colEnd = table.getBodyVisibleColRange().colEnd;
|
|
49307
|
+
colEnd = Math.min(table.colCount - 1 - table.rightFrozenColCount, colEnd);
|
|
49308
|
+
const chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
49309
|
+
if (col === colEnd && isShowTooltip) {
|
|
49310
|
+
const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn;
|
|
49311
|
+
const { colEnd: colEnd1 } = table.getBodyVisibleColRange(0, -widthLimitToShowTooltipForEdgeColumn);
|
|
49312
|
+
if (colEnd1 === colEnd) {
|
|
49313
|
+
isShowTooltip = true;
|
|
49314
|
+
}
|
|
49315
|
+
else {
|
|
49316
|
+
const { colEnd: colEnd2 } = table.getBodyVisibleColRange(0, 5);
|
|
49317
|
+
if (colEnd2 !== colEnd) {
|
|
49318
|
+
isShowTooltip = true;
|
|
49319
|
+
}
|
|
49320
|
+
else {
|
|
49321
|
+
isShowTooltip = false;
|
|
49322
|
+
}
|
|
49323
|
+
}
|
|
49324
|
+
}
|
|
49325
|
+
else if (col === colStart && isShowTooltip) {
|
|
49326
|
+
const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn;
|
|
49327
|
+
const { colStart: colStart1 } = table.getBodyVisibleColRange(widthLimitToShowTooltipForEdgeColumn, 0);
|
|
49328
|
+
if (colStart1 === colStart) {
|
|
49329
|
+
isShowTooltip = true;
|
|
49330
|
+
}
|
|
49331
|
+
else {
|
|
49332
|
+
const { colStart: colStart2 } = table.getBodyVisibleColRange(0, -5);
|
|
49333
|
+
if (colStart2 !== colStart) {
|
|
49334
|
+
isShowTooltip = true;
|
|
49335
|
+
}
|
|
49336
|
+
else {
|
|
49337
|
+
isShowTooltip = false;
|
|
49338
|
+
}
|
|
49339
|
+
}
|
|
49340
|
+
}
|
|
49341
|
+
return isShowTooltip;
|
|
49342
|
+
}
|
|
49343
|
+
function clearChartInstanceListByColumnDirection(col, excludedRow, table, forceRelease = false) {
|
|
49344
|
+
if (isValid$1(chartInstanceListColumnByColumnDirection[col])) {
|
|
49345
|
+
for (const i in chartInstanceListColumnByColumnDirection[col]) {
|
|
49346
|
+
if (isValid$1(excludedRow) && Number(i) === excludedRow) {
|
|
49347
|
+
continue;
|
|
49348
|
+
}
|
|
49349
|
+
const cellGroup = table.scenegraph.getCell(col, Number(i));
|
|
49350
|
+
const chartNode = cellGroup?.getChildren()?.[0];
|
|
49351
|
+
if (isValid$1(chartNode)) {
|
|
49352
|
+
chartNode.addUpdateShapeAndBoundsTag();
|
|
49353
|
+
chartNode.deactivate(table, {
|
|
49354
|
+
forceRelease: forceRelease,
|
|
49355
|
+
releaseChartInstance: true,
|
|
49356
|
+
releaseColumnChartInstance: false,
|
|
49357
|
+
releaseRowChartInstance: false
|
|
49358
|
+
});
|
|
49359
|
+
chartInstanceListColumnByColumnDirection[col][i] = null;
|
|
49360
|
+
}
|
|
49361
|
+
}
|
|
49362
|
+
delete chartInstanceListColumnByColumnDirection[col];
|
|
49363
|
+
}
|
|
49364
|
+
}
|
|
49365
|
+
function clearChartInstanceListByRowDirection(row, excludedCol, table, forceRelease = false) {
|
|
49193
49366
|
if (isValid$1(chartInstanceListRowByRowDirection[row])) {
|
|
49194
49367
|
for (const i in chartInstanceListRowByRowDirection[row]) {
|
|
49195
49368
|
if (isValid$1(excludedCol) && Number(i) === excludedCol) {
|
|
@@ -49197,9 +49370,10 @@
|
|
|
49197
49370
|
}
|
|
49198
49371
|
const cellGroup = table.scenegraph.getCell(Number(i), row);
|
|
49199
49372
|
const chartNode = cellGroup?.getChildren()?.[0];
|
|
49200
|
-
chartNode.addUpdateShapeAndBoundsTag();
|
|
49201
49373
|
if (isValid$1(chartNode)) {
|
|
49374
|
+
chartNode.addUpdateShapeAndBoundsTag();
|
|
49202
49375
|
chartNode.deactivate(table, {
|
|
49376
|
+
forceRelease: forceRelease,
|
|
49203
49377
|
releaseChartInstance: true,
|
|
49204
49378
|
releaseColumnChartInstance: false,
|
|
49205
49379
|
releaseRowChartInstance: false
|
|
@@ -49210,6 +49384,80 @@
|
|
|
49210
49384
|
}
|
|
49211
49385
|
delete chartInstanceListRowByRowDirection[row];
|
|
49212
49386
|
}
|
|
49387
|
+
function clearDelayRunDimensionHoverTimerForColumnDirection() {
|
|
49388
|
+
for (const timer of delayRunDimensionHoverTimerForColumnDirection) {
|
|
49389
|
+
clearTimeout(timer);
|
|
49390
|
+
}
|
|
49391
|
+
delayRunDimensionHoverTimerForColumnDirection.length = 0;
|
|
49392
|
+
}
|
|
49393
|
+
function clearDelayRunDimensionHoverTimerForRowDirection() {
|
|
49394
|
+
for (const timer of delayRunDimensionHoverTimerForRowDirection) {
|
|
49395
|
+
clearTimeout(timer);
|
|
49396
|
+
}
|
|
49397
|
+
delayRunDimensionHoverTimerForRowDirection.length = 0;
|
|
49398
|
+
}
|
|
49399
|
+
function clearDelayRunDimensionHoverTimerForViewRange() {
|
|
49400
|
+
for (const timer of delayRunDimensionHoverTimerForViewRange) {
|
|
49401
|
+
clearTimeout(timer);
|
|
49402
|
+
}
|
|
49403
|
+
delayRunDimensionHoverTimerForViewRange.length = 0;
|
|
49404
|
+
}
|
|
49405
|
+
function clearDelayRunDimensionHoverTimers() {
|
|
49406
|
+
for (const timer of delayRunDimensionHoverTimerForColumnDirection) {
|
|
49407
|
+
clearTimeout(timer);
|
|
49408
|
+
}
|
|
49409
|
+
delayRunDimensionHoverTimerForColumnDirection.length = 0;
|
|
49410
|
+
for (const timer of delayRunDimensionHoverTimerForRowDirection) {
|
|
49411
|
+
clearTimeout(timer);
|
|
49412
|
+
}
|
|
49413
|
+
delayRunDimensionHoverTimerForRowDirection.length = 0;
|
|
49414
|
+
for (const timer of delayRunDimensionHoverTimerForViewRange) {
|
|
49415
|
+
clearTimeout(timer);
|
|
49416
|
+
}
|
|
49417
|
+
delayRunDimensionHoverTimerForViewRange.length = 0;
|
|
49418
|
+
}
|
|
49419
|
+
function clearAllChartInstanceList(table, forceRelease = false) {
|
|
49420
|
+
clearDelayRunDimensionHoverTimers();
|
|
49421
|
+
for (const col in chartInstanceListColumnByColumnDirection) {
|
|
49422
|
+
clearChartInstanceListByColumnDirection(Number(col), undefined, table, forceRelease);
|
|
49423
|
+
}
|
|
49424
|
+
for (const row in chartInstanceListRowByRowDirection) {
|
|
49425
|
+
clearChartInstanceListByRowDirection(Number(row), undefined, table, forceRelease);
|
|
49426
|
+
}
|
|
49427
|
+
}
|
|
49428
|
+
let disabledTooltipToAllChartInstances = false;
|
|
49429
|
+
function isDisabledTooltipToAllChartInstances() {
|
|
49430
|
+
return disabledTooltipToAllChartInstances;
|
|
49431
|
+
}
|
|
49432
|
+
function disableTooltipToAllChartInstances() {
|
|
49433
|
+
disabledTooltipToAllChartInstances = true;
|
|
49434
|
+
clearDelayRunDimensionHoverTimers();
|
|
49435
|
+
for (const col in chartInstanceListColumnByColumnDirection) {
|
|
49436
|
+
for (const row in chartInstanceListColumnByColumnDirection[col]) {
|
|
49437
|
+
chartInstanceListColumnByColumnDirection[col][row].disableTooltip(true);
|
|
49438
|
+
chartInstanceListColumnByColumnDirection[col][row].hideTooltip();
|
|
49439
|
+
}
|
|
49440
|
+
}
|
|
49441
|
+
for (const row in chartInstanceListRowByRowDirection) {
|
|
49442
|
+
for (const col in chartInstanceListRowByRowDirection[row]) {
|
|
49443
|
+
chartInstanceListRowByRowDirection[row][col].disableTooltip(true);
|
|
49444
|
+
chartInstanceListRowByRowDirection[row][col].hideTooltip();
|
|
49445
|
+
}
|
|
49446
|
+
}
|
|
49447
|
+
}
|
|
49448
|
+
function enableTooltipToAllChartInstances() {
|
|
49449
|
+
disabledTooltipToAllChartInstances = false;
|
|
49450
|
+
for (const col in chartInstanceListColumnByColumnDirection) {
|
|
49451
|
+
for (const row in chartInstanceListColumnByColumnDirection[col]) {
|
|
49452
|
+
chartInstanceListColumnByColumnDirection[col][row].disableTooltip(false);
|
|
49453
|
+
}
|
|
49454
|
+
}
|
|
49455
|
+
for (const row in chartInstanceListRowByRowDirection) {
|
|
49456
|
+
for (const col in chartInstanceListRowByRowDirection[row]) {
|
|
49457
|
+
chartInstanceListRowByRowDirection[row][col].disableTooltip(false);
|
|
49458
|
+
}
|
|
49459
|
+
}
|
|
49460
|
+
}
|
|
49213
49461
|
|
|
49214
49462
|
function isValidAlignDomain(domain) {
|
|
49215
49463
|
return domain.length === 2 && isValidNumber$1(domain[0]) && isValidNumber$1(domain[1]) && domain[1] >= domain[0];
|
|
@@ -50169,6 +50417,7 @@
|
|
|
50169
50417
|
type = 'chart';
|
|
50170
50418
|
chartInstance;
|
|
50171
50419
|
activeChartInstance;
|
|
50420
|
+
activeChartInstanceLastViewBox = null;
|
|
50172
50421
|
activeChartInstanceHoverOnMark = null;
|
|
50173
50422
|
justShowMarkTooltip = undefined;
|
|
50174
50423
|
justShowMarkTooltipTimer = Date.now();
|
|
@@ -50213,7 +50462,6 @@
|
|
|
50213
50462
|
y1: y1 - table.scrollTop,
|
|
50214
50463
|
y2: y2 - table.scrollTop
|
|
50215
50464
|
});
|
|
50216
|
-
this.activeChartInstance?.release();
|
|
50217
50465
|
this.attribute.ClassType.globalConfig.uniqueTooltip = false;
|
|
50218
50466
|
this.activeChartInstance = new this.attribute.ClassType(this.attribute.spec, merge({}, this.attribute.tableChartOption, {
|
|
50219
50467
|
renderCanvas: this.attribute.canvas,
|
|
@@ -50266,7 +50514,7 @@
|
|
|
50266
50514
|
}
|
|
50267
50515
|
}
|
|
50268
50516
|
},
|
|
50269
|
-
componentShowContent: table.options.chartDimensionLinkage &&
|
|
50517
|
+
componentShowContent: table.options.chartDimensionLinkage?.showTooltip &&
|
|
50270
50518
|
this.attribute.spec.type !== 'scatter'
|
|
50271
50519
|
? {
|
|
50272
50520
|
tooltip: {
|
|
@@ -50287,21 +50535,63 @@
|
|
|
50287
50535
|
table.internalProps.layoutMap?.updateDataStateToActiveChartInstance?.(this.activeChartInstance);
|
|
50288
50536
|
this.activeChartInstance.on('click', (params) => {
|
|
50289
50537
|
if (this.attribute.spec.select?.enable === false) {
|
|
50290
|
-
|
|
50538
|
+
if (this.attribute.spec.interactions.find((interaction) => interaction.type === 'element-select' && interaction.isMultiple)) {
|
|
50539
|
+
table.scenegraph.updateChartState(params?.datum, 'multiple-select');
|
|
50540
|
+
}
|
|
50541
|
+
else {
|
|
50542
|
+
table.scenegraph.updateChartState(null, undefined);
|
|
50543
|
+
}
|
|
50544
|
+
}
|
|
50545
|
+
else if (this.attribute.spec.select?.enable === true && this.attribute.spec.select?.mode === 'multiple') {
|
|
50546
|
+
table.scenegraph.updateChartState(params?.datum, 'multiple-select');
|
|
50291
50547
|
}
|
|
50292
50548
|
else if (Chart.temp) {
|
|
50293
|
-
table.scenegraph.updateChartState(
|
|
50549
|
+
table.scenegraph.updateChartState(null, 'brush');
|
|
50550
|
+
table.scenegraph.updateChartState(params?.datum, 'click');
|
|
50551
|
+
}
|
|
50552
|
+
});
|
|
50553
|
+
let brushChangeThrottle;
|
|
50554
|
+
if (table.options.chartDimensionLinkage?.listenBrushChange) {
|
|
50555
|
+
brushChangeThrottle = cancellableThrottle(table.scenegraph.updateChartState.bind(table.scenegraph), table.options.chartDimensionLinkage?.brushChangeDelay ?? 100);
|
|
50556
|
+
this.activeChartInstance.on('brushChange', (params) => {
|
|
50557
|
+
brushChangeThrottle.throttled(params?.value?.inBrushData, 'brush');
|
|
50558
|
+
});
|
|
50559
|
+
}
|
|
50560
|
+
this.activeChartInstance.on('brushStart', (params) => {
|
|
50561
|
+
const brushingChartInstance = getBrushingChartInstance();
|
|
50562
|
+
if (brushingChartInstance !== this.activeChartInstance) {
|
|
50563
|
+
if (brushingChartInstance) {
|
|
50564
|
+
clearAndReleaseBrushingChartInstance(table.scenegraph);
|
|
50565
|
+
}
|
|
50566
|
+
setBrushingChartInstance(this.activeChartInstance, col, row);
|
|
50294
50567
|
}
|
|
50295
50568
|
});
|
|
50296
50569
|
this.activeChartInstance.on('brushEnd', (params) => {
|
|
50297
|
-
|
|
50570
|
+
brushChangeThrottle?.cancel();
|
|
50571
|
+
table.scenegraph.updateChartState(params?.value?.inBrushData, 'brush');
|
|
50298
50572
|
Chart.temp = 0;
|
|
50299
50573
|
setTimeout(() => {
|
|
50300
50574
|
Chart.temp = 1;
|
|
50301
50575
|
}, 0);
|
|
50302
50576
|
});
|
|
50303
|
-
if (table.options.chartDimensionLinkage) {
|
|
50577
|
+
if (table.options.chartDimensionLinkage?.showTooltip) {
|
|
50578
|
+
if (this.attribute.spec.type === 'pie') {
|
|
50579
|
+
this.activeChartInstance.on('pointerover', { markName: 'pie' }, (params) => {
|
|
50580
|
+
const categoryField = this.attribute.spec.categoryField;
|
|
50581
|
+
const datum = { [categoryField]: params?.datum?.[categoryField] };
|
|
50582
|
+
generateChartInstanceListByViewRange(datum, table, false);
|
|
50583
|
+
});
|
|
50584
|
+
this.activeChartInstance.on('pointerout', { markName: 'pie' }, (params) => {
|
|
50585
|
+
const categoryField = this.attribute.spec.categoryField;
|
|
50586
|
+
const datum = { [categoryField]: params?.datum?.[categoryField] };
|
|
50587
|
+
generateChartInstanceListByViewRange(datum, table, true);
|
|
50588
|
+
});
|
|
50589
|
+
}
|
|
50304
50590
|
this.activeChartInstance.on('dimensionHover', (params) => {
|
|
50591
|
+
if (isDisabledTooltipToAllChartInstances()) {
|
|
50592
|
+
return;
|
|
50593
|
+
}
|
|
50594
|
+
this.activeChartInstance.disableTooltip(false);
|
|
50305
50595
|
const dimensionInfo = params?.dimensionInfo[0];
|
|
50306
50596
|
const canvasXY = params?.event?.canvas;
|
|
50307
50597
|
const viewport = params?.event?.viewport;
|
|
@@ -50352,13 +50642,11 @@
|
|
|
50352
50642
|
}
|
|
50353
50643
|
else if (prev_justShowMarkTooltip === false && justShowMarkTooltip === true) {
|
|
50354
50644
|
delayRunDimensionHover = false;
|
|
50355
|
-
|
|
50356
|
-
this.delayRunDimensionHoverTimer = undefined;
|
|
50645
|
+
this.clearDelayRunDimensionHoverTimer();
|
|
50357
50646
|
}
|
|
50358
50647
|
else if (prev_justShowMarkTooltip === true && justShowMarkTooltip === true) {
|
|
50359
50648
|
delayRunDimensionHover = false;
|
|
50360
|
-
|
|
50361
|
-
this.delayRunDimensionHoverTimer = undefined;
|
|
50649
|
+
this.clearDelayRunDimensionHoverTimer();
|
|
50362
50650
|
}
|
|
50363
50651
|
if (params.action === 'enter' ||
|
|
50364
50652
|
params.action === 'move' ||
|
|
@@ -50374,8 +50662,11 @@
|
|
|
50374
50662
|
}
|
|
50375
50663
|
}
|
|
50376
50664
|
else {
|
|
50377
|
-
|
|
50665
|
+
this.clearDelayRunDimensionHoverTimer();
|
|
50378
50666
|
this.delayRunDimensionHoverTimer = setTimeout(() => {
|
|
50667
|
+
if (isDisabledTooltipToAllChartInstances()) {
|
|
50668
|
+
return;
|
|
50669
|
+
}
|
|
50379
50670
|
if (indicatorsAsCol) {
|
|
50380
50671
|
generateChartInstanceListByRowDirection(row, dimensionValue, null, canvasXY, table, justShowMarkTooltip, false);
|
|
50381
50672
|
}
|
|
@@ -50436,23 +50727,32 @@
|
|
|
50436
50727
|
});
|
|
50437
50728
|
}
|
|
50438
50729
|
table._bindChartEvent?.(this.activeChartInstance);
|
|
50730
|
+
if (isDisabledTooltipToAllChartInstances()) {
|
|
50731
|
+
this.activeChartInstance.disableTooltip(true);
|
|
50732
|
+
}
|
|
50439
50733
|
}
|
|
50440
50734
|
static temp = 1;
|
|
50441
|
-
|
|
50735
|
+
clearDelayRunDimensionHoverTimer() {
|
|
50736
|
+
clearTimeout(this.delayRunDimensionHoverTimer);
|
|
50737
|
+
this.delayRunDimensionHoverTimer = undefined;
|
|
50738
|
+
}
|
|
50739
|
+
deactivate(table, { forceRelease = false, releaseChartInstance = true, releaseColumnChartInstance = true, releaseRowChartInstance = true, releaseAllChartInstance = false } = {}) {
|
|
50442
50740
|
this.activeChartInstanceHoverOnMark = null;
|
|
50443
50741
|
this.justShowMarkTooltip = undefined;
|
|
50444
50742
|
this.justShowMarkTooltipTimer = Date.now();
|
|
50445
|
-
|
|
50446
|
-
this.delayRunDimensionHoverTimer = undefined;
|
|
50743
|
+
this.clearDelayRunDimensionHoverTimer();
|
|
50447
50744
|
if (releaseChartInstance) {
|
|
50448
|
-
this.activeChartInstance
|
|
50449
|
-
|
|
50450
|
-
|
|
50451
|
-
|
|
50452
|
-
|
|
50453
|
-
|
|
50454
|
-
|
|
50455
|
-
|
|
50745
|
+
if (this.activeChartInstance &&
|
|
50746
|
+
(forceRelease || !getBrushingChartInstance() || getBrushingChartInstance() !== this.activeChartInstance)) {
|
|
50747
|
+
this.activeChartInstance?.updateViewBox({
|
|
50748
|
+
x1: -1000,
|
|
50749
|
+
x2: -800,
|
|
50750
|
+
y1: -1000,
|
|
50751
|
+
y2: -800
|
|
50752
|
+
}, false, false);
|
|
50753
|
+
this.activeChartInstance?.release();
|
|
50754
|
+
this.activeChartInstance = null;
|
|
50755
|
+
}
|
|
50456
50756
|
const { col, row } = this.parent;
|
|
50457
50757
|
table.internalProps.layoutMap.isAxisCell(table.rowHeaderLevelCount - 1, row) &&
|
|
50458
50758
|
table.scenegraph.getCell(table.rowHeaderLevelCount - 1, row).firstChild?.hideLabelHoverOnAxis?.();
|
|
@@ -50472,11 +50772,16 @@
|
|
|
50472
50772
|
table.scenegraph.getCell(table.rowHeaderLevelCount - 1, row).firstChild?.hideLabelHoverOnAxis?.();
|
|
50473
50773
|
}
|
|
50474
50774
|
}
|
|
50475
|
-
if (
|
|
50476
|
-
|
|
50775
|
+
if (releaseAllChartInstance) {
|
|
50776
|
+
clearAllChartInstanceList(table, forceRelease);
|
|
50477
50777
|
}
|
|
50478
|
-
|
|
50479
|
-
|
|
50778
|
+
else {
|
|
50779
|
+
if (releaseColumnChartInstance) {
|
|
50780
|
+
clearChartInstanceListByColumnDirection(this.parent.col, this.attribute.spec.type === 'scatter' ? this.parent.row : undefined, table, forceRelease);
|
|
50781
|
+
}
|
|
50782
|
+
if (releaseRowChartInstance) {
|
|
50783
|
+
clearChartInstanceListByRowDirection(this.parent.row, this.attribute.spec.type === 'scatter' ? this.parent.col : undefined, table, forceRelease);
|
|
50784
|
+
}
|
|
50480
50785
|
}
|
|
50481
50786
|
}
|
|
50482
50787
|
updateData(data) {
|
|
@@ -50487,12 +50792,19 @@
|
|
|
50487
50792
|
const padding = this.attribute.cellPadding;
|
|
50488
50793
|
const table = this.stage.table;
|
|
50489
50794
|
const { x1, y1, x2, y2 } = cellGroup.globalAABBBounds;
|
|
50490
|
-
|
|
50795
|
+
const viewBox = {
|
|
50491
50796
|
x1: Math.ceil(x1 + padding[3] + table.scrollLeft + (table.options.viewBox?.x1 ?? 0)),
|
|
50492
50797
|
x2: Math.ceil(x1 + cellGroup.attribute.width - padding[1] + table.scrollLeft + (table.options.viewBox?.x1 ?? 0)),
|
|
50493
50798
|
y1: Math.ceil(y1 + padding[0] + table.scrollTop + (table.options.viewBox?.y1 ?? 0)),
|
|
50494
50799
|
y2: Math.ceil(y1 + cellGroup.attribute.height - padding[2] + table.scrollTop + (table.options.viewBox?.y1 ?? 0))
|
|
50495
50800
|
};
|
|
50801
|
+
if (this.activeChartInstance) {
|
|
50802
|
+
this.activeChartInstanceLastViewBox = viewBox;
|
|
50803
|
+
}
|
|
50804
|
+
else {
|
|
50805
|
+
this.activeChartInstanceLastViewBox = null;
|
|
50806
|
+
}
|
|
50807
|
+
return viewBox;
|
|
50496
50808
|
}
|
|
50497
50809
|
}
|
|
50498
50810
|
function getTableBounds(col, row, table) {
|
|
@@ -50761,7 +51073,6 @@
|
|
|
50761
51073
|
drawShape(chart, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
50762
51074
|
const groupAttribute = getTheme(chart, params?.theme).group;
|
|
50763
51075
|
const { dataId, data, spec } = chart.attribute;
|
|
50764
|
-
chart.getViewBox();
|
|
50765
51076
|
const { width = groupAttribute.width, height = groupAttribute.height } = chart.attribute;
|
|
50766
51077
|
const { table } = chart.getRootNode();
|
|
50767
51078
|
const { cacheCanvas, activeChartInstance } = chart;
|
|
@@ -50784,13 +51095,20 @@
|
|
|
50784
51095
|
activeChartInstance.updateSpecSync(spec, false, { reuse: false, morph: false });
|
|
50785
51096
|
}
|
|
50786
51097
|
}
|
|
51098
|
+
const lastViewBox = chart.activeChartInstanceLastViewBox;
|
|
50787
51099
|
const viewBox = chart.getViewBox();
|
|
50788
|
-
|
|
50789
|
-
x1
|
|
50790
|
-
|
|
50791
|
-
y1
|
|
50792
|
-
|
|
50793
|
-
|
|
51100
|
+
if (!(lastViewBox &&
|
|
51101
|
+
viewBox.x1 === lastViewBox.x1 &&
|
|
51102
|
+
viewBox.x2 === lastViewBox.x2 &&
|
|
51103
|
+
viewBox.y1 === lastViewBox.y1 &&
|
|
51104
|
+
viewBox.y2 === lastViewBox.y2)) {
|
|
51105
|
+
activeChartInstance.updateViewBox({
|
|
51106
|
+
x1: 0,
|
|
51107
|
+
x2: viewBox.x2 - viewBox.x1,
|
|
51108
|
+
y1: 0,
|
|
51109
|
+
y2: viewBox.y2 - viewBox.y1
|
|
51110
|
+
}, false, false);
|
|
51111
|
+
}
|
|
50794
51112
|
const chartStage = activeChartInstance.getStage();
|
|
50795
51113
|
chartStage.needRender = true;
|
|
50796
51114
|
const matrix = chart.globalTransMatrix.clone();
|
|
@@ -56884,9 +57202,13 @@
|
|
|
56884
57202
|
});
|
|
56885
57203
|
}
|
|
56886
57204
|
function clearChartCacheImage(scenegraph) {
|
|
57205
|
+
const brushingCellPos = getBrushingChartInstanceCellPos();
|
|
56887
57206
|
for (let c = scenegraph.proxy.colStart; c <= scenegraph.proxy.colEnd; c++) {
|
|
56888
57207
|
const columnGroup = scenegraph.getColGroup(c);
|
|
56889
57208
|
columnGroup?.getChildren()?.forEach((cellNode) => {
|
|
57209
|
+
if (brushingCellPos && brushingCellPos.col === cellNode.col && brushingCellPos.row === cellNode.row) {
|
|
57210
|
+
return;
|
|
57211
|
+
}
|
|
56890
57212
|
cellNode.children.forEach((node) => {
|
|
56891
57213
|
if (node.type === 'chart') {
|
|
56892
57214
|
node.cacheCanvas = null;
|
|
@@ -56932,9 +57254,10 @@
|
|
|
56932
57254
|
updateTableAxes(scenegraph.rightFrozenGroup, scenegraph.table);
|
|
56933
57255
|
updateTableAxes(scenegraph.bottomFrozenGroup, scenegraph.table);
|
|
56934
57256
|
}
|
|
56935
|
-
function updateChartState(scenegraph, datum) {
|
|
57257
|
+
function updateChartState(scenegraph, datum, selectedDataMode) {
|
|
56936
57258
|
const table = scenegraph.table;
|
|
56937
57259
|
if (table.isPivotChart()) {
|
|
57260
|
+
table._selectedDataMode = selectedDataMode;
|
|
56938
57261
|
const preSelectItemsCount = table._selectedDataItemsInChart.length;
|
|
56939
57262
|
if ((datum === null || datum === undefined || datum?.length === 0 || Object.keys(datum).length === 0) &&
|
|
56940
57263
|
preSelectItemsCount === 0) {
|
|
@@ -56963,7 +57286,18 @@
|
|
|
56963
57286
|
}
|
|
56964
57287
|
newSelectedDataItemsInChart.push(selectedState);
|
|
56965
57288
|
}
|
|
56966
|
-
if (
|
|
57289
|
+
if (selectedDataMode === 'multiple-select') {
|
|
57290
|
+
if (datum === null || datum === undefined || datum?.length === 0 || Object.keys(datum).length === 0) {
|
|
57291
|
+
table._selectedDataItemsInChart = [];
|
|
57292
|
+
}
|
|
57293
|
+
else {
|
|
57294
|
+
table._selectedDataItemsInChart.push(...newSelectedDataItemsInChart);
|
|
57295
|
+
}
|
|
57296
|
+
table.internalProps.layoutMap.updateDataStateToChartInstance();
|
|
57297
|
+
clearChartCacheImage(scenegraph);
|
|
57298
|
+
table.scenegraph.updateNextFrame();
|
|
57299
|
+
}
|
|
57300
|
+
else if (!isEqual(table._selectedDataItemsInChart, newSelectedDataItemsInChart)) {
|
|
56967
57301
|
table._selectedDataItemsInChart = newSelectedDataItemsInChart;
|
|
56968
57302
|
table.internalProps.layoutMap.updateDataStateToChartInstance();
|
|
56969
57303
|
clearChartCacheImage(scenegraph);
|
|
@@ -58201,38 +58535,63 @@
|
|
|
58201
58535
|
resetResidentHoverIcon(col, row) {
|
|
58202
58536
|
resetResidentHoverIcon(col, row, this);
|
|
58203
58537
|
}
|
|
58204
|
-
deactivateChart(col, row) {
|
|
58538
|
+
deactivateChart(col, row, forceRelease = false) {
|
|
58539
|
+
if (forceRelease) {
|
|
58540
|
+
const brushingChartInstanceCellPos = getBrushingChartInstanceCellPos();
|
|
58541
|
+
const brushingChartInstance = getBrushingChartInstance();
|
|
58542
|
+
if (brushingChartInstanceCellPos && brushingChartInstance) {
|
|
58543
|
+
clearAndReleaseBrushingChartInstance(this);
|
|
58544
|
+
clearCellChartCacheImage(brushingChartInstanceCellPos.col, brushingChartInstanceCellPos.row, this);
|
|
58545
|
+
}
|
|
58546
|
+
}
|
|
58205
58547
|
if (col === -1 || row === -1) {
|
|
58206
58548
|
return;
|
|
58207
58549
|
}
|
|
58208
58550
|
const cellGroup = this.getCell(col, row);
|
|
58209
58551
|
if (cellGroup?.firstChild?.deactivate) {
|
|
58552
|
+
if (forceRelease) {
|
|
58553
|
+
cellGroup?.firstChild?.deactivate?.(this.table, {
|
|
58554
|
+
forceRelease: true,
|
|
58555
|
+
releaseChartInstance: true,
|
|
58556
|
+
releaseColumnChartInstance: true,
|
|
58557
|
+
releaseRowChartInstance: true,
|
|
58558
|
+
releaseAllChartInstance: true
|
|
58559
|
+
});
|
|
58560
|
+
return;
|
|
58561
|
+
}
|
|
58210
58562
|
const chartNode = cellGroup?.firstChild;
|
|
58211
58563
|
const chartType = chartNode.attribute.spec.type;
|
|
58212
|
-
cellGroup?.firstChild?.deactivate?.(this.table, this.table.options.chartDimensionLinkage
|
|
58564
|
+
cellGroup?.firstChild?.deactivate?.(this.table, this.table.options.chartDimensionLinkage?.showTooltip
|
|
58213
58565
|
? {
|
|
58214
|
-
releaseChartInstance: chartType === '
|
|
58215
|
-
?
|
|
58216
|
-
|
|
58566
|
+
releaseChartInstance: chartType === 'pie'
|
|
58567
|
+
? false
|
|
58568
|
+
: chartType === 'scatter'
|
|
58569
|
+
? (col !== this.table.stateManager.hover.cellPos.col &&
|
|
58570
|
+
row !== this.table.stateManager.hover.cellPos.row) ||
|
|
58571
|
+
this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount ||
|
|
58572
|
+
this.table.stateManager.hover.cellPos.row >
|
|
58573
|
+
this.table.rowCount - 1 - this.table.bottomFrozenRowCount ||
|
|
58574
|
+
this.table.stateManager.hover.cellPos.col < this.table.frozenColCount ||
|
|
58575
|
+
this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount
|
|
58576
|
+
: this.table.options.indicatorsAsCol
|
|
58577
|
+
? row !== this.table.stateManager.hover.cellPos.row ||
|
|
58578
|
+
this.table.stateManager.hover.cellPos.col < this.table.frozenColCount ||
|
|
58579
|
+
this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount
|
|
58580
|
+
: col !== this.table.stateManager.hover.cellPos.col ||
|
|
58581
|
+
this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount ||
|
|
58582
|
+
this.table.stateManager.hover.cellPos.row >
|
|
58583
|
+
this.table.rowCount - 1 - this.table.bottomFrozenRowCount,
|
|
58584
|
+
releaseColumnChartInstance: chartType === 'pie'
|
|
58585
|
+
? false
|
|
58586
|
+
: col !== this.table.stateManager.hover.cellPos.col ||
|
|
58217
58587
|
this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount ||
|
|
58218
58588
|
this.table.stateManager.hover.cellPos.row >
|
|
58219
|
-
this.table.rowCount - 1 - this.table.bottomFrozenRowCount
|
|
58589
|
+
this.table.rowCount - 1 - this.table.bottomFrozenRowCount,
|
|
58590
|
+
releaseRowChartInstance: chartType === 'pie'
|
|
58591
|
+
? false
|
|
58592
|
+
: row !== this.table.stateManager.hover.cellPos.row ||
|
|
58220
58593
|
this.table.stateManager.hover.cellPos.col < this.table.frozenColCount ||
|
|
58221
58594
|
this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount
|
|
58222
|
-
: this.table.options.indicatorsAsCol
|
|
58223
|
-
? row !== this.table.stateManager.hover.cellPos.row ||
|
|
58224
|
-
this.table.stateManager.hover.cellPos.col < this.table.frozenColCount ||
|
|
58225
|
-
this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount
|
|
58226
|
-
: col !== this.table.stateManager.hover.cellPos.col ||
|
|
58227
|
-
this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount ||
|
|
58228
|
-
this.table.stateManager.hover.cellPos.row >
|
|
58229
|
-
this.table.rowCount - 1 - this.table.bottomFrozenRowCount,
|
|
58230
|
-
releaseColumnChartInstance: col !== this.table.stateManager.hover.cellPos.col ||
|
|
58231
|
-
this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount ||
|
|
58232
|
-
this.table.stateManager.hover.cellPos.row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount,
|
|
58233
|
-
releaseRowChartInstance: row !== this.table.stateManager.hover.cellPos.row ||
|
|
58234
|
-
this.table.stateManager.hover.cellPos.col < this.table.frozenColCount ||
|
|
58235
|
-
this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount
|
|
58236
58595
|
}
|
|
58237
58596
|
: undefined);
|
|
58238
58597
|
}
|
|
@@ -58289,8 +58648,17 @@
|
|
|
58289
58648
|
updateChartSizeForResizeRowHeight(row) {
|
|
58290
58649
|
updateChartSizeForResizeRowHeight(this, row);
|
|
58291
58650
|
}
|
|
58292
|
-
updateChartState(datum) {
|
|
58293
|
-
this.table.isPivotChart()
|
|
58651
|
+
updateChartState(datum, selectedDataMode) {
|
|
58652
|
+
if (this.table.isPivotChart()) {
|
|
58653
|
+
if (datum === null || datum === undefined || datum?.length === 0 || Object.keys(datum).length === 0) {
|
|
58654
|
+
const brushingChartInstance = getBrushingChartInstance();
|
|
58655
|
+
if (brushingChartInstance) {
|
|
58656
|
+
brushingChartInstance.getChart()?.getComponentsByKey('brush')[0].clearBrushStateAndMask();
|
|
58657
|
+
}
|
|
58658
|
+
this.table.options.chartDimensionLinkage?.clearChartState?.();
|
|
58659
|
+
}
|
|
58660
|
+
updateChartState(this, datum, selectedDataMode);
|
|
58661
|
+
}
|
|
58294
58662
|
}
|
|
58295
58663
|
updateCheckboxCellState(col, row, checked) {
|
|
58296
58664
|
if (this.table.transpose) {
|
|
@@ -63577,7 +63945,8 @@
|
|
|
63577
63945
|
return;
|
|
63578
63946
|
}
|
|
63579
63947
|
if (table.isPivotChart() && eventArgsSet?.eventArgs?.target.type !== 'chart') {
|
|
63580
|
-
table.scenegraph.updateChartState(null);
|
|
63948
|
+
table.scenegraph.updateChartState(null, undefined);
|
|
63949
|
+
table.scenegraph.deactivateChart(-1, -1, true);
|
|
63581
63950
|
}
|
|
63582
63951
|
if (eventArgsSet.eventArgs?.target !== stateManager.residentHoverIcon?.icon) {
|
|
63583
63952
|
stateManager.hideMenu();
|
|
@@ -63646,7 +64015,8 @@
|
|
|
63646
64015
|
else {
|
|
63647
64016
|
if (!eventManager.checkCellFillhandle(eventArgsSet) &&
|
|
63648
64017
|
(eventManager.checkColumnResize(eventArgsSet, true) || eventManager.checkRowResize(eventArgsSet, true))) {
|
|
63649
|
-
table.scenegraph.updateChartState(null);
|
|
64018
|
+
table.scenegraph.updateChartState(null, undefined);
|
|
64019
|
+
table.scenegraph.deactivateChart(-1, -1, true);
|
|
63650
64020
|
stateManager.updateInteractionState(InteractionState.grabing);
|
|
63651
64021
|
return;
|
|
63652
64022
|
}
|
|
@@ -63891,7 +64261,8 @@
|
|
|
63891
64261
|
!eventManager.checkCellFillhandle(eventArgsSet) &&
|
|
63892
64262
|
!stateManager.columnResize.resizing &&
|
|
63893
64263
|
eventManager.checkColumnResize(eventArgsSet, true)) {
|
|
63894
|
-
table.scenegraph.updateChartState(null);
|
|
64264
|
+
table.scenegraph.updateChartState(null, undefined);
|
|
64265
|
+
table.scenegraph.deactivateChart(-1, -1, true);
|
|
63895
64266
|
stateManager.updateInteractionState(InteractionState.grabing);
|
|
63896
64267
|
const { eventArgs } = eventArgsSet;
|
|
63897
64268
|
if (!eventArgs?.targetCell) {
|
|
@@ -63938,7 +64309,8 @@
|
|
|
63938
64309
|
}
|
|
63939
64310
|
stateManager.endSelectCells(true, isHasSelected);
|
|
63940
64311
|
stateManager.updateCursor();
|
|
63941
|
-
table.scenegraph.updateChartState(null);
|
|
64312
|
+
table.scenegraph.updateChartState(null, undefined);
|
|
64313
|
+
table.scenegraph.deactivateChart(-1, -1, true);
|
|
63942
64314
|
}
|
|
63943
64315
|
else if (table.eventManager.isDraging && stateManager.isSelecting()) {
|
|
63944
64316
|
stateManager.endSelectCells();
|
|
@@ -64129,6 +64501,10 @@
|
|
|
64129
64501
|
const legend = e.path.find(node => node.name === 'legend');
|
|
64130
64502
|
if (!legend) {
|
|
64131
64503
|
table.editorManager?.completeEdit();
|
|
64504
|
+
const { cellPos } = table.stateManager.hover;
|
|
64505
|
+
const prevHoverCellCol = cellPos.col;
|
|
64506
|
+
const prevHoverCellRow = cellPos.row;
|
|
64507
|
+
table.scenegraph.deactivateChart(prevHoverCellCol, prevHoverCellRow, true);
|
|
64132
64508
|
if (table.eventManager._enableTableScroll) {
|
|
64133
64509
|
handleWhell(e, stateManager);
|
|
64134
64510
|
}
|
|
@@ -64322,6 +64698,9 @@
|
|
|
64322
64698
|
if (stateManager.interactionState !== InteractionState.scrolling) {
|
|
64323
64699
|
stateManager.updateInteractionState(InteractionState.scrolling);
|
|
64324
64700
|
}
|
|
64701
|
+
scenegraph.table.stateManager.hideMenu();
|
|
64702
|
+
scenegraph.table.editorManager?.completeEdit();
|
|
64703
|
+
table.scenegraph.deactivateChart(-1, -1, true);
|
|
64325
64704
|
const ratio = e.detail.value[0] / (1 - e.detail.value[1] + e.detail.value[0]);
|
|
64326
64705
|
throttleVerticalWheel(ratio, e);
|
|
64327
64706
|
});
|
|
@@ -64333,6 +64712,9 @@
|
|
|
64333
64712
|
if (stateManager.interactionState !== InteractionState.scrolling) {
|
|
64334
64713
|
stateManager.updateInteractionState(InteractionState.scrolling);
|
|
64335
64714
|
}
|
|
64715
|
+
scenegraph.table.stateManager.hideMenu();
|
|
64716
|
+
scenegraph.table.editorManager?.completeEdit();
|
|
64717
|
+
table.scenegraph.deactivateChart(-1, -1, true);
|
|
64336
64718
|
const ratio = e.detail.value[0] / (1 - e.detail.value[1] + e.detail.value[0]);
|
|
64337
64719
|
throttleHorizontalWheel(ratio);
|
|
64338
64720
|
});
|
|
@@ -64626,7 +65008,11 @@
|
|
|
64626
65008
|
table.eventManager.LastBodyPointerXY = { x: e.x, y: e.y };
|
|
64627
65009
|
table.eventManager.isDown = true;
|
|
64628
65010
|
const target = e.target;
|
|
64629
|
-
if (!table.getElement().contains(target) &&
|
|
65011
|
+
if (!table.getElement().contains(target) &&
|
|
65012
|
+
!table.internalProps.menuHandler.containElement(target) &&
|
|
65013
|
+
(!table.options.customConfig?.shouldTreatAsClickOnTable ||
|
|
65014
|
+
(table.options.customConfig?.shouldTreatAsClickOnTable &&
|
|
65015
|
+
!table.options.customConfig?.shouldTreatAsClickOnTable(e)))) {
|
|
64630
65016
|
const isCompleteEdit = table.editorManager?.completeEdit(e);
|
|
64631
65017
|
getPromiseValue(isCompleteEdit, isCompleteEdit => {
|
|
64632
65018
|
if (isCompleteEdit === false) {
|
|
@@ -64638,6 +65024,8 @@
|
|
|
64638
65024
|
stateManager.endSelectCells(true, isHasSelected);
|
|
64639
65025
|
}
|
|
64640
65026
|
});
|
|
65027
|
+
table.scenegraph.updateChartState(null, undefined);
|
|
65028
|
+
table.scenegraph.deactivateChart(-1, -1, true);
|
|
64641
65029
|
}
|
|
64642
65030
|
};
|
|
64643
65031
|
eventManager.globalEventListeners.push({
|
|
@@ -70293,7 +70681,7 @@
|
|
|
70293
70681
|
return TABLE_EVENT_TYPE;
|
|
70294
70682
|
}
|
|
70295
70683
|
options;
|
|
70296
|
-
version = "1.22.
|
|
70684
|
+
version = "1.22.12-alpha.0";
|
|
70297
70685
|
pagination;
|
|
70298
70686
|
id = `VTable${Date.now()}`;
|
|
70299
70687
|
headerStyleCache;
|
|
@@ -87249,6 +87637,8 @@
|
|
|
87249
87637
|
this._indicators?.forEach(indicatorObject => {
|
|
87250
87638
|
indicatorObject.chartInstance?.release();
|
|
87251
87639
|
});
|
|
87640
|
+
clearAllChartInstanceList(this._table, true);
|
|
87641
|
+
clearAndReleaseBrushingChartInstance(this._table.scenegraph);
|
|
87252
87642
|
}
|
|
87253
87643
|
getHeadNode(col, row) {
|
|
87254
87644
|
let dimensions;
|
|
@@ -87394,53 +87784,95 @@
|
|
|
87394
87784
|
return null;
|
|
87395
87785
|
}
|
|
87396
87786
|
_generateChartState() {
|
|
87787
|
+
const select_filter = (datum) => {
|
|
87788
|
+
if (this._table._selectedDataItemsInChart.length >= 1) {
|
|
87789
|
+
const match = this._table._selectedDataItemsInChart.find(item => {
|
|
87790
|
+
for (const itemKey in item) {
|
|
87791
|
+
if (typeof item[itemKey] !== 'object' && item[itemKey] !== datum[itemKey]) {
|
|
87792
|
+
return false;
|
|
87793
|
+
}
|
|
87794
|
+
}
|
|
87795
|
+
return true;
|
|
87796
|
+
});
|
|
87797
|
+
return !!match;
|
|
87798
|
+
}
|
|
87799
|
+
else if (this._table._selectedDimensionInChart?.length) {
|
|
87800
|
+
const match = this._table._selectedDimensionInChart.every(item => {
|
|
87801
|
+
if (typeof item.value !== 'object' && datum[item.key] !== item.value) {
|
|
87802
|
+
return false;
|
|
87803
|
+
}
|
|
87804
|
+
return true;
|
|
87805
|
+
});
|
|
87806
|
+
return !!match;
|
|
87807
|
+
}
|
|
87808
|
+
return false;
|
|
87809
|
+
};
|
|
87810
|
+
const selected_reverse = (datum) => {
|
|
87811
|
+
if (this._table._selectedDataItemsInChart.length >= 1) {
|
|
87812
|
+
const match = this._table._selectedDataItemsInChart.find(item => {
|
|
87813
|
+
for (const itemKey in item) {
|
|
87814
|
+
if (typeof item[itemKey] !== 'object' && item[itemKey] !== datum[itemKey]) {
|
|
87815
|
+
return false;
|
|
87816
|
+
}
|
|
87817
|
+
}
|
|
87818
|
+
return true;
|
|
87819
|
+
});
|
|
87820
|
+
return !match;
|
|
87821
|
+
}
|
|
87822
|
+
else if (this._table._selectedDimensionInChart?.length) {
|
|
87823
|
+
const match = this._table._selectedDimensionInChart.every(item => {
|
|
87824
|
+
if (typeof item.value !== 'object' && datum[item.key] !== item.value) {
|
|
87825
|
+
return false;
|
|
87826
|
+
}
|
|
87827
|
+
return true;
|
|
87828
|
+
});
|
|
87829
|
+
return !match;
|
|
87830
|
+
}
|
|
87831
|
+
return false;
|
|
87832
|
+
};
|
|
87397
87833
|
const state = {
|
|
87398
87834
|
vtable_selected: {
|
|
87399
87835
|
filter: (datum) => {
|
|
87400
|
-
if (this._table.
|
|
87401
|
-
|
|
87402
|
-
for (const itemKey in item) {
|
|
87403
|
-
if (typeof item[itemKey] !== 'object' && item[itemKey] !== datum[itemKey]) {
|
|
87404
|
-
return false;
|
|
87405
|
-
}
|
|
87406
|
-
}
|
|
87407
|
-
return true;
|
|
87408
|
-
});
|
|
87409
|
-
return !!match;
|
|
87836
|
+
if (this._table.options.chartDimensionLinkage?.selectedStateFilter) {
|
|
87837
|
+
return this._table.options.chartDimensionLinkage.selectedStateFilter(datum);
|
|
87410
87838
|
}
|
|
87411
|
-
|
|
87412
|
-
|
|
87413
|
-
|
|
87414
|
-
return false;
|
|
87415
|
-
}
|
|
87416
|
-
return true;
|
|
87417
|
-
});
|
|
87418
|
-
return !!match;
|
|
87839
|
+
if (this._table._selectedDataMode === 'click' ||
|
|
87840
|
+
this._table._selectedDataMode === 'multiple-select') {
|
|
87841
|
+
return select_filter(datum);
|
|
87419
87842
|
}
|
|
87420
87843
|
return false;
|
|
87421
87844
|
}
|
|
87422
87845
|
},
|
|
87423
87846
|
vtable_selected_reverse: {
|
|
87424
87847
|
filter: (datum) => {
|
|
87425
|
-
if (this._table.
|
|
87426
|
-
|
|
87427
|
-
for (const itemKey in item) {
|
|
87428
|
-
if (typeof item[itemKey] !== 'object' && item[itemKey] !== datum[itemKey]) {
|
|
87429
|
-
return false;
|
|
87430
|
-
}
|
|
87431
|
-
}
|
|
87432
|
-
return true;
|
|
87433
|
-
});
|
|
87434
|
-
return !match;
|
|
87848
|
+
if (this._table.options.chartDimensionLinkage?.selectedReverseStateFilter) {
|
|
87849
|
+
return this._table.options.chartDimensionLinkage.selectedReverseStateFilter(datum);
|
|
87435
87850
|
}
|
|
87436
|
-
|
|
87437
|
-
|
|
87438
|
-
|
|
87439
|
-
|
|
87440
|
-
|
|
87441
|
-
|
|
87442
|
-
|
|
87443
|
-
|
|
87851
|
+
if (this._table._selectedDataMode === 'click' ||
|
|
87852
|
+
this._table._selectedDataMode === 'multiple-select') {
|
|
87853
|
+
return selected_reverse(datum);
|
|
87854
|
+
}
|
|
87855
|
+
return false;
|
|
87856
|
+
}
|
|
87857
|
+
},
|
|
87858
|
+
inBrush: {
|
|
87859
|
+
filter: (datum) => {
|
|
87860
|
+
if (this._table.options.chartDimensionLinkage?.inBrushStateFilter) {
|
|
87861
|
+
return this._table.options.chartDimensionLinkage.inBrushStateFilter(datum);
|
|
87862
|
+
}
|
|
87863
|
+
if (this._table._selectedDataMode === 'brush') {
|
|
87864
|
+
return select_filter(datum);
|
|
87865
|
+
}
|
|
87866
|
+
return false;
|
|
87867
|
+
}
|
|
87868
|
+
},
|
|
87869
|
+
outOfBrush: {
|
|
87870
|
+
filter: (datum) => {
|
|
87871
|
+
if (this._table.options.chartDimensionLinkage?.outOfBrushStateFilter) {
|
|
87872
|
+
return this._table.options.chartDimensionLinkage.outOfBrushStateFilter(datum);
|
|
87873
|
+
}
|
|
87874
|
+
if (this._table._selectedDataMode === 'brush') {
|
|
87875
|
+
return selected_reverse(datum);
|
|
87444
87876
|
}
|
|
87445
87877
|
return false;
|
|
87446
87878
|
}
|
|
@@ -87449,14 +87881,16 @@
|
|
|
87449
87881
|
return state;
|
|
87450
87882
|
}
|
|
87451
87883
|
updateDataStateToChartInstance(activeChartInstance) {
|
|
87452
|
-
if (activeChartInstance?.getSpec().select?.enable !== false
|
|
87884
|
+
if (activeChartInstance?.getSpec().select?.enable !== false ||
|
|
87885
|
+
activeChartInstance?.getSpec().interactions.find((interaction) => interaction.type === 'element-select')) {
|
|
87453
87886
|
if (!activeChartInstance) {
|
|
87454
87887
|
activeChartInstance = this._table._getActiveChartInstance();
|
|
87455
87888
|
}
|
|
87456
87889
|
const state = this._generateChartState();
|
|
87457
87890
|
this._indicators.forEach((_indicatorObject) => {
|
|
87458
87891
|
const chartInstance = _indicatorObject.chartInstance;
|
|
87459
|
-
if (_indicatorObject.chartSpec.select?.enable !== false
|
|
87892
|
+
if (_indicatorObject.chartSpec.select?.enable !== false ||
|
|
87893
|
+
_indicatorObject.chartSpec.interactions.find((interaction) => interaction.type === 'element-select')) {
|
|
87460
87894
|
chartInstance.updateState(state);
|
|
87461
87895
|
}
|
|
87462
87896
|
});
|
|
@@ -87464,7 +87898,8 @@
|
|
|
87464
87898
|
}
|
|
87465
87899
|
}
|
|
87466
87900
|
updateDataStateToActiveChartInstance(activeChartInstance) {
|
|
87467
|
-
if (activeChartInstance?.getSpec().select?.enable !== false
|
|
87901
|
+
if (activeChartInstance?.getSpec().select?.enable !== false ||
|
|
87902
|
+
activeChartInstance?.getSpec().interactions.find((interaction) => interaction.type === 'element-select')) {
|
|
87468
87903
|
if (!activeChartInstance) {
|
|
87469
87904
|
activeChartInstance = this._table._getActiveChartInstance();
|
|
87470
87905
|
}
|
|
@@ -91726,6 +92161,7 @@
|
|
|
91726
92161
|
pivotSortState;
|
|
91727
92162
|
dataset;
|
|
91728
92163
|
_selectedDataItemsInChart = [];
|
|
92164
|
+
_selectedDataMode = 'click';
|
|
91729
92165
|
_selectedDimensionInChart = [];
|
|
91730
92166
|
_chartEventMap = {};
|
|
91731
92167
|
_axes;
|
|
@@ -91901,6 +92337,8 @@
|
|
|
91901
92337
|
}) {
|
|
91902
92338
|
const internalProps = this.internalProps;
|
|
91903
92339
|
super.updateOption(options, updateConfig);
|
|
92340
|
+
this.scenegraph.updateChartState(null, undefined);
|
|
92341
|
+
this.scenegraph.deactivateChart(-1, -1, true);
|
|
91904
92342
|
this.layoutNodeId = { seqId: 0 };
|
|
91905
92343
|
this.internalProps.columns = cloneDeep(options.columns);
|
|
91906
92344
|
this.internalProps.rows = cloneDeep(options.rows);
|
|
@@ -92830,6 +93268,8 @@
|
|
|
92830
93268
|
setRecords(records) {
|
|
92831
93269
|
this.internalProps.layoutMap.release();
|
|
92832
93270
|
clearChartRenderQueue();
|
|
93271
|
+
this.scenegraph.updateChartState(null, undefined);
|
|
93272
|
+
this.scenegraph.deactivateChart(-1, -1, true);
|
|
92833
93273
|
const oldHoverState = { col: this.stateManager.hover.cellPos.col, row: this.stateManager.hover.cellPos.row };
|
|
92834
93274
|
this.options.records = this.internalProps.records = records;
|
|
92835
93275
|
const options = this.options;
|
|
@@ -92915,6 +93355,12 @@
|
|
|
92915
93355
|
const headerNodes = layoutMap.getCellHeaderPathsWithTreeNode(col, row);
|
|
92916
93356
|
return headerNodes;
|
|
92917
93357
|
}
|
|
93358
|
+
disableTooltipToAllChartInstances() {
|
|
93359
|
+
disableTooltipToAllChartInstances();
|
|
93360
|
+
}
|
|
93361
|
+
enableTooltipToAllChartInstances() {
|
|
93362
|
+
enableTooltipToAllChartInstances();
|
|
93363
|
+
}
|
|
92918
93364
|
}
|
|
92919
93365
|
|
|
92920
93366
|
class Circle extends Circle$1 {
|
|
@@ -93476,7 +93922,7 @@
|
|
|
93476
93922
|
}
|
|
93477
93923
|
|
|
93478
93924
|
registerForVrender();
|
|
93479
|
-
const version = "1.22.
|
|
93925
|
+
const version = "1.22.12-alpha.0";
|
|
93480
93926
|
function getIcons() {
|
|
93481
93927
|
return get$2();
|
|
93482
93928
|
}
|