@visactor/vtable 0.9.3-alpha.3 → 0.9.3-alpha.5
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/ListTable.js +10 -11
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.d.ts +11 -8
- package/cjs/PivotChart.js +34 -33
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.js +12 -13
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/components/axis/axis.js +6 -5
- package/cjs/components/axis/axis.js.map +1 -1
- package/cjs/components/axis/get-axis-component-size.d.ts +3 -0
- package/cjs/components/axis/get-axis-component-size.js +50 -0
- package/cjs/components/axis/get-axis-component-size.js.map +1 -0
- package/cjs/components/axis/linear-scale.js +2 -1
- package/cjs/components/axis/linear-scale.js.map +1 -1
- package/cjs/components/legend/legend.d.ts +1 -1
- package/cjs/components/legend/legend.js +4 -4
- package/cjs/components/legend/legend.js.map +1 -1
- package/cjs/components/menu/dom/BaseMenu.d.ts +1 -1
- package/cjs/components/menu/dom/BaseMenu.js +2 -2
- package/cjs/components/menu/dom/BaseMenu.js.map +1 -1
- package/cjs/components/menu/dom/MenuHandler.d.ts +1 -1
- package/cjs/components/menu/dom/MenuHandler.js +5 -5
- package/cjs/components/menu/dom/MenuHandler.js.map +1 -1
- package/cjs/components/menu/dom/logic/MenuContainer.d.ts +1 -1
- package/cjs/components/menu/dom/logic/MenuContainer.js +2 -2
- package/cjs/components/menu/dom/logic/MenuContainer.js.map +1 -1
- package/cjs/components/menu/dom/logic/MenuElement.d.ts +1 -1
- package/cjs/components/menu/dom/logic/MenuElement.js +2 -2
- package/cjs/components/menu/dom/logic/MenuElement.js.map +1 -1
- package/cjs/components/title/title.d.ts +1 -1
- package/cjs/components/title/title.js +4 -4
- package/cjs/components/title/title.js.map +1 -1
- package/cjs/components/tooltip/BaseTooltip.d.ts +1 -1
- package/cjs/components/tooltip/BaseTooltip.js +2 -2
- package/cjs/components/tooltip/BaseTooltip.js.map +1 -1
- package/cjs/components/tooltip/TooltipHandler.d.ts +1 -1
- package/cjs/components/tooltip/TooltipHandler.js +7 -7
- package/cjs/components/tooltip/TooltipHandler.js.map +1 -1
- package/cjs/components/tooltip/logic/BubbleTooltipElement.d.ts +1 -1
- package/cjs/components/tooltip/logic/BubbleTooltipElement.js +2 -2
- package/cjs/components/tooltip/logic/BubbleTooltipElement.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +9 -8
- package/cjs/core/BaseTable.js +36 -64
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/FouseInput.d.ts +1 -1
- package/cjs/core/FouseInput.js +1 -1
- package/cjs/core/FouseInput.js.map +1 -1
- package/cjs/core/tableHelper.js +3 -3
- package/cjs/core/tableHelper.js.map +1 -1
- package/cjs/data/CachedDataSource.d.ts +1 -1
- package/cjs/data/CachedDataSource.js +2 -2
- package/cjs/data/CachedDataSource.js.map +1 -1
- package/cjs/data/DataSource.d.ts +1 -1
- package/cjs/data/DataSource.js +2 -2
- package/cjs/data/DataSource.js.map +1 -1
- package/cjs/data/FilterDataSource.js.map +1 -1
- package/cjs/dataset/dataset.d.ts +4 -4
- package/cjs/dataset/dataset.js +16 -13
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/event/EventHandler.d.ts +1 -1
- package/cjs/event/EventHandler.js +1 -1
- package/cjs/event/EventHandler.js.map +1 -1
- package/cjs/event/EventTarget.d.ts +3 -3
- package/cjs/event/EventTarget.js +5 -5
- package/cjs/event/EventTarget.js.map +1 -1
- package/cjs/event/drill.js +1 -1
- package/cjs/event/drill.js.map +1 -1
- package/cjs/event/event.d.ts +1 -1
- package/cjs/event/event.js +11 -7
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/table-group.js +3 -1
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/event/media-click.js +1 -1
- package/cjs/event/media-click.js.map +1 -1
- package/cjs/event/pivot-chart/axis-hover.js +2 -2
- package/cjs/event/pivot-chart/axis-hover.js.map +1 -1
- package/cjs/event/sparkline-event.js +2 -2
- package/cjs/event/sparkline-event.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/chart-helper/get-axis-config.d.ts +2 -0
- package/cjs/layout/chart-helper/get-axis-config.js +70 -45
- package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
- package/cjs/layout/chart-helper/get-chart-spec.js +29 -17
- package/cjs/layout/chart-helper/get-chart-spec.js.map +1 -1
- package/cjs/layout/pivot-header-layout.d.ts +4 -0
- package/cjs/layout/pivot-header-layout.js +16 -0
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/pivot-layout.d.ts +5 -0
- package/cjs/layout/pivot-layout.js +27 -0
- package/cjs/layout/pivot-layout.js.map +1 -1
- package/cjs/layout/simple-header-layout.d.ts +4 -0
- package/cjs/layout/simple-header-layout.js +16 -0
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/cjs/scenegraph/component/menu.d.ts +1 -1
- package/cjs/scenegraph/component/menu.js +1 -1
- package/cjs/scenegraph/component/menu.js.map +1 -1
- package/cjs/scenegraph/graphic/chart.d.ts +6 -6
- package/cjs/scenegraph/graphic/chart.js +16 -2
- package/cjs/scenegraph/graphic/chart.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render.js +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/cjs/scenegraph/graphic/icon.d.ts +2 -2
- package/cjs/scenegraph/graphic/icon.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +0 -6
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js +7 -7
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.js +6 -3
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +4 -4
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js +23 -4
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js +10 -2
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
- package/cjs/scenegraph/refresh-node/update-chart.js +1 -7
- package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +1 -1
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/utils/text-icon-layout.js +1 -1
- package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/cjs/state/state.js +5 -2
- package/cjs/state/state.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +20 -14
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/component/axis.d.ts +1 -1
- package/cjs/ts-types/component/axis.js.map +1 -1
- package/cjs/ts-types/events.d.ts +2 -0
- package/cjs/ts-types/events.js.map +1 -1
- package/cjs/ts-types/list-table/layout-map/api.d.ts +1 -0
- package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +6 -1
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/dist/vtable.js +713 -506
- package/dist/vtable.min.js +3 -3
- package/es/ListTable.js +10 -10
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.d.ts +11 -8
- package/es/PivotChart.js +34 -32
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.js +12 -12
- package/es/PivotTable.js.map +1 -1
- package/es/components/axis/axis.js +4 -4
- package/es/components/axis/axis.js.map +1 -1
- package/es/components/axis/get-axis-component-size.d.ts +3 -0
- package/es/components/axis/get-axis-component-size.js +44 -0
- package/es/components/axis/get-axis-component-size.js.map +1 -0
- package/es/components/axis/linear-scale.js +2 -1
- package/es/components/axis/linear-scale.js.map +1 -1
- package/es/components/legend/legend.d.ts +1 -1
- package/es/components/legend/legend.js +4 -4
- package/es/components/legend/legend.js.map +1 -1
- package/es/components/menu/dom/BaseMenu.d.ts +1 -1
- package/es/components/menu/dom/BaseMenu.js +2 -2
- package/es/components/menu/dom/BaseMenu.js.map +1 -1
- package/es/components/menu/dom/MenuHandler.d.ts +1 -1
- package/es/components/menu/dom/MenuHandler.js +5 -5
- package/es/components/menu/dom/MenuHandler.js.map +1 -1
- package/es/components/menu/dom/logic/MenuContainer.d.ts +1 -1
- package/es/components/menu/dom/logic/MenuContainer.js +2 -2
- package/es/components/menu/dom/logic/MenuContainer.js.map +1 -1
- package/es/components/menu/dom/logic/MenuElement.d.ts +1 -1
- package/es/components/menu/dom/logic/MenuElement.js +2 -2
- package/es/components/menu/dom/logic/MenuElement.js.map +1 -1
- package/es/components/title/title.d.ts +1 -1
- package/es/components/title/title.js +4 -4
- package/es/components/title/title.js.map +1 -1
- package/es/components/tooltip/BaseTooltip.d.ts +1 -1
- package/es/components/tooltip/BaseTooltip.js +2 -2
- package/es/components/tooltip/BaseTooltip.js.map +1 -1
- package/es/components/tooltip/TooltipHandler.d.ts +1 -1
- package/es/components/tooltip/TooltipHandler.js +7 -7
- package/es/components/tooltip/TooltipHandler.js.map +1 -1
- package/es/components/tooltip/logic/BubbleTooltipElement.d.ts +1 -1
- package/es/components/tooltip/logic/BubbleTooltipElement.js +2 -2
- package/es/components/tooltip/logic/BubbleTooltipElement.js.map +1 -1
- package/es/core/BaseTable.d.ts +9 -8
- package/es/core/BaseTable.js +37 -64
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/FouseInput.d.ts +1 -1
- package/es/core/FouseInput.js +1 -1
- package/es/core/FouseInput.js.map +1 -1
- package/es/core/tableHelper.js +3 -3
- package/es/core/tableHelper.js.map +1 -1
- package/es/data/CachedDataSource.d.ts +1 -1
- package/es/data/CachedDataSource.js +2 -2
- package/es/data/CachedDataSource.js.map +1 -1
- package/es/data/DataSource.d.ts +1 -1
- package/es/data/DataSource.js +2 -2
- package/es/data/DataSource.js.map +1 -1
- package/es/data/FilterDataSource.js.map +1 -1
- package/es/dataset/dataset.d.ts +4 -4
- package/es/dataset/dataset.js +15 -12
- package/es/dataset/dataset.js.map +1 -1
- package/es/event/EventHandler.d.ts +1 -1
- package/es/event/EventHandler.js +1 -1
- package/es/event/EventHandler.js.map +1 -1
- package/es/event/EventTarget.d.ts +3 -3
- package/es/event/EventTarget.js +5 -5
- package/es/event/EventTarget.js.map +1 -1
- package/es/event/drill.js +1 -1
- package/es/event/drill.js.map +1 -1
- package/es/event/event.d.ts +1 -1
- package/es/event/event.js +12 -6
- package/es/event/event.js.map +1 -1
- package/es/event/listener/table-group.js +3 -1
- package/es/event/listener/table-group.js.map +1 -1
- package/es/event/media-click.js +1 -1
- package/es/event/media-click.js.map +1 -1
- package/es/event/pivot-chart/axis-hover.js +2 -2
- package/es/event/pivot-chart/axis-hover.js.map +1 -1
- package/es/event/sparkline-event.js +2 -2
- package/es/event/sparkline-event.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/chart-helper/get-axis-config.d.ts +2 -0
- package/es/layout/chart-helper/get-axis-config.js +67 -43
- package/es/layout/chart-helper/get-axis-config.js.map +1 -1
- package/es/layout/chart-helper/get-chart-spec.js +26 -16
- package/es/layout/chart-helper/get-chart-spec.js.map +1 -1
- package/es/layout/pivot-header-layout.d.ts +4 -0
- package/es/layout/pivot-header-layout.js +16 -0
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/pivot-layout.d.ts +5 -0
- package/es/layout/pivot-layout.js +27 -0
- package/es/layout/pivot-layout.js.map +1 -1
- package/es/layout/simple-header-layout.d.ts +4 -0
- package/es/layout/simple-header-layout.js +16 -0
- package/es/layout/simple-header-layout.js.map +1 -1
- package/es/scenegraph/component/menu.d.ts +1 -1
- package/es/scenegraph/component/menu.js +1 -1
- package/es/scenegraph/component/menu.js.map +1 -1
- package/es/scenegraph/graphic/chart.d.ts +6 -6
- package/es/scenegraph/graphic/chart.js +16 -2
- package/es/scenegraph/graphic/chart.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render.js +1 -1
- package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/es/scenegraph/graphic/icon.d.ts +2 -2
- package/es/scenegraph/graphic/icon.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.js +0 -6
- package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/image-cell.js +4 -4
- package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/es/scenegraph/group-creater/progress/proxy.js +6 -3
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +4 -4
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/es/scenegraph/layout/compute-col-width.js +26 -3
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.js +10 -2
- package/es/scenegraph/layout/compute-row-height.js.map +1 -1
- package/es/scenegraph/refresh-node/update-chart.js +1 -7
- package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/es/scenegraph/scenegraph.js +1 -1
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/utils/text-icon-layout.js +1 -1
- package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/es/state/state.js +5 -2
- package/es/state/state.js.map +1 -1
- package/es/ts-types/base-table.d.ts +20 -14
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/component/axis.d.ts +1 -1
- package/es/ts-types/component/axis.js.map +1 -1
- package/es/ts-types/events.d.ts +2 -0
- package/es/ts-types/events.js.map +1 -1
- package/es/ts-types/list-table/layout-map/api.d.ts +1 -0
- package/es/ts-types/list-table/layout-map/api.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +6 -1
- package/es/ts-types/table-engine.js.map +1 -1
- package/package.json +10 -10
package/dist/vtable.js
CHANGED
|
@@ -350,7 +350,7 @@
|
|
|
350
350
|
listeners: {},
|
|
351
351
|
listenerData: {}
|
|
352
352
|
};
|
|
353
|
-
|
|
353
|
+
on(type, listener) {
|
|
354
354
|
const list = this.listenersData.listeners[type] || (this.listenersData.listeners[type] = []);
|
|
355
355
|
list.push(listener);
|
|
356
356
|
const id = idCount$1++;
|
|
@@ -368,14 +368,14 @@
|
|
|
368
368
|
};
|
|
369
369
|
return id;
|
|
370
370
|
}
|
|
371
|
-
|
|
371
|
+
off(id) {
|
|
372
372
|
if (!this.listenersData) {
|
|
373
373
|
return;
|
|
374
374
|
}
|
|
375
375
|
this.listenersData.listenerData[id].remove();
|
|
376
376
|
}
|
|
377
377
|
addEventListener(type, listener, option) {
|
|
378
|
-
this.
|
|
378
|
+
this.on(type, listener);
|
|
379
379
|
}
|
|
380
380
|
removeEventListener(type, listener) {
|
|
381
381
|
if (!this.listenersData) {
|
|
@@ -384,7 +384,7 @@
|
|
|
384
384
|
for (const key in this.listenersData.listenerData) {
|
|
385
385
|
const listenerData = this.listenersData.listenerData[key];
|
|
386
386
|
if (listenerData.type === type && listenerData.listener === listener) {
|
|
387
|
-
this.
|
|
387
|
+
this.off(key);
|
|
388
388
|
}
|
|
389
389
|
}
|
|
390
390
|
}
|
|
@@ -404,7 +404,7 @@
|
|
|
404
404
|
}
|
|
405
405
|
return list.map(listener => listener.call(this, event)).filter(r => isValid$1(r));
|
|
406
406
|
}
|
|
407
|
-
|
|
407
|
+
release() {
|
|
408
408
|
delete this.listenersData;
|
|
409
409
|
}
|
|
410
410
|
};
|
|
@@ -1644,7 +1644,7 @@
|
|
|
1644
1644
|
}
|
|
1645
1645
|
this.listeners = {};
|
|
1646
1646
|
}
|
|
1647
|
-
|
|
1647
|
+
release() {
|
|
1648
1648
|
if (Env.mode === 'node') {
|
|
1649
1649
|
return;
|
|
1650
1650
|
}
|
|
@@ -36282,6 +36282,10 @@
|
|
|
36282
36282
|
setExtraAttrFromSpec(nice, zero, range, expand) {
|
|
36283
36283
|
this.nice = nice;
|
|
36284
36284
|
this.zero = zero;
|
|
36285
|
+
if (this.zero) {
|
|
36286
|
+
range.min = Math.min(range.min, 0);
|
|
36287
|
+
range.max = Math.max(range.max, 0);
|
|
36288
|
+
}
|
|
36285
36289
|
this.domain = range;
|
|
36286
36290
|
this.expand = expand;
|
|
36287
36291
|
}
|
|
@@ -36525,13 +36529,13 @@
|
|
|
36525
36529
|
this.table = table;
|
|
36526
36530
|
this.width = width;
|
|
36527
36531
|
this.height = height;
|
|
36528
|
-
this.option = merge$2({},
|
|
36532
|
+
this.option = merge$2({}, commonAxis, option);
|
|
36529
36533
|
this.orient = option.orient ?? 'left';
|
|
36530
36534
|
this.visible = option.visible ?? true;
|
|
36531
36535
|
this.type = option.type ?? 'band';
|
|
36532
36536
|
this.inverse = 'inverse' in option ? !!option.inverse : false;
|
|
36533
36537
|
if (option.type === 'band') {
|
|
36534
|
-
this.data = option.
|
|
36538
|
+
this.data = option.domain;
|
|
36535
36539
|
}
|
|
36536
36540
|
this.initScale();
|
|
36537
36541
|
this.initData();
|
|
@@ -36655,15 +36659,16 @@
|
|
|
36655
36659
|
}
|
|
36656
36660
|
updateScaleRange() {
|
|
36657
36661
|
const { width, height } = this.getLayoutRect();
|
|
36662
|
+
const inverse = this.option.inverse || false;
|
|
36658
36663
|
let newRange = [0, 0];
|
|
36659
36664
|
if (isXAxis(this.orient)) {
|
|
36660
36665
|
if (isValidNumber(width)) {
|
|
36661
|
-
newRange = [0, width];
|
|
36666
|
+
newRange = inverse ? [width, 0] : [0, width];
|
|
36662
36667
|
}
|
|
36663
36668
|
}
|
|
36664
36669
|
else {
|
|
36665
36670
|
if (isValidNumber(height)) {
|
|
36666
|
-
newRange = [height, 0];
|
|
36671
|
+
newRange = inverse ? [0, height] : [height, 0];
|
|
36667
36672
|
}
|
|
36668
36673
|
}
|
|
36669
36674
|
this.scale.updateRange(newRange);
|
|
@@ -37132,8 +37137,8 @@
|
|
|
37132
37137
|
}
|
|
37133
37138
|
return [];
|
|
37134
37139
|
}
|
|
37135
|
-
|
|
37136
|
-
super.
|
|
37140
|
+
release() {
|
|
37141
|
+
super.release?.();
|
|
37137
37142
|
}
|
|
37138
37143
|
clearSortedMap() {
|
|
37139
37144
|
this.currentIndexedData && (this.currentIndexedData.length = 0);
|
|
@@ -37240,8 +37245,8 @@
|
|
|
37240
37245
|
recordPromiseCallBack(index, record) {
|
|
37241
37246
|
this._recordCache[index] = record;
|
|
37242
37247
|
}
|
|
37243
|
-
|
|
37244
|
-
super.
|
|
37248
|
+
release() {
|
|
37249
|
+
super.release?.();
|
|
37245
37250
|
}
|
|
37246
37251
|
}
|
|
37247
37252
|
|
|
@@ -37708,7 +37713,7 @@
|
|
|
37708
37713
|
if (table.dataSource.enableHierarchyState) {
|
|
37709
37714
|
table.refreshRowColCount();
|
|
37710
37715
|
}
|
|
37711
|
-
table.
|
|
37716
|
+
table.render();
|
|
37712
37717
|
})
|
|
37713
37718
|
];
|
|
37714
37719
|
}
|
|
@@ -37717,7 +37722,7 @@
|
|
|
37717
37722
|
const data = records;
|
|
37718
37723
|
table.internalProps.records = records;
|
|
37719
37724
|
const newDataSource = (table.internalProps.dataSource = CachedDataSource.ofArray(data, table.pagerConf, table.options.hierarchyExpandLevel ?? (table.hasHierarchyTreeHeader?.() ? 1 : undefined)));
|
|
37720
|
-
table.
|
|
37725
|
+
table.addReleaseObj(newDataSource);
|
|
37721
37726
|
});
|
|
37722
37727
|
}
|
|
37723
37728
|
function _setDataSource(table, dataSource) {
|
|
@@ -37728,7 +37733,7 @@
|
|
|
37728
37733
|
}
|
|
37729
37734
|
else {
|
|
37730
37735
|
const newDataSource = (table.internalProps.dataSource = new CachedDataSource(dataSource));
|
|
37731
|
-
table.
|
|
37736
|
+
table.addReleaseObj(newDataSource);
|
|
37732
37737
|
}
|
|
37733
37738
|
}
|
|
37734
37739
|
else {
|
|
@@ -37798,9 +37803,6 @@
|
|
|
37798
37803
|
}
|
|
37799
37804
|
return orgWidth;
|
|
37800
37805
|
}
|
|
37801
|
-
function isAutoDefine(width) {
|
|
37802
|
-
return Boolean(width && typeof width === 'string' && width.toLowerCase() === 'auto');
|
|
37803
|
-
}
|
|
37804
37806
|
function _getScrollableVisibleRect(table) {
|
|
37805
37807
|
let frozenColsWidth = 0;
|
|
37806
37808
|
if (table.internalProps.frozenColCount > 0) {
|
|
@@ -38247,7 +38249,7 @@
|
|
|
38247
38249
|
return undefined;
|
|
38248
38250
|
}
|
|
38249
38251
|
|
|
38250
|
-
|
|
38252
|
+
get$1();
|
|
38251
38253
|
function createImageCellGroup(columnGroup, xOrigin, yOrigin, col, row, width, height, keepAspectRatio, imageAutoSizing, padding, textAlign, textBaseline, table, cellTheme) {
|
|
38252
38254
|
const headerStyle = table._getCellStyle(col, row);
|
|
38253
38255
|
const functionalPadding = getFunctionalProp('padding', headerStyle, col, row, table);
|
|
@@ -38284,7 +38286,7 @@
|
|
|
38284
38286
|
y: padding[0],
|
|
38285
38287
|
width: width - padding[1] - padding[3],
|
|
38286
38288
|
height: height - padding[0] - padding[2],
|
|
38287
|
-
image: value
|
|
38289
|
+
image: value,
|
|
38288
38290
|
cursor: 'pointer'
|
|
38289
38291
|
});
|
|
38290
38292
|
image.name = 'image';
|
|
@@ -38347,7 +38349,7 @@
|
|
|
38347
38349
|
function updateImageCellContentWhileResize(cellGroup, col, row, table) {
|
|
38348
38350
|
const image = cellGroup.getChildByName('image');
|
|
38349
38351
|
const originImage = (typeof image.attribute.image !== 'string' && image.attribute.image) ||
|
|
38350
|
-
image.resources
|
|
38352
|
+
image.resources?.get(image.attribute.image).data;
|
|
38351
38353
|
if (!originImage) {
|
|
38352
38354
|
return;
|
|
38353
38355
|
}
|
|
@@ -39787,6 +39789,7 @@
|
|
|
39787
39789
|
iconAttribute.height = icon.height;
|
|
39788
39790
|
iconAttribute.visibleTime = icon.visibleTime ?? 'always';
|
|
39789
39791
|
iconAttribute.funcType = icon.funcType;
|
|
39792
|
+
iconAttribute.interactive = icon.interactive;
|
|
39790
39793
|
let hierarchyOffset = 0;
|
|
39791
39794
|
if (isNumber(col) &&
|
|
39792
39795
|
isNumber(row) &&
|
|
@@ -40692,7 +40695,7 @@
|
|
|
40692
40695
|
componentGroup.appendChild(this._menuInstance);
|
|
40693
40696
|
this.bindEvent();
|
|
40694
40697
|
}
|
|
40695
|
-
|
|
40698
|
+
release() {
|
|
40696
40699
|
}
|
|
40697
40700
|
attach(x, y, col, row, type, menuInfo) {
|
|
40698
40701
|
if (type === MenuType.dropDown && this.checkDropDownMenuChange(col, row)) {
|
|
@@ -41643,7 +41646,7 @@
|
|
|
41643
41646
|
renderCanvas: params.canvas,
|
|
41644
41647
|
mode: 'desktop-browser',
|
|
41645
41648
|
canvasControled: false,
|
|
41646
|
-
viewBox:
|
|
41649
|
+
viewBox: { x1: 0, x2: 0, y1: 0, y2: 0 },
|
|
41647
41650
|
interactive: false,
|
|
41648
41651
|
animation: false
|
|
41649
41652
|
});
|
|
@@ -41655,7 +41658,7 @@
|
|
|
41655
41658
|
}
|
|
41656
41659
|
activate(table) {
|
|
41657
41660
|
this.active = true;
|
|
41658
|
-
const { x1, y1, x2, y2 } = this.
|
|
41661
|
+
const { x1, y1, x2, y2 } = this.getViewBox();
|
|
41659
41662
|
const tableBound = table.scenegraph.tableGroup.globalAABBBounds;
|
|
41660
41663
|
const bodyBound = new Bounds();
|
|
41661
41664
|
bodyBound.x1 = tableBound.x1 + table.getFrozenColsWidth();
|
|
@@ -41723,6 +41726,17 @@
|
|
|
41723
41726
|
updateData(data) {
|
|
41724
41727
|
this.attribute.data = data;
|
|
41725
41728
|
}
|
|
41729
|
+
getViewBox() {
|
|
41730
|
+
const cellGroup = this.parent;
|
|
41731
|
+
const padding = this.attribute.cellPadding;
|
|
41732
|
+
const table = this.stage.table;
|
|
41733
|
+
return {
|
|
41734
|
+
x1: Math.ceil(cellGroup.globalAABBBounds.x1 + padding[3] + table.scrollLeft),
|
|
41735
|
+
x2: Math.ceil(cellGroup.globalAABBBounds.x1 + cellGroup.attribute.width - padding[1] + table.scrollLeft),
|
|
41736
|
+
y1: Math.ceil(cellGroup.globalAABBBounds.y1 + padding[0] + table.scrollTop),
|
|
41737
|
+
y2: Math.ceil(cellGroup.globalAABBBounds.y1 + cellGroup.attribute.height - padding[2] + table.scrollTop)
|
|
41738
|
+
};
|
|
41739
|
+
}
|
|
41726
41740
|
}
|
|
41727
41741
|
|
|
41728
41742
|
const ChartRender = Symbol.for('ChartRender');
|
|
@@ -41731,7 +41745,8 @@
|
|
|
41731
41745
|
numberType = CHART_NUMBER_TYPE;
|
|
41732
41746
|
drawShape(chart, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
41733
41747
|
const groupAttribute = getTheme(chart, params?.theme).group;
|
|
41734
|
-
const { dataId, data
|
|
41748
|
+
const { dataId, data } = chart.attribute;
|
|
41749
|
+
const viewBox = chart.getViewBox();
|
|
41735
41750
|
const { width = groupAttribute.width, height = groupAttribute.height } = chart.attribute;
|
|
41736
41751
|
const { chartInstance, active, cacheCanvas, activeChartInstance } = chart;
|
|
41737
41752
|
if (!active && cacheCanvas) {
|
|
@@ -42403,6 +42418,312 @@
|
|
|
42403
42418
|
bind(GroupRenderContribution).toService(AdjustColorGroupAfterRenderContribution);
|
|
42404
42419
|
});
|
|
42405
42420
|
|
|
42421
|
+
function getAxisConfigInPivotChart(col, row, layout) {
|
|
42422
|
+
if (!layout._table.isPivotChart()) {
|
|
42423
|
+
return undefined;
|
|
42424
|
+
}
|
|
42425
|
+
if (layout.indicatorsAsCol) {
|
|
42426
|
+
if (layout.hasTwoIndicatorAxes &&
|
|
42427
|
+
row === layout.columnHeaderLevelCount - 1 &&
|
|
42428
|
+
col >= layout.rowHeaderLevelCount &&
|
|
42429
|
+
col < layout.colCount - layout.rightFrozenColCount) {
|
|
42430
|
+
const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, layout.columnHeaderLevelCount - 1);
|
|
42431
|
+
let defaultKey = indicatorKeys[1];
|
|
42432
|
+
if (isArray$3(defaultKey)) {
|
|
42433
|
+
defaultKey = defaultKey[0];
|
|
42434
|
+
}
|
|
42435
|
+
if (!defaultKey) {
|
|
42436
|
+
return undefined;
|
|
42437
|
+
}
|
|
42438
|
+
const isZeroAlign = checkZeroAlign(col, row, 'top', layout);
|
|
42439
|
+
const data = layout.dataset.collectedValues[defaultKey + (isZeroAlign ? '_align' : '')]
|
|
42440
|
+
? layout.dataset.collectedValues[defaultKey + (isZeroAlign ? '_align' : '')]
|
|
42441
|
+
: layout.dataset.collectedValues[defaultKey];
|
|
42442
|
+
const index = layout.getRecordIndexByCol(col);
|
|
42443
|
+
const range = data[layout.getColKeysPath()[index][Math.max(0, layout.columnHeaderLevelCount - 1 - layout.topAxesCount)]];
|
|
42444
|
+
const axisOption = getAxisOption(col, row, 'top', layout);
|
|
42445
|
+
if (axisOption?.visible === false) {
|
|
42446
|
+
return;
|
|
42447
|
+
}
|
|
42448
|
+
return merge$2({
|
|
42449
|
+
range: range
|
|
42450
|
+
}, axisOption, {
|
|
42451
|
+
orient: 'top',
|
|
42452
|
+
type: 'linear',
|
|
42453
|
+
label: {
|
|
42454
|
+
flush: true
|
|
42455
|
+
}
|
|
42456
|
+
});
|
|
42457
|
+
}
|
|
42458
|
+
else if (row === layout.rowCount - layout.bottomFrozenRowCount &&
|
|
42459
|
+
col >= layout.rowHeaderLevelCount &&
|
|
42460
|
+
col < layout.colCount - layout.rightFrozenColCount) {
|
|
42461
|
+
const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, row);
|
|
42462
|
+
let defaultKey = indicatorKeys[0];
|
|
42463
|
+
if (isArray$3(defaultKey)) {
|
|
42464
|
+
defaultKey = defaultKey[0];
|
|
42465
|
+
}
|
|
42466
|
+
const isZeroAlign = checkZeroAlign(col, row, 'bottom', layout);
|
|
42467
|
+
const data = layout.dataset.collectedValues[defaultKey + (isZeroAlign ? '_align' : '')]
|
|
42468
|
+
? layout.dataset.collectedValues[defaultKey + (isZeroAlign ? '_align' : '')]
|
|
42469
|
+
: layout.dataset.collectedValues[defaultKey];
|
|
42470
|
+
const index = layout.getRecordIndexByCol(col);
|
|
42471
|
+
const range = data[layout.getColKeysPath()[index][Math.max(0, layout.columnHeaderLevelCount - 1 - layout.topAxesCount)]];
|
|
42472
|
+
let indicatorInfo = null;
|
|
42473
|
+
indicatorKeys.forEach(key => {
|
|
42474
|
+
const info = layout.getIndicatorInfo(key);
|
|
42475
|
+
if (info) {
|
|
42476
|
+
indicatorInfo = info;
|
|
42477
|
+
}
|
|
42478
|
+
});
|
|
42479
|
+
const axisOption = getAxisOption(col, row, 'bottom', layout);
|
|
42480
|
+
if (axisOption?.visible === false) {
|
|
42481
|
+
return;
|
|
42482
|
+
}
|
|
42483
|
+
return merge$2({
|
|
42484
|
+
title: {
|
|
42485
|
+
visible: true,
|
|
42486
|
+
text: indicatorInfo?.caption,
|
|
42487
|
+
autoRotate: true
|
|
42488
|
+
},
|
|
42489
|
+
range: range
|
|
42490
|
+
}, axisOption, {
|
|
42491
|
+
orient: 'bottom',
|
|
42492
|
+
type: 'linear',
|
|
42493
|
+
label: {
|
|
42494
|
+
flush: true
|
|
42495
|
+
}
|
|
42496
|
+
});
|
|
42497
|
+
}
|
|
42498
|
+
else if (col === layout.rowHeaderLevelCount - 1 &&
|
|
42499
|
+
row >= layout.columnHeaderLevelCount &&
|
|
42500
|
+
row < layout.rowCount - layout.bottomFrozenRowCount) {
|
|
42501
|
+
let rowDimensionKey = layout.getDimensionKeyInChartSpec(layout.rowHeaderLevelCount, row)[0];
|
|
42502
|
+
if (isArray$3(rowDimensionKey)) {
|
|
42503
|
+
rowDimensionKey = rowDimensionKey[0];
|
|
42504
|
+
}
|
|
42505
|
+
const data = layout.dataset.collectedValues[rowDimensionKey];
|
|
42506
|
+
const recordRow = layout.getRecordIndexByRow(row);
|
|
42507
|
+
const rowPath = layout.getRowKeysPath()[recordRow];
|
|
42508
|
+
const domain = data[rowPath[rowPath.length - 1]];
|
|
42509
|
+
const axisOption = getAxisOption(col, row, 'left', layout);
|
|
42510
|
+
if (axisOption?.visible === false) {
|
|
42511
|
+
return;
|
|
42512
|
+
}
|
|
42513
|
+
return merge$2({
|
|
42514
|
+
domain: Array.from(domain).reverse()
|
|
42515
|
+
}, axisOption, {
|
|
42516
|
+
orient: 'left',
|
|
42517
|
+
type: 'band'
|
|
42518
|
+
});
|
|
42519
|
+
}
|
|
42520
|
+
}
|
|
42521
|
+
else {
|
|
42522
|
+
if (col === layout.rowHeaderLevelCount - 1 &&
|
|
42523
|
+
row >= layout.columnHeaderLevelCount &&
|
|
42524
|
+
row < layout.rowCount - layout.bottomFrozenRowCount) {
|
|
42525
|
+
const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, row);
|
|
42526
|
+
let defaultKey = indicatorKeys[0];
|
|
42527
|
+
if (isArray$3(defaultKey)) {
|
|
42528
|
+
defaultKey = defaultKey[0];
|
|
42529
|
+
}
|
|
42530
|
+
const isZeroAlign = checkZeroAlign(col, row, 'left', layout);
|
|
42531
|
+
const data = layout.dataset.collectedValues[defaultKey + (isZeroAlign ? '_align' : '')]
|
|
42532
|
+
? layout.dataset.collectedValues[defaultKey + (isZeroAlign ? '_align' : '')]
|
|
42533
|
+
: layout.dataset.collectedValues[defaultKey];
|
|
42534
|
+
const index = layout.getRecordIndexByRow(row);
|
|
42535
|
+
const range = data[layout.getRowKeysPath()[index][Math.max(0, layout.rowHeaderLevelCount - 1 - layout.leftAxesCount)]];
|
|
42536
|
+
let indicatorInfo = null;
|
|
42537
|
+
indicatorKeys.forEach(key => {
|
|
42538
|
+
const info = layout.getIndicatorInfo(key);
|
|
42539
|
+
if (info) {
|
|
42540
|
+
indicatorInfo = info;
|
|
42541
|
+
}
|
|
42542
|
+
});
|
|
42543
|
+
const axisOption = getAxisOption(col, row, 'left', layout);
|
|
42544
|
+
if (axisOption?.visible === false) {
|
|
42545
|
+
return;
|
|
42546
|
+
}
|
|
42547
|
+
return merge$2({
|
|
42548
|
+
title: {
|
|
42549
|
+
visible: true,
|
|
42550
|
+
text: indicatorInfo?.caption,
|
|
42551
|
+
autoRotate: true
|
|
42552
|
+
},
|
|
42553
|
+
range: range
|
|
42554
|
+
}, axisOption, {
|
|
42555
|
+
orient: 'left',
|
|
42556
|
+
type: 'linear',
|
|
42557
|
+
label: {
|
|
42558
|
+
flush: true
|
|
42559
|
+
}
|
|
42560
|
+
});
|
|
42561
|
+
}
|
|
42562
|
+
else if (col === layout.colCount - layout.rightFrozenColCount &&
|
|
42563
|
+
row >= layout.columnHeaderLevelCount &&
|
|
42564
|
+
row < layout.rowCount - layout.bottomFrozenRowCount) {
|
|
42565
|
+
const indicatorKeys = layout.getIndicatorKeyInChartSpec(layout.rowHeaderLevelCount - 1, row);
|
|
42566
|
+
let defaultKey = indicatorKeys[1];
|
|
42567
|
+
if (isArray$3(defaultKey)) {
|
|
42568
|
+
defaultKey = defaultKey[0];
|
|
42569
|
+
}
|
|
42570
|
+
if (!defaultKey) {
|
|
42571
|
+
return undefined;
|
|
42572
|
+
}
|
|
42573
|
+
const isZeroAlign = checkZeroAlign(col, row, 'right', layout);
|
|
42574
|
+
const data = layout.dataset.collectedValues[defaultKey + (isZeroAlign ? '_align' : '')]
|
|
42575
|
+
? layout.dataset.collectedValues[defaultKey + (isZeroAlign ? '_align' : '')]
|
|
42576
|
+
: layout.dataset.collectedValues[defaultKey];
|
|
42577
|
+
const index = layout.getRecordIndexByRow(row);
|
|
42578
|
+
const range = data[layout.getRowKeysPath()[index][Math.max(0, layout.rowHeaderLevelCount - 1 - layout.leftAxesCount)]];
|
|
42579
|
+
const axisOption = getAxisOption(col, row, 'right', layout);
|
|
42580
|
+
if (axisOption?.visible === false) {
|
|
42581
|
+
return;
|
|
42582
|
+
}
|
|
42583
|
+
return merge$2({
|
|
42584
|
+
range: range
|
|
42585
|
+
}, axisOption, {
|
|
42586
|
+
orient: 'right',
|
|
42587
|
+
type: 'linear',
|
|
42588
|
+
label: {
|
|
42589
|
+
flush: true
|
|
42590
|
+
}
|
|
42591
|
+
});
|
|
42592
|
+
}
|
|
42593
|
+
else if (row === layout.rowCount - layout.bottomFrozenRowCount &&
|
|
42594
|
+
col >= layout.rowHeaderLevelCount &&
|
|
42595
|
+
col < layout.colCount - layout.rightFrozenColCount) {
|
|
42596
|
+
let columnDimensionKey = layout.getDimensionKeyInChartSpec(col, layout.columnHeaderLevelCount)[0];
|
|
42597
|
+
if (isArray$3(columnDimensionKey)) {
|
|
42598
|
+
columnDimensionKey = columnDimensionKey[0];
|
|
42599
|
+
}
|
|
42600
|
+
const data = layout.dataset.collectedValues[columnDimensionKey];
|
|
42601
|
+
const recordCol = layout.getRecordIndexByCol(col);
|
|
42602
|
+
const colPath = layout.getColKeysPath()[recordCol];
|
|
42603
|
+
const domain = data[colPath[colPath.length - 1]];
|
|
42604
|
+
const axisOption = getAxisOption(col, row, 'bottom', layout);
|
|
42605
|
+
if (axisOption?.visible === false) {
|
|
42606
|
+
return;
|
|
42607
|
+
}
|
|
42608
|
+
return merge$2({
|
|
42609
|
+
domain: Array.from(domain)
|
|
42610
|
+
}, axisOption, {
|
|
42611
|
+
orient: 'bottom',
|
|
42612
|
+
type: 'band'
|
|
42613
|
+
});
|
|
42614
|
+
}
|
|
42615
|
+
}
|
|
42616
|
+
return undefined;
|
|
42617
|
+
}
|
|
42618
|
+
function getAxisOption(col, row, orient, layout) {
|
|
42619
|
+
const spec = layout.getRawChartSpec(col, row);
|
|
42620
|
+
if (spec && isArray$3(spec.axes)) {
|
|
42621
|
+
const axisOption = spec.axes.find((axis) => {
|
|
42622
|
+
return axis.orient === orient;
|
|
42623
|
+
});
|
|
42624
|
+
if (axisOption) {
|
|
42625
|
+
return axisOption;
|
|
42626
|
+
}
|
|
42627
|
+
}
|
|
42628
|
+
const axisOption = layout._table.pivotChartAxes.find(axisOption => {
|
|
42629
|
+
return axisOption.orient === orient;
|
|
42630
|
+
});
|
|
42631
|
+
return axisOption;
|
|
42632
|
+
}
|
|
42633
|
+
function checkZeroAlign(col, row, orient, layout) {
|
|
42634
|
+
const orients = [];
|
|
42635
|
+
if (orient === 'left' || orient === 'right') {
|
|
42636
|
+
orients.push('left', 'right');
|
|
42637
|
+
}
|
|
42638
|
+
else if (orient === 'top' || orient === 'bottom') {
|
|
42639
|
+
orients.push('top', 'bottom');
|
|
42640
|
+
}
|
|
42641
|
+
const spec = layout.getRawChartSpec(col, row);
|
|
42642
|
+
let axesSpec;
|
|
42643
|
+
if (spec && isArray$3(spec.axes)) {
|
|
42644
|
+
axesSpec = spec.axes;
|
|
42645
|
+
}
|
|
42646
|
+
else {
|
|
42647
|
+
axesSpec = layout._table.pivotChartAxes;
|
|
42648
|
+
}
|
|
42649
|
+
if (isArray$3(axesSpec)) {
|
|
42650
|
+
const axes = [];
|
|
42651
|
+
axesSpec.forEach((axis) => {
|
|
42652
|
+
if (orients.includes(axis.orient)) {
|
|
42653
|
+
axes.push(axis);
|
|
42654
|
+
}
|
|
42655
|
+
});
|
|
42656
|
+
for (let i = 0; i < axes.length; i++) {
|
|
42657
|
+
const axis = axes[i];
|
|
42658
|
+
if (axis.sync &&
|
|
42659
|
+
axis.sync.zeroAlign &&
|
|
42660
|
+
axis.sync.axisId &&
|
|
42661
|
+
axes.find(axisSync => {
|
|
42662
|
+
return axisSync.id === axis.sync.axisId;
|
|
42663
|
+
})) {
|
|
42664
|
+
return true;
|
|
42665
|
+
}
|
|
42666
|
+
}
|
|
42667
|
+
}
|
|
42668
|
+
return false;
|
|
42669
|
+
}
|
|
42670
|
+
|
|
42671
|
+
function computeAxisConpomentWidth(config, table) {
|
|
42672
|
+
const attribute = merge$2({}, commonAxis, config);
|
|
42673
|
+
const tickWidth = attribute.tick.width ?? 4;
|
|
42674
|
+
let labelWidth = 0;
|
|
42675
|
+
if (attribute.label.visible) {
|
|
42676
|
+
if (attribute.type === 'band') {
|
|
42677
|
+
const domain = attribute.domain;
|
|
42678
|
+
domain.forEach((text) => {
|
|
42679
|
+
labelWidth = Math.max(labelWidth, table.measureText(text, {
|
|
42680
|
+
fontSize: attribute.label?.style?.fontSize,
|
|
42681
|
+
fontFamily: attribute.label?.style?.fontFamily
|
|
42682
|
+
}).width);
|
|
42683
|
+
});
|
|
42684
|
+
}
|
|
42685
|
+
else {
|
|
42686
|
+
const range = attribute.range;
|
|
42687
|
+
const minNumber = Math.abs(range.min) > 1 ? Math.round(range.min) : range.min;
|
|
42688
|
+
const maxNumber = Math.abs(range.max) > 1 ? Math.round(range.max) : range.max;
|
|
42689
|
+
const minString = formatDecimal(minNumber);
|
|
42690
|
+
const maxString = formatDecimal(maxNumber);
|
|
42691
|
+
[minString, maxString].forEach(text => {
|
|
42692
|
+
labelWidth = Math.max(labelWidth, table.measureText(text, {
|
|
42693
|
+
fontSize: attribute.label?.style?.fontSize,
|
|
42694
|
+
fontFamily: attribute.label?.style?.fontFamily
|
|
42695
|
+
}).width + 2);
|
|
42696
|
+
});
|
|
42697
|
+
}
|
|
42698
|
+
labelWidth += attribute.label.space ?? 4;
|
|
42699
|
+
}
|
|
42700
|
+
let titleWidth = 0;
|
|
42701
|
+
if (attribute.title.visible && attribute.title.text) {
|
|
42702
|
+
if (attribute.title.autoRotate) {
|
|
42703
|
+
titleWidth =
|
|
42704
|
+
table.measureText(attribute.title.text, {
|
|
42705
|
+
fontSize: attribute.title?.style?.fontSize,
|
|
42706
|
+
fontFamily: attribute.title?.style?.fontFamily
|
|
42707
|
+
}).height + 2;
|
|
42708
|
+
}
|
|
42709
|
+
else {
|
|
42710
|
+
titleWidth =
|
|
42711
|
+
table.measureText(attribute.title.text, {
|
|
42712
|
+
fontSize: attribute.title?.style?.fontSize,
|
|
42713
|
+
fontFamily: attribute.title?.style?.fontFamily
|
|
42714
|
+
}).width + 2;
|
|
42715
|
+
}
|
|
42716
|
+
titleWidth += attribute.title.space ?? 4;
|
|
42717
|
+
}
|
|
42718
|
+
return tickWidth + labelWidth + titleWidth;
|
|
42719
|
+
}
|
|
42720
|
+
function formatDecimal(number) {
|
|
42721
|
+
if (typeof number !== 'number') {
|
|
42722
|
+
number = Number(number);
|
|
42723
|
+
}
|
|
42724
|
+
return Number(number.toPrecision(1)).toString();
|
|
42725
|
+
}
|
|
42726
|
+
|
|
42406
42727
|
function computeColsWidth(table, colStart, colEnd, update) {
|
|
42407
42728
|
colStart = colStart ?? 0;
|
|
42408
42729
|
colEnd = colEnd ?? table.colCount - 1;
|
|
@@ -42489,13 +42810,19 @@
|
|
|
42489
42810
|
}
|
|
42490
42811
|
function computeColWidth(col, startRow, endRow, table, forceCompute) {
|
|
42491
42812
|
const { layoutMap, transpose } = table.internalProps;
|
|
42492
|
-
|
|
42813
|
+
let { width } = layoutMap?.getColumnWidthDefined(col) ?? {};
|
|
42493
42814
|
if (transpose) {
|
|
42494
42815
|
if (table.widthMode === 'standard') {
|
|
42495
42816
|
if (table.isRowHeader(col, 0) || table.isCornerHeader(col, 0)) {
|
|
42496
|
-
|
|
42817
|
+
const defaultWidth = Array.isArray(table.defaultHeaderColWidth)
|
|
42497
42818
|
? table.defaultHeaderColWidth[col] ?? table.defaultColWidth
|
|
42498
42819
|
: table.defaultHeaderColWidth;
|
|
42820
|
+
if (defaultWidth === 'auto') {
|
|
42821
|
+
width = 'auto';
|
|
42822
|
+
}
|
|
42823
|
+
else {
|
|
42824
|
+
return defaultWidth;
|
|
42825
|
+
}
|
|
42499
42826
|
}
|
|
42500
42827
|
if (width !== 'auto') {
|
|
42501
42828
|
if (typeof width === 'string') {
|
|
@@ -42526,7 +42853,10 @@
|
|
|
42526
42853
|
else if (width) {
|
|
42527
42854
|
return width;
|
|
42528
42855
|
}
|
|
42529
|
-
|
|
42856
|
+
const defaultWidth = table.getColWidthDefine(col);
|
|
42857
|
+
if (defaultWidth !== 'auto') {
|
|
42858
|
+
return table.getColWidth(col);
|
|
42859
|
+
}
|
|
42530
42860
|
}
|
|
42531
42861
|
return computeAutoColWidth(width, col, startRow, endRow, forceCompute, table);
|
|
42532
42862
|
}
|
|
@@ -42548,6 +42878,22 @@
|
|
|
42548
42878
|
}
|
|
42549
42879
|
}
|
|
42550
42880
|
for (let row = startRow; row <= endRow; row += deltaRow) {
|
|
42881
|
+
if (table.isPivotChart()) {
|
|
42882
|
+
const layout = table.internalProps.layoutMap;
|
|
42883
|
+
const axisConfig = getAxisConfigInPivotChart(col, row, layout);
|
|
42884
|
+
if (axisConfig) {
|
|
42885
|
+
const axisWidth = computeAxisConpomentWidth(axisConfig, table);
|
|
42886
|
+
if (typeof axisWidth === 'number') {
|
|
42887
|
+
maxWidth = Math.max(axisWidth, maxWidth);
|
|
42888
|
+
continue;
|
|
42889
|
+
}
|
|
42890
|
+
}
|
|
42891
|
+
else if (layout.isLeftBottomCorner(col, row) ||
|
|
42892
|
+
layout.isRightTopCorner(col, row) ||
|
|
42893
|
+
layout.isRightBottomCorner(col, row)) {
|
|
42894
|
+
continue;
|
|
42895
|
+
}
|
|
42896
|
+
}
|
|
42551
42897
|
const customWidth = computeCustomRenderWidth(col, row, table);
|
|
42552
42898
|
if (typeof customWidth === 'number') {
|
|
42553
42899
|
maxWidth = Math.max(customWidth, maxWidth);
|
|
@@ -42697,7 +43043,7 @@
|
|
|
42697
43043
|
});
|
|
42698
43044
|
function computeRowsHeight(table, rowStart, rowEnd) {
|
|
42699
43045
|
const time = typeof window !== 'undefined' ? window.performance.now() : 0;
|
|
42700
|
-
if (table.heightMode === 'autoHeight') {
|
|
43046
|
+
if (table.heightMode === 'autoHeight' || table.heightMode === 'adaptive') {
|
|
42701
43047
|
rowStart = rowStart ?? 0;
|
|
42702
43048
|
rowEnd = rowEnd ?? table.rowCount - 1;
|
|
42703
43049
|
if (rowStart === 0 && rowEnd === table.rowCount - 1) {
|
|
@@ -42738,7 +43084,7 @@
|
|
|
42738
43084
|
}
|
|
42739
43085
|
}
|
|
42740
43086
|
}
|
|
42741
|
-
|
|
43087
|
+
if (table.heightMode === 'adaptive') {
|
|
42742
43088
|
table._clearRowRangeHeightsMap();
|
|
42743
43089
|
const totalDrawHeight = table.tableNoFrameHeight - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight();
|
|
42744
43090
|
let actualHeight = 0;
|
|
@@ -42762,6 +43108,17 @@
|
|
|
42762
43108
|
}
|
|
42763
43109
|
function computeRowHeight(row, startCol, endCol, table) {
|
|
42764
43110
|
let maxHeight = 0;
|
|
43111
|
+
if (table.isPivotChart() && row >= table.columnHeaderLevelCount) {
|
|
43112
|
+
if (table.internalProps.layoutMap.indicatorsAsCol) {
|
|
43113
|
+
const optimunHeight = table.internalProps.layoutMap.getOptimunHeightForChart(row);
|
|
43114
|
+
if (optimunHeight > 0) {
|
|
43115
|
+
return optimunHeight;
|
|
43116
|
+
}
|
|
43117
|
+
}
|
|
43118
|
+
else {
|
|
43119
|
+
return table.getRowHeight(row);
|
|
43120
|
+
}
|
|
43121
|
+
}
|
|
42765
43122
|
for (let col = startCol; col <= endCol; col++) {
|
|
42766
43123
|
const customHeight = computeCustomRenderHeight(col, row, table);
|
|
42767
43124
|
if (typeof customHeight === 'number') {
|
|
@@ -42972,12 +43329,6 @@
|
|
|
42972
43329
|
dataId,
|
|
42973
43330
|
data: table.getCellValue(col, row),
|
|
42974
43331
|
cellPadding: padding,
|
|
42975
|
-
viewBox: {
|
|
42976
|
-
x1: Math.ceil(cellGroup.globalAABBBounds.x1 + padding[3] + table.scrollLeft),
|
|
42977
|
-
x2: Math.ceil(cellGroup.globalAABBBounds.x1 + width - padding[1] + table.scrollLeft),
|
|
42978
|
-
y1: Math.ceil(cellGroup.globalAABBBounds.y1 + padding[0] + table.scrollTop),
|
|
42979
|
-
y2: Math.ceil(cellGroup.globalAABBBounds.y1 + height - padding[2] + table.scrollTop)
|
|
42980
|
-
},
|
|
42981
43332
|
axes: table.internalProps.layoutMap.getChartAxes(col, row)
|
|
42982
43333
|
});
|
|
42983
43334
|
cellGroup.appendChild(chartGroup);
|
|
@@ -43810,7 +44161,7 @@
|
|
|
43810
44161
|
}
|
|
43811
44162
|
proxy.rowStart = direction === 'up' ? proxy.rowStart + count : proxy.rowStart - count;
|
|
43812
44163
|
proxy.rowEnd = direction === 'up' ? proxy.rowEnd + count : proxy.rowEnd - count;
|
|
43813
|
-
checkFirstRowMerge(
|
|
44164
|
+
checkFirstRowMerge(syncTopRow, proxy);
|
|
43814
44165
|
updateRowContent(syncTopRow, syncBottomRow, proxy);
|
|
43815
44166
|
if (proxy.table.heightMode === 'autoHeight') {
|
|
43816
44167
|
updateAutoRow(proxy.bodyLeftCol, proxy.bodyRightCol, syncTopRow, syncBottomRow, proxy.table, direction);
|
|
@@ -43846,7 +44197,7 @@
|
|
|
43846
44197
|
}
|
|
43847
44198
|
proxy.rowStart = distStartRow;
|
|
43848
44199
|
proxy.rowEnd = distEndRow;
|
|
43849
|
-
checkFirstRowMerge(
|
|
44200
|
+
checkFirstRowMerge(syncTopRow, proxy);
|
|
43850
44201
|
updateRowContent(syncTopRow, syncBottomRow, proxy);
|
|
43851
44202
|
console.log('updateAutoRow', distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up');
|
|
43852
44203
|
if (proxy.table.heightMode === 'autoHeight') {
|
|
@@ -43888,12 +44239,12 @@
|
|
|
43888
44239
|
function updateCellGroupPosition(colGroup, direction, proxy) {
|
|
43889
44240
|
if (direction === 'up') {
|
|
43890
44241
|
const cellGroup = colGroup.firstChild;
|
|
43891
|
-
proxy.updateCellGroupPosition(cellGroup, colGroup.lastChild.row + 1, colGroup.lastChild.attribute.y + colGroup.lastChild.
|
|
44242
|
+
proxy.updateCellGroupPosition(cellGroup, colGroup.lastChild.row + 1, colGroup.lastChild.attribute.y + proxy.table.getRowHeight(colGroup.lastChild.row));
|
|
43892
44243
|
colGroup.appendChild(cellGroup);
|
|
43893
44244
|
}
|
|
43894
44245
|
else {
|
|
43895
44246
|
const cellGroup = colGroup.lastChild;
|
|
43896
|
-
proxy.updateCellGroupPosition(cellGroup, colGroup.firstChild.row - 1, colGroup.firstChild.attribute.y - cellGroup.
|
|
44247
|
+
proxy.updateCellGroupPosition(cellGroup, colGroup.firstChild.row - 1, colGroup.firstChild.attribute.y - proxy.table.getRowHeight(cellGroup.row));
|
|
43897
44248
|
colGroup.insertBefore(cellGroup, colGroup.firstChild);
|
|
43898
44249
|
}
|
|
43899
44250
|
}
|
|
@@ -44005,6 +44356,10 @@
|
|
|
44005
44356
|
cellCache = new Map();
|
|
44006
44357
|
constructor(table) {
|
|
44007
44358
|
this.table = table;
|
|
44359
|
+
if (this.table.isPivotChart()) {
|
|
44360
|
+
this.rowLimit = 100;
|
|
44361
|
+
this.colLimit = 100;
|
|
44362
|
+
}
|
|
44008
44363
|
if (this.table.internalProps.transpose) {
|
|
44009
44364
|
this.mode = 'row';
|
|
44010
44365
|
}
|
|
@@ -44317,11 +44672,15 @@
|
|
|
44317
44672
|
return cellGroup;
|
|
44318
44673
|
}
|
|
44319
44674
|
const cellGroup = this.table.scenegraph.getCell(col, row, getShadow);
|
|
44320
|
-
cellGroup.
|
|
44675
|
+
if (cellGroup.col === col && cellGroup.row) {
|
|
44676
|
+
this.cellCache.set(col, cellGroup);
|
|
44677
|
+
}
|
|
44321
44678
|
return cellGroup;
|
|
44322
44679
|
}
|
|
44323
44680
|
const cellGroup = this.table.scenegraph.getCell(col, row, getShadow);
|
|
44324
|
-
cellGroup.
|
|
44681
|
+
if (cellGroup.col === col && cellGroup.row) {
|
|
44682
|
+
this.cellCache.set(col, cellGroup);
|
|
44683
|
+
}
|
|
44325
44684
|
return cellGroup;
|
|
44326
44685
|
}
|
|
44327
44686
|
}
|
|
@@ -44931,12 +45290,6 @@
|
|
|
44931
45290
|
node.cacheCanvas = null;
|
|
44932
45291
|
node.setAttribute('width', Math.ceil(width - node.attribute.cellPadding[3] - node.attribute.cellPadding[1]));
|
|
44933
45292
|
node.setAttribute('height', Math.ceil(height - node.attribute.cellPadding[0] - node.attribute.cellPadding[2]));
|
|
44934
|
-
node.setAttribute('viewBox', {
|
|
44935
|
-
x1: Math.ceil(cellNode.globalAABBBounds.x1 + node.attribute.cellPadding[3] + scenegraph.table.scrollLeft),
|
|
44936
|
-
x2: Math.ceil(cellNode.globalAABBBounds.x1 + width - node.attribute.cellPadding[1] + scenegraph.table.scrollLeft),
|
|
44937
|
-
y1: Math.ceil(cellNode.globalAABBBounds.y1 + node.attribute.cellPadding[0] + scenegraph.table.scrollTop),
|
|
44938
|
-
y2: Math.ceil(cellNode.globalAABBBounds.y1 + height - node.attribute.cellPadding[2] + scenegraph.table.scrollTop)
|
|
44939
|
-
});
|
|
44940
45293
|
}
|
|
44941
45294
|
});
|
|
44942
45295
|
});
|
|
@@ -45486,7 +45839,10 @@
|
|
|
45486
45839
|
}
|
|
45487
45840
|
if (cell && cell.role === 'shadow-cell' && !getShadow) {
|
|
45488
45841
|
const range = this.table.getCellRange(col, row);
|
|
45489
|
-
|
|
45842
|
+
if (range.start.col === col && range.start.row === row) ;
|
|
45843
|
+
else {
|
|
45844
|
+
cell = this.getCell(range.start.col, range.start.row);
|
|
45845
|
+
}
|
|
45490
45846
|
}
|
|
45491
45847
|
return cell || emptyGroup;
|
|
45492
45848
|
}
|
|
@@ -47240,10 +47596,17 @@
|
|
|
47240
47596
|
}
|
|
47241
47597
|
}
|
|
47242
47598
|
detaX = Math.ceil(detaX);
|
|
47243
|
-
this.table.scenegraph.updateColWidth(this.columnResize.col, detaX);
|
|
47244
47599
|
if (this.table.widthMode === 'adaptive' && this.columnResize.col < this.table.colCount - 1) {
|
|
47600
|
+
const rightColWidth = this.table.getColWidth(this.columnResize.col + 1);
|
|
47601
|
+
if (rightColWidth - detaX < 0) {
|
|
47602
|
+
detaX = rightColWidth;
|
|
47603
|
+
}
|
|
47604
|
+
this.table.scenegraph.updateColWidth(this.columnResize.col, detaX);
|
|
47245
47605
|
this.table.scenegraph.updateColWidth(this.columnResize.col + 1, -detaX);
|
|
47246
47606
|
}
|
|
47607
|
+
else {
|
|
47608
|
+
this.table.scenegraph.updateColWidth(this.columnResize.col, detaX);
|
|
47609
|
+
}
|
|
47247
47610
|
this.columnResize.x = xInTable;
|
|
47248
47611
|
this.table.scenegraph.component.updateResizeCol(this.columnResize.col, yInTable);
|
|
47249
47612
|
if (this.columnResize.col < this.table.frozenColCount &&
|
|
@@ -47577,7 +47940,7 @@
|
|
|
47577
47940
|
|
|
47578
47941
|
function bindMediaClick(table) {
|
|
47579
47942
|
if (Env.mode === 'browser') {
|
|
47580
|
-
table.
|
|
47943
|
+
table.on(TABLE_EVENT_TYPE.CLICK_CELL, (e) => {
|
|
47581
47944
|
const { col, row } = e;
|
|
47582
47945
|
let type;
|
|
47583
47946
|
if (table.internalProps.layoutMap.isHeader(col, row)) {
|
|
@@ -47680,7 +48043,7 @@
|
|
|
47680
48043
|
}
|
|
47681
48044
|
|
|
47682
48045
|
function bindDrillEvent(table) {
|
|
47683
|
-
table.
|
|
48046
|
+
table.on(TABLE_EVENT_TYPE.MOUSEENTER_CELL, (e) => {
|
|
47684
48047
|
const { col, row } = e;
|
|
47685
48048
|
if (col === -1 || row === -1) {
|
|
47686
48049
|
return;
|
|
@@ -47715,7 +48078,7 @@
|
|
|
47715
48078
|
if (!hasSparkLine) {
|
|
47716
48079
|
return;
|
|
47717
48080
|
}
|
|
47718
|
-
table.
|
|
48081
|
+
table.on(TABLE_EVENT_TYPE.MOUSEMOVE_CELL, (e) => {
|
|
47719
48082
|
const { col, row, x, y } = e;
|
|
47720
48083
|
const type = table.getBodyColumnType(col, row);
|
|
47721
48084
|
if (type !== 'sparkline') {
|
|
@@ -47723,7 +48086,7 @@
|
|
|
47723
48086
|
}
|
|
47724
48087
|
table.stateManeger.updateSparklineHoverPose(col, row, x, y);
|
|
47725
48088
|
});
|
|
47726
|
-
table.
|
|
48089
|
+
table.on(TABLE_EVENT_TYPE.MOUSELEAVE_TABLE, (e) => {
|
|
47727
48090
|
table.stateManeger.updateSparklineHoverPose(-1, -1, 0, 0);
|
|
47728
48091
|
});
|
|
47729
48092
|
}
|
|
@@ -47946,7 +48309,7 @@
|
|
|
47946
48309
|
const hitIcon = eventArgsSet?.eventArgs?.target?.role?.startsWith('icon')
|
|
47947
48310
|
? eventArgsSet.eventArgs.target
|
|
47948
48311
|
: undefined;
|
|
47949
|
-
if (!hitIcon) {
|
|
48312
|
+
if (!hitIcon || hitIcon.attribute.interactive === false) {
|
|
47950
48313
|
if (e.pointerType === 'touch') {
|
|
47951
48314
|
eventManeger.touchEnd = false;
|
|
47952
48315
|
eventManeger.touchSetTimeout = setTimeout(() => {
|
|
@@ -48152,6 +48515,7 @@
|
|
|
48152
48515
|
const cellsEvent = {
|
|
48153
48516
|
...cellInfo,
|
|
48154
48517
|
event: e.nativeEvent,
|
|
48518
|
+
federatedEvent: e,
|
|
48155
48519
|
cells: [],
|
|
48156
48520
|
targetIcon: icon
|
|
48157
48521
|
? {
|
|
@@ -48525,7 +48889,7 @@
|
|
|
48525
48889
|
if (!table.isPivotChart()) {
|
|
48526
48890
|
return;
|
|
48527
48891
|
}
|
|
48528
|
-
table.
|
|
48892
|
+
table.on(TABLE_EVENT_TYPE.MOUSEENTER_CELL, e => {
|
|
48529
48893
|
const cellGroup = table.scenegraph.getCell(e.col, e.row);
|
|
48530
48894
|
cellGroup.forEachChildren(child => {
|
|
48531
48895
|
if (child.name === 'axis') {
|
|
@@ -48535,7 +48899,7 @@
|
|
|
48535
48899
|
}
|
|
48536
48900
|
});
|
|
48537
48901
|
});
|
|
48538
|
-
table.
|
|
48902
|
+
table.on(TABLE_EVENT_TYPE.MOUSELEAVE_CELL, e => {
|
|
48539
48903
|
const cellGroup = table.scenegraph.getCell(e.col, e.row);
|
|
48540
48904
|
cellGroup.forEachChildren(child => {
|
|
48541
48905
|
if (child.name === 'axis') {
|
|
@@ -48607,7 +48971,7 @@
|
|
|
48607
48971
|
}
|
|
48608
48972
|
bindSelfEvent() {
|
|
48609
48973
|
const stateManeger = this.table.stateManeger;
|
|
48610
|
-
this.table.
|
|
48974
|
+
this.table.on(TABLE_EVENT_TYPE.ICON_CLICK, iconInfo => {
|
|
48611
48975
|
const { col, row, x, y, funcType, icon } = iconInfo;
|
|
48612
48976
|
if (funcType === IconFuncTypeEnum.dropDown) {
|
|
48613
48977
|
stateManeger.triggerDropDownMenu(col, row, x, y);
|
|
@@ -48625,18 +48989,22 @@
|
|
|
48625
48989
|
this.table.toggleHierarchyState(col, row);
|
|
48626
48990
|
}
|
|
48627
48991
|
});
|
|
48628
|
-
this.table.
|
|
48992
|
+
this.table.on(TABLE_EVENT_TYPE.DROPDOWNMENU_CLICK, () => {
|
|
48629
48993
|
stateManeger.hideMenu();
|
|
48630
48994
|
});
|
|
48631
48995
|
if (checkHaveTextStick(this.table)) {
|
|
48632
|
-
this.table.
|
|
48996
|
+
this.table.on(TABLE_EVENT_TYPE.SCROLL, e => {
|
|
48633
48997
|
handleTextStick(this.table);
|
|
48634
48998
|
});
|
|
48635
48999
|
}
|
|
48636
49000
|
bindMediaClick(this.table);
|
|
48637
|
-
this.table.
|
|
48638
|
-
if (
|
|
48639
|
-
|
|
49001
|
+
this.table.on(TABLE_EVENT_TYPE.DBLCLICK_CELL, (e) => {
|
|
49002
|
+
if (e.federatedEvent) {
|
|
49003
|
+
const eventArgsSet = getCellEventArgsSet(e.federatedEvent);
|
|
49004
|
+
const resizeCol = this.table.scenegraph.getResizeColAt(eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y, eventArgsSet.eventArgs?.targetCell);
|
|
49005
|
+
if (this.table._canResizeColumn(resizeCol.col, resizeCol.row) && resizeCol.col >= 0) {
|
|
49006
|
+
this.table.scenegraph.updateAutoColWidth(resizeCol.col);
|
|
49007
|
+
}
|
|
48640
49008
|
}
|
|
48641
49009
|
});
|
|
48642
49010
|
if (this.table.isPivotTable()) {
|
|
@@ -48709,7 +49077,7 @@
|
|
|
48709
49077
|
return false;
|
|
48710
49078
|
}
|
|
48711
49079
|
dealColumnResize(xInTable, yInTable) {
|
|
48712
|
-
this.table.stateManeger.updateResizeCol(xInTable,
|
|
49080
|
+
this.table.stateManeger.updateResizeCol(xInTable, yInTable);
|
|
48713
49081
|
}
|
|
48714
49082
|
chechColumnMover(eventArgsSet) {
|
|
48715
49083
|
const { eventArgs } = eventArgsSet;
|
|
@@ -49397,13 +49765,13 @@
|
|
|
49397
49765
|
get rootElement() {
|
|
49398
49766
|
return this._rootElement;
|
|
49399
49767
|
}
|
|
49400
|
-
|
|
49768
|
+
release() {
|
|
49401
49769
|
this.unbindFromCell();
|
|
49402
49770
|
const rootElement = this._rootElement;
|
|
49403
49771
|
if (rootElement?.parentElement) {
|
|
49404
49772
|
rootElement.parentElement.removeChild(rootElement);
|
|
49405
49773
|
}
|
|
49406
|
-
this._handler.
|
|
49774
|
+
this._handler.release();
|
|
49407
49775
|
delete this._rootElement;
|
|
49408
49776
|
}
|
|
49409
49777
|
bindToCell(table, col, row, menuInstanceInfo) {
|
|
@@ -49970,10 +50338,10 @@
|
|
|
49970
50338
|
constructor(table) {
|
|
49971
50339
|
this._table = table;
|
|
49972
50340
|
}
|
|
49973
|
-
|
|
50341
|
+
release() {
|
|
49974
50342
|
this.unbindTooltipElement();
|
|
49975
50343
|
if (this._tooltipElement) {
|
|
49976
|
-
this._tooltipElement.
|
|
50344
|
+
this._tooltipElement.release?.();
|
|
49977
50345
|
}
|
|
49978
50346
|
this._tooltipElement = undefined;
|
|
49979
50347
|
}
|
|
@@ -50125,13 +50493,13 @@
|
|
|
50125
50493
|
}
|
|
50126
50494
|
return false;
|
|
50127
50495
|
}
|
|
50128
|
-
|
|
50496
|
+
release() {
|
|
50129
50497
|
this.unbindFromCell();
|
|
50130
50498
|
const rootElement = this._rootElement;
|
|
50131
50499
|
if (rootElement?.parentElement) {
|
|
50132
50500
|
rootElement.parentElement.removeChild(rootElement);
|
|
50133
50501
|
}
|
|
50134
|
-
this._handler?.
|
|
50502
|
+
this._handler?.release?.();
|
|
50135
50503
|
delete this._rootElement;
|
|
50136
50504
|
delete this._messageElement;
|
|
50137
50505
|
}
|
|
@@ -50364,10 +50732,10 @@
|
|
|
50364
50732
|
this._bindTableEvent(table);
|
|
50365
50733
|
this.confine = confine;
|
|
50366
50734
|
}
|
|
50367
|
-
|
|
50735
|
+
release() {
|
|
50368
50736
|
const tooltipInstances = this._tooltipInstances;
|
|
50369
50737
|
for (const k in tooltipInstances) {
|
|
50370
|
-
tooltipInstances[k]?.
|
|
50738
|
+
tooltipInstances[k]?.release?.();
|
|
50371
50739
|
}
|
|
50372
50740
|
delete this._tooltipInstances;
|
|
50373
50741
|
this._attachInfo = null;
|
|
@@ -50423,7 +50791,7 @@
|
|
|
50423
50791
|
return cellInRange(info.range, col, row);
|
|
50424
50792
|
}
|
|
50425
50793
|
_bindTableEvent(table) {
|
|
50426
|
-
table.
|
|
50794
|
+
table.on(TABLE_EVENT_TYPE.MOUSEENTER_CELL, e => {
|
|
50427
50795
|
if (isMobile()) {
|
|
50428
50796
|
return;
|
|
50429
50797
|
}
|
|
@@ -50476,7 +50844,7 @@
|
|
|
50476
50844
|
}
|
|
50477
50845
|
}
|
|
50478
50846
|
});
|
|
50479
|
-
table.
|
|
50847
|
+
table.on(TABLE_EVENT_TYPE.MOUSEMOVE_CELL, e => {
|
|
50480
50848
|
if (isMobile()) {
|
|
50481
50849
|
return;
|
|
50482
50850
|
}
|
|
@@ -50497,7 +50865,7 @@
|
|
|
50497
50865
|
this._bindToCell(e.col, e.row);
|
|
50498
50866
|
}
|
|
50499
50867
|
});
|
|
50500
|
-
table.
|
|
50868
|
+
table.on(TABLE_EVENT_TYPE.MOUSELEAVE_CELL, e => {
|
|
50501
50869
|
if (e.related) {
|
|
50502
50870
|
if (this._isBindCell(e.related.col, e.related.row)) {
|
|
50503
50871
|
return;
|
|
@@ -50505,12 +50873,12 @@
|
|
|
50505
50873
|
}
|
|
50506
50874
|
this._unbindFromCell();
|
|
50507
50875
|
});
|
|
50508
|
-
table.
|
|
50876
|
+
table.on(TABLE_EVENT_TYPE.SELECTED_CELL, e => {
|
|
50509
50877
|
if (this._isBindCell(e.col, e.row)) {
|
|
50510
50878
|
this._unbindFromCell();
|
|
50511
50879
|
}
|
|
50512
50880
|
});
|
|
50513
|
-
table.
|
|
50881
|
+
table.on(TABLE_EVENT_TYPE.SCROLL, e => {
|
|
50514
50882
|
const info = this._attachInfo;
|
|
50515
50883
|
if (info?.tooltipOptions && info?.range?.start) {
|
|
50516
50884
|
const { col, row } = info.range.start;
|
|
@@ -50542,10 +50910,10 @@
|
|
|
50542
50910
|
constructor(table) {
|
|
50543
50911
|
this._table = table;
|
|
50544
50912
|
}
|
|
50545
|
-
|
|
50913
|
+
release() {
|
|
50546
50914
|
this.unbindMenuElement();
|
|
50547
50915
|
if (this._menuElement) {
|
|
50548
|
-
this._menuElement.
|
|
50916
|
+
this._menuElement.release();
|
|
50549
50917
|
}
|
|
50550
50918
|
this._menuElement = undefined;
|
|
50551
50919
|
}
|
|
@@ -50629,13 +50997,13 @@
|
|
|
50629
50997
|
get rootElement() {
|
|
50630
50998
|
return this._rootElement;
|
|
50631
50999
|
}
|
|
50632
|
-
|
|
51000
|
+
release() {
|
|
50633
51001
|
this.unbindFromCell();
|
|
50634
51002
|
const rootElement = this._rootElement;
|
|
50635
51003
|
if (rootElement?.parentElement) {
|
|
50636
51004
|
rootElement.parentElement.removeChild(rootElement);
|
|
50637
51005
|
}
|
|
50638
|
-
this._handler.
|
|
51006
|
+
this._handler.release();
|
|
50639
51007
|
delete this._rootElement;
|
|
50640
51008
|
}
|
|
50641
51009
|
bindToCell(table, col, row, menuInstanceInfo) {
|
|
@@ -50828,10 +51196,10 @@
|
|
|
50828
51196
|
this._menuInstances = {};
|
|
50829
51197
|
this._bindTableEvent(table);
|
|
50830
51198
|
}
|
|
50831
|
-
|
|
51199
|
+
release() {
|
|
50832
51200
|
const menuInstances = this._menuInstances;
|
|
50833
51201
|
for (const k in menuInstances) {
|
|
50834
|
-
menuInstances[k].
|
|
51202
|
+
menuInstances[k].release();
|
|
50835
51203
|
}
|
|
50836
51204
|
delete this._menuInstances;
|
|
50837
51205
|
this._attachInfo = null;
|
|
@@ -50878,7 +51246,7 @@
|
|
|
50878
51246
|
return instance.pointInMenuElement(x, y);
|
|
50879
51247
|
}
|
|
50880
51248
|
_bindTableEvent(table) {
|
|
50881
|
-
table.
|
|
51249
|
+
table.on(TABLE_EVENT_TYPE.DROPDOWN_ICON_CLICK, e => {
|
|
50882
51250
|
if (this._attachInfo) {
|
|
50883
51251
|
if (this._isBindToCell(e.col, e.row)) {
|
|
50884
51252
|
this._unbindFromCell();
|
|
@@ -50891,10 +51259,10 @@
|
|
|
50891
51259
|
this._bindToCell(e.col, e.row, 'dropdown-menu');
|
|
50892
51260
|
}
|
|
50893
51261
|
});
|
|
50894
|
-
table.
|
|
51262
|
+
table.on(TABLE_EVENT_TYPE.DROPDOWN_MENU_CLEAR, e => {
|
|
50895
51263
|
this._unbindFromCell();
|
|
50896
51264
|
});
|
|
50897
|
-
table.
|
|
51265
|
+
table.on(TABLE_EVENT_TYPE.CONTEXTMENU_CELL, e => {
|
|
50898
51266
|
if (table.internalProps.menu?.renderMode === 'html') {
|
|
50899
51267
|
const abstractPos = table._getMouseAbstractPoint(e.event, false);
|
|
50900
51268
|
let menu = null;
|
|
@@ -50966,7 +51334,7 @@
|
|
|
50966
51334
|
get input() {
|
|
50967
51335
|
return this._input;
|
|
50968
51336
|
}
|
|
50969
|
-
|
|
51337
|
+
release() {
|
|
50970
51338
|
}
|
|
50971
51339
|
}
|
|
50972
51340
|
|
|
@@ -51166,11 +51534,11 @@
|
|
|
51166
51534
|
});
|
|
51167
51535
|
if (this.orient === 'left') {
|
|
51168
51536
|
this.table.tableNoFrameWidth = this.table.tableNoFrameWidth - Math.ceil(width);
|
|
51169
|
-
this.table.tableX
|
|
51537
|
+
this.table.tableX += Math.ceil(width);
|
|
51170
51538
|
}
|
|
51171
51539
|
else if (this.orient === 'top') {
|
|
51172
51540
|
this.table.tableNoFrameHeight = this.table.tableNoFrameHeight - Math.ceil(height);
|
|
51173
|
-
this.table.tableY
|
|
51541
|
+
this.table.tableY += Math.ceil(height);
|
|
51174
51542
|
}
|
|
51175
51543
|
else if (this.orient === 'right') {
|
|
51176
51544
|
this.table.tableNoFrameWidth = this.table.tableNoFrameWidth - Math.ceil(width);
|
|
@@ -51220,7 +51588,8 @@
|
|
|
51220
51588
|
height: height
|
|
51221
51589
|
};
|
|
51222
51590
|
}
|
|
51223
|
-
|
|
51591
|
+
release() {
|
|
51592
|
+
this.table.scenegraph.stage.defaultLayer.removeChild(this.legendComponent);
|
|
51224
51593
|
this.legendComponent = null;
|
|
51225
51594
|
}
|
|
51226
51595
|
}
|
|
@@ -51267,11 +51636,11 @@
|
|
|
51267
51636
|
}
|
|
51268
51637
|
if (this._titleOption.orient === 'left') {
|
|
51269
51638
|
this.table.tableNoFrameWidth = this.table.tableNoFrameWidth - Math.ceil(width);
|
|
51270
|
-
this.table.tableX
|
|
51639
|
+
this.table.tableX += Math.ceil(width);
|
|
51271
51640
|
}
|
|
51272
51641
|
else if (this._titleOption.orient === 'top') {
|
|
51273
51642
|
this.table.tableNoFrameHeight = this.table.tableNoFrameHeight - Math.ceil(height);
|
|
51274
|
-
this.table.tableY
|
|
51643
|
+
this.table.tableY += Math.ceil(height);
|
|
51275
51644
|
}
|
|
51276
51645
|
else if (this._titleOption.orient === 'right') {
|
|
51277
51646
|
this.table.tableNoFrameWidth = this.table.tableNoFrameWidth - Math.ceil(width);
|
|
@@ -51292,7 +51661,8 @@
|
|
|
51292
51661
|
}
|
|
51293
51662
|
return this._titleComponent;
|
|
51294
51663
|
}
|
|
51295
|
-
|
|
51664
|
+
release() {
|
|
51665
|
+
this.table.scenegraph.stage.defaultLayer.removeChild(this._titleComponent);
|
|
51296
51666
|
this._titleComponent = null;
|
|
51297
51667
|
}
|
|
51298
51668
|
_getTitleAttrs() {
|
|
@@ -51360,7 +51730,7 @@
|
|
|
51360
51730
|
return TABLE_EVENT_TYPE;
|
|
51361
51731
|
}
|
|
51362
51732
|
options;
|
|
51363
|
-
version = "0.9.3-alpha.
|
|
51733
|
+
version = "0.9.3-alpha.5";
|
|
51364
51734
|
pagerConf;
|
|
51365
51735
|
id = `VTable${Date.now()}`;
|
|
51366
51736
|
headerStyleCache;
|
|
@@ -51479,7 +51849,7 @@
|
|
|
51479
51849
|
this.headerStyleCache = new Map();
|
|
51480
51850
|
this.bodyStyleCache = new Map();
|
|
51481
51851
|
}
|
|
51482
|
-
throttleInvalidate = throttle2(this.
|
|
51852
|
+
throttleInvalidate = throttle2(this.render.bind(this), 200);
|
|
51483
51853
|
getParentElement() {
|
|
51484
51854
|
return this.options.parentElement;
|
|
51485
51855
|
}
|
|
@@ -51647,78 +52017,11 @@
|
|
|
51647
52017
|
}
|
|
51648
52018
|
}
|
|
51649
52019
|
_colWidthDefineToPxWidth(width) {
|
|
51650
|
-
if (
|
|
51651
|
-
return
|
|
52020
|
+
if (width === 'auto') {
|
|
52021
|
+
return 0;
|
|
51652
52022
|
}
|
|
51653
52023
|
return _toPxWidth(this, width);
|
|
51654
52024
|
}
|
|
51655
|
-
_calculateAutoColWidthExpr() {
|
|
51656
|
-
const fullWidth = this.internalProps.calcWidthContext.full;
|
|
51657
|
-
let sumMin = 0;
|
|
51658
|
-
const others = [];
|
|
51659
|
-
let autoCount = 0;
|
|
51660
|
-
const hasLimitsOnAuto = [];
|
|
51661
|
-
for (let col = 0; col < this.internalProps.colCount; col++) {
|
|
51662
|
-
const def = this.getColWidthDefine(col);
|
|
51663
|
-
const limits = this._getColWidthLimits(col);
|
|
51664
|
-
if (isAutoDefine(def)) {
|
|
51665
|
-
if (limits) {
|
|
51666
|
-
hasLimitsOnAuto.push(limits);
|
|
51667
|
-
if (limits.min) {
|
|
51668
|
-
sumMin += limits.min;
|
|
51669
|
-
}
|
|
51670
|
-
}
|
|
51671
|
-
autoCount++;
|
|
51672
|
-
}
|
|
51673
|
-
else {
|
|
51674
|
-
let expr = def;
|
|
51675
|
-
if (limits) {
|
|
51676
|
-
const orgWidth = _toPxWidth(this, expr);
|
|
51677
|
-
const newWidth = _applyColWidthLimits(limits, orgWidth);
|
|
51678
|
-
if (orgWidth !== newWidth) {
|
|
51679
|
-
expr = `${newWidth}px`;
|
|
51680
|
-
}
|
|
51681
|
-
sumMin += newWidth;
|
|
51682
|
-
}
|
|
51683
|
-
others.push(expr);
|
|
51684
|
-
}
|
|
51685
|
-
if (sumMin > fullWidth) {
|
|
51686
|
-
return '0px';
|
|
51687
|
-
}
|
|
51688
|
-
}
|
|
51689
|
-
if (hasLimitsOnAuto.length && others.length) {
|
|
51690
|
-
const autoPx = (fullWidth - _toPxWidth(this, `calc(${others.map(c => (typeof c === 'number' ? `${c}px` : c)).join(' + ')})`)) /
|
|
51691
|
-
autoCount;
|
|
51692
|
-
hasLimitsOnAuto.forEach(limits => {
|
|
51693
|
-
if (limits.min && autoPx < limits.min) {
|
|
51694
|
-
others.push(limits.minDef);
|
|
51695
|
-
autoCount--;
|
|
51696
|
-
}
|
|
51697
|
-
else if (limits.max && limits.max < autoPx) {
|
|
51698
|
-
others.push(limits.maxDef);
|
|
51699
|
-
autoCount--;
|
|
51700
|
-
}
|
|
51701
|
-
});
|
|
51702
|
-
if (autoCount <= 0) {
|
|
51703
|
-
return `${autoPx}px`;
|
|
51704
|
-
}
|
|
51705
|
-
}
|
|
51706
|
-
if (others.length) {
|
|
51707
|
-
const strDefs = [];
|
|
51708
|
-
let num = 0;
|
|
51709
|
-
others.forEach(c => {
|
|
51710
|
-
if (typeof c === 'number') {
|
|
51711
|
-
num += c;
|
|
51712
|
-
}
|
|
51713
|
-
else {
|
|
51714
|
-
strDefs.push(c);
|
|
51715
|
-
}
|
|
51716
|
-
});
|
|
51717
|
-
strDefs.push(`${num}px`);
|
|
51718
|
-
return `calc((100% - (${strDefs.join(' + ')})) / ${autoCount})`;
|
|
51719
|
-
}
|
|
51720
|
-
return `${100 / autoCount}%`;
|
|
51721
|
-
}
|
|
51722
52025
|
_getColWidthLimits(col) {
|
|
51723
52026
|
const limit = this.colWidthsLimit[col];
|
|
51724
52027
|
if (!limit) {
|
|
@@ -51808,12 +52111,7 @@
|
|
|
51808
52111
|
: this._adjustColWidth(endCol, this._colWidthDefineToPxWidth(width));
|
|
51809
52112
|
}
|
|
51810
52113
|
else {
|
|
51811
|
-
adjustW =
|
|
51812
|
-
this.isRowHeader(endCol, 0) || this.isCornerHeader(endCol, 0)
|
|
51813
|
-
? Array.isArray(this.defaultHeaderColWidth)
|
|
51814
|
-
? this.defaultHeaderColWidth[endCol] ?? this.internalProps.defaultColWidth
|
|
51815
|
-
: this.defaultHeaderColWidth
|
|
51816
|
-
: this.internalProps.defaultColWidth;
|
|
52114
|
+
adjustW = this.getColWidth(endCol);
|
|
51817
52115
|
}
|
|
51818
52116
|
const addWidth = cachedLowerColWidth + adjustW;
|
|
51819
52117
|
if (startCol >= 0 && endCol >= 0 && !Number.isNaN(addWidth)) {
|
|
@@ -51823,23 +52121,13 @@
|
|
|
51823
52121
|
}
|
|
51824
52122
|
let w = 0;
|
|
51825
52123
|
for (let col = startCol; col <= endCol; col++) {
|
|
51826
|
-
w +=
|
|
51827
|
-
this.isRowHeader(col, 0) || this.isCornerHeader(col, 0)
|
|
51828
|
-
? Array.isArray(this.defaultHeaderColWidth)
|
|
51829
|
-
? this.defaultHeaderColWidth[col] ?? this.internalProps.defaultColWidth
|
|
51830
|
-
: this.defaultHeaderColWidth
|
|
51831
|
-
: this.internalProps.defaultColWidth;
|
|
52124
|
+
w += this.getColWidth(col);
|
|
51832
52125
|
}
|
|
51833
52126
|
this.colWidthsMap.each(startCol, endCol, (width, col) => {
|
|
51834
52127
|
w +=
|
|
51835
52128
|
(this.widthMode === 'adaptive' || this.transpose
|
|
51836
52129
|
? Number(width)
|
|
51837
|
-
: this._adjustColWidth(col, this._colWidthDefineToPxWidth(width))) -
|
|
51838
|
-
(this.isRowHeader(col, 0) || this.isCornerHeader(col, 0)
|
|
51839
|
-
? Array.isArray(this.defaultHeaderColWidth)
|
|
51840
|
-
? this.defaultHeaderColWidth[col] ?? this.internalProps.defaultColWidth
|
|
51841
|
-
: this.defaultHeaderColWidth
|
|
51842
|
-
: this.internalProps.defaultColWidth);
|
|
52130
|
+
: this._adjustColWidth(col, this._colWidthDefineToPxWidth(width))) - this.getColWidth(col);
|
|
51843
52131
|
});
|
|
51844
52132
|
for (let col = startCol; col <= endCol; col++) {
|
|
51845
52133
|
if (this.colWidthsMap.has(col)) {
|
|
@@ -52251,7 +52539,7 @@
|
|
|
52251
52539
|
}
|
|
52252
52540
|
}
|
|
52253
52541
|
}
|
|
52254
|
-
|
|
52542
|
+
render() {
|
|
52255
52543
|
this.scenegraph.renderSceneGraph();
|
|
52256
52544
|
}
|
|
52257
52545
|
_toRelativeRect(absoluteRect) {
|
|
@@ -52340,24 +52628,27 @@
|
|
|
52340
52628
|
getCellOverflowText(col, row) {
|
|
52341
52629
|
return this.scenegraph.getCellOverflowText(col, row);
|
|
52342
52630
|
}
|
|
52343
|
-
|
|
52344
|
-
if (!
|
|
52345
|
-
throw new Error('not
|
|
52631
|
+
addReleaseObj(releaseObj) {
|
|
52632
|
+
if (!releaseObj || !releaseObj.release || typeof releaseObj.release !== 'function') {
|
|
52633
|
+
throw new Error('not releaseObj!');
|
|
52346
52634
|
}
|
|
52347
|
-
const
|
|
52348
|
-
|
|
52635
|
+
const releaseList = (this.internalProps.releaseList = this.internalProps.releaseList || []);
|
|
52636
|
+
releaseList.push(releaseObj);
|
|
52349
52637
|
}
|
|
52350
52638
|
dispose() {
|
|
52639
|
+
this.release();
|
|
52640
|
+
}
|
|
52641
|
+
release() {
|
|
52351
52642
|
const internalProps = this.internalProps;
|
|
52352
|
-
internalProps.tooltipHandler?.
|
|
52353
|
-
internalProps.menuHandler?.
|
|
52643
|
+
internalProps.tooltipHandler?.release?.();
|
|
52644
|
+
internalProps.menuHandler?.release?.();
|
|
52354
52645
|
IconCache.clearAll();
|
|
52355
|
-
super.
|
|
52356
|
-
internalProps.handler?.
|
|
52357
|
-
internalProps.focusControl?.
|
|
52358
|
-
if (internalProps.
|
|
52359
|
-
internalProps.
|
|
52360
|
-
internalProps.
|
|
52646
|
+
super.release?.();
|
|
52647
|
+
internalProps.handler?.release?.();
|
|
52648
|
+
internalProps.focusControl?.release?.();
|
|
52649
|
+
if (internalProps.releaseList) {
|
|
52650
|
+
internalProps.releaseList.forEach(releaseObj => releaseObj?.release?.());
|
|
52651
|
+
internalProps.releaseList = null;
|
|
52361
52652
|
}
|
|
52362
52653
|
this.scenegraph.stage.release();
|
|
52363
52654
|
const { parentElement } = internalProps.element;
|
|
@@ -52420,8 +52711,12 @@
|
|
|
52420
52711
|
internalProps.allowFrozenColCount = options.allowFrozenColCount ?? internalProps.colCount;
|
|
52421
52712
|
internalProps.limitMaxAutoWidth = options.limitMaxAutoWidth ?? 450;
|
|
52422
52713
|
this.dataSet = new DataSet();
|
|
52714
|
+
internalProps.legends?.release();
|
|
52715
|
+
internalProps.title?.release();
|
|
52716
|
+
internalProps.layoutMap.release();
|
|
52423
52717
|
this.scenegraph.clearCells();
|
|
52424
52718
|
this.stateManeger.initState();
|
|
52719
|
+
this._updateSize();
|
|
52425
52720
|
if (options.legends) {
|
|
52426
52721
|
internalProps.legends = new TableLegend(options.legends, this);
|
|
52427
52722
|
this.scenegraph.tableGroup.setAttributes({
|
|
@@ -52662,7 +52957,7 @@
|
|
|
52662
52957
|
this.dataSource.updatePager(this.pagerConf);
|
|
52663
52958
|
this.refreshRowColCount();
|
|
52664
52959
|
this.scenegraph.createSceneGraph();
|
|
52665
|
-
this.
|
|
52960
|
+
this.render();
|
|
52666
52961
|
}
|
|
52667
52962
|
}
|
|
52668
52963
|
get allowFrozenColCount() {
|
|
@@ -52675,7 +52970,7 @@
|
|
|
52675
52970
|
return this.internalProps.layoutMap.columnHeaderLevelCount;
|
|
52676
52971
|
}
|
|
52677
52972
|
get records() {
|
|
52678
|
-
return this.internalProps.records
|
|
52973
|
+
return this.internalProps.records;
|
|
52679
52974
|
}
|
|
52680
52975
|
get dataSource() {
|
|
52681
52976
|
return this.internalProps.dataSource;
|
|
@@ -52685,7 +52980,7 @@
|
|
|
52685
52980
|
_setDataSource(this, dataSource);
|
|
52686
52981
|
this.refreshRowColCount();
|
|
52687
52982
|
this.scenegraph.createSceneGraph();
|
|
52688
|
-
this.
|
|
52983
|
+
this.render();
|
|
52689
52984
|
}
|
|
52690
52985
|
get autoWrapText() {
|
|
52691
52986
|
return this.internalProps.autoWrapText;
|
|
@@ -52698,7 +52993,7 @@
|
|
|
52698
52993
|
this.options.autoWrapText = autoWrapText;
|
|
52699
52994
|
if (this.internalProps.layoutMap) {
|
|
52700
52995
|
this.refreshHeader();
|
|
52701
|
-
this.
|
|
52996
|
+
this.render();
|
|
52702
52997
|
}
|
|
52703
52998
|
}
|
|
52704
52999
|
get theme() {
|
|
@@ -52848,7 +53143,7 @@
|
|
|
52848
53143
|
_setRecords(this, records);
|
|
52849
53144
|
}
|
|
52850
53145
|
this.scenegraph.createSceneGraph();
|
|
52851
|
-
this.
|
|
53146
|
+
this.render();
|
|
52852
53147
|
console.log('setRecords cost time:', (typeof window !== 'undefined' ? window.performance.now() : 0) - time);
|
|
52853
53148
|
}
|
|
52854
53149
|
setRecord(record, col, row) {
|
|
@@ -53162,7 +53457,7 @@
|
|
|
53162
53457
|
const top = this.getRowsHeight(0, cellAddr.row - 1);
|
|
53163
53458
|
this.scrollTop = Math.min(top - frozenHeight, this.getAllRowsHeight() - drawRange.height);
|
|
53164
53459
|
}
|
|
53165
|
-
this.
|
|
53460
|
+
this.render();
|
|
53166
53461
|
}
|
|
53167
53462
|
getCopyValue() {
|
|
53168
53463
|
const ranges = this.stateManeger.select.ranges;
|
|
@@ -53368,6 +53663,12 @@
|
|
|
53368
53663
|
return false;
|
|
53369
53664
|
});
|
|
53370
53665
|
}
|
|
53666
|
+
_getActiveChartInstance() {
|
|
53667
|
+
const cellGroup = this.scenegraph.getCell(this.stateManeger.hover?.cellPos?.col, this.stateManeger.hover?.cellPos?.row);
|
|
53668
|
+
return cellGroup?.getChildren()?.[0]?.type === 'chart'
|
|
53669
|
+
? cellGroup.getChildren()[0].activeChartInstance
|
|
53670
|
+
: null;
|
|
53671
|
+
}
|
|
53371
53672
|
}
|
|
53372
53673
|
|
|
53373
53674
|
var core = /*#__PURE__*/Object.freeze({
|
|
@@ -53535,20 +53836,25 @@
|
|
|
53535
53836
|
if (isArray$3(key)) {
|
|
53536
53837
|
key = key[0];
|
|
53537
53838
|
}
|
|
53538
|
-
const
|
|
53539
|
-
|
|
53839
|
+
const isZeroAlign = checkZeroAlign(col, row, index === 0 ? 'bottom' : 'top', layout);
|
|
53840
|
+
const data = layout.dataset.collectedValues[key + (isZeroAlign ? '_align' : '')]
|
|
53841
|
+
? layout.dataset.collectedValues[key + (isZeroAlign ? '_align' : '')]
|
|
53540
53842
|
: layout.dataset.collectedValues[key];
|
|
53541
53843
|
const range = data[layout.getColKeysPath()[colIndex][Math.max(0, layout.columnHeaderLevelCount - 1 - layout.topAxesCount)]];
|
|
53542
|
-
const axisOption =
|
|
53543
|
-
|
|
53544
|
-
|
|
53545
|
-
|
|
53844
|
+
const axisOption = getAxisOption(col, row, index === 0 ? 'bottom' : 'top', layout);
|
|
53845
|
+
if (axisOption?.zero) {
|
|
53846
|
+
range.min = Math.min(range.min, 0);
|
|
53847
|
+
range.max = Math.max(range.max, 0);
|
|
53848
|
+
}
|
|
53849
|
+
axes.push(merge$2({
|
|
53850
|
+
range
|
|
53851
|
+
}, axisOption, {
|
|
53546
53852
|
type: 'linear',
|
|
53547
53853
|
orient: index === 0 ? 'bottom' : 'top',
|
|
53548
53854
|
label: { visible: false },
|
|
53549
53855
|
title: { visible: false },
|
|
53550
|
-
|
|
53551
|
-
|
|
53856
|
+
seriesIndex: index,
|
|
53857
|
+
height: -1
|
|
53552
53858
|
}));
|
|
53553
53859
|
});
|
|
53554
53860
|
let rowDimensionKey = layout.getDimensionKeyInChartSpec(layout.rowHeaderLevelCount, col)[0];
|
|
@@ -53559,10 +53865,10 @@
|
|
|
53559
53865
|
const recordRow = layout.getRecordIndexByRow(row);
|
|
53560
53866
|
const rowPath = layout.getRowKeysPath()[recordRow];
|
|
53561
53867
|
const domain = data[rowPath[rowPath.length - 1]];
|
|
53562
|
-
const axisOption =
|
|
53563
|
-
|
|
53564
|
-
|
|
53565
|
-
|
|
53868
|
+
const axisOption = getAxisOption(col, row, 'left', layout);
|
|
53869
|
+
axes.push(merge$2({
|
|
53870
|
+
domain: Array.from(domain)
|
|
53871
|
+
}, axisOption, {
|
|
53566
53872
|
type: 'band',
|
|
53567
53873
|
orient: 'left',
|
|
53568
53874
|
label: { visible: false, space: 0 },
|
|
@@ -53570,8 +53876,7 @@
|
|
|
53570
53876
|
tick: { visible: false },
|
|
53571
53877
|
subTick: { visible: false },
|
|
53572
53878
|
title: { visible: false },
|
|
53573
|
-
width: -1
|
|
53574
|
-
domain: Array.from(domain)
|
|
53879
|
+
width: -1
|
|
53575
53880
|
}));
|
|
53576
53881
|
}
|
|
53577
53882
|
else {
|
|
@@ -53581,20 +53886,25 @@
|
|
|
53581
53886
|
if (isArray$3(key)) {
|
|
53582
53887
|
key = key[0];
|
|
53583
53888
|
}
|
|
53584
|
-
const
|
|
53585
|
-
|
|
53889
|
+
const isZeroAlign = checkZeroAlign(col, row, index === 0 ? 'left' : 'right', layout);
|
|
53890
|
+
const data = layout.dataset.collectedValues[key + (isZeroAlign ? '_align' : '')]
|
|
53891
|
+
? layout.dataset.collectedValues[key + (isZeroAlign ? '_align' : '')]
|
|
53586
53892
|
: layout.dataset.collectedValues[key];
|
|
53587
53893
|
const range = data[layout.getRowKeysPath()[rowIndex][Math.max(0, layout.rowHeaderLevelCount - 1 - layout.leftAxesCount)]];
|
|
53588
|
-
const axisOption =
|
|
53589
|
-
|
|
53590
|
-
|
|
53591
|
-
|
|
53894
|
+
const axisOption = getAxisOption(col, row, index === 0 ? 'left' : 'right', layout);
|
|
53895
|
+
if (axisOption?.zero) {
|
|
53896
|
+
range.min = Math.min(range.min, 0);
|
|
53897
|
+
range.max = Math.max(range.max, 0);
|
|
53898
|
+
}
|
|
53899
|
+
axes.push(merge$2({
|
|
53900
|
+
range
|
|
53901
|
+
}, axisOption, {
|
|
53592
53902
|
type: 'linear',
|
|
53593
53903
|
orient: index === 0 ? 'left' : 'right',
|
|
53594
53904
|
label: { visible: false },
|
|
53595
53905
|
title: { visible: false },
|
|
53596
|
-
|
|
53597
|
-
|
|
53906
|
+
seriesIndex: index,
|
|
53907
|
+
width: -1
|
|
53598
53908
|
}));
|
|
53599
53909
|
});
|
|
53600
53910
|
let columnDimensionKey = layout.getDimensionKeyInChartSpec(col, layout.columnHeaderLevelCount)[0];
|
|
@@ -53605,10 +53915,10 @@
|
|
|
53605
53915
|
const recordCol = layout.getRecordIndexByCol(col);
|
|
53606
53916
|
const colPath = layout.getColKeysPath()[recordCol];
|
|
53607
53917
|
const domain = data[colPath[colPath.length - 1]];
|
|
53608
|
-
const axisOption =
|
|
53609
|
-
|
|
53610
|
-
|
|
53611
|
-
|
|
53918
|
+
const axisOption = getAxisOption(col, row, 'bottom', layout);
|
|
53919
|
+
axes.push(merge$2({
|
|
53920
|
+
domain: Array.from(domain)
|
|
53921
|
+
}, axisOption, {
|
|
53612
53922
|
type: 'band',
|
|
53613
53923
|
orient: 'bottom',
|
|
53614
53924
|
visible: true,
|
|
@@ -53617,8 +53927,7 @@
|
|
|
53617
53927
|
tick: { visible: false },
|
|
53618
53928
|
subTick: { visible: false },
|
|
53619
53929
|
title: { visible: false },
|
|
53620
|
-
height: -1
|
|
53621
|
-
domain: Array.from(domain)
|
|
53930
|
+
height: -1
|
|
53622
53931
|
}));
|
|
53623
53932
|
}
|
|
53624
53933
|
return axes;
|
|
@@ -53726,6 +54035,24 @@
|
|
|
53726
54035
|
}
|
|
53727
54036
|
return false;
|
|
53728
54037
|
}
|
|
54038
|
+
isLeftBottomCorner(col, row) {
|
|
54039
|
+
if (col < this.rowHeaderLevelCount && row >= this.rowCount - this.bottomFrozenRowCount) {
|
|
54040
|
+
return true;
|
|
54041
|
+
}
|
|
54042
|
+
return false;
|
|
54043
|
+
}
|
|
54044
|
+
isRightTopCorner(col, row) {
|
|
54045
|
+
if (col >= this.colCount - this.rightFrozenColCount && row < this.columnHeaderLevelCount) {
|
|
54046
|
+
return true;
|
|
54047
|
+
}
|
|
54048
|
+
return false;
|
|
54049
|
+
}
|
|
54050
|
+
isRightBottomCorner(col, row) {
|
|
54051
|
+
if (col >= this.colCount - this.rightFrozenColCount && row >= this.rowCount - this.bottomFrozenRowCount) {
|
|
54052
|
+
return true;
|
|
54053
|
+
}
|
|
54054
|
+
return false;
|
|
54055
|
+
}
|
|
53729
54056
|
isCornerHeader(col, row) {
|
|
53730
54057
|
return false;
|
|
53731
54058
|
}
|
|
@@ -54277,6 +54604,13 @@
|
|
|
54277
54604
|
getChartDataId(col, row) {
|
|
54278
54605
|
return getChartDataId(col, row, this);
|
|
54279
54606
|
}
|
|
54607
|
+
release() {
|
|
54608
|
+
const activeChartInstance = this._table._getActiveChartInstance();
|
|
54609
|
+
activeChartInstance?.release();
|
|
54610
|
+
this.columnObjects.forEach(indicatorObject => {
|
|
54611
|
+
indicatorObject.chartInstance?.release();
|
|
54612
|
+
});
|
|
54613
|
+
}
|
|
54280
54614
|
}
|
|
54281
54615
|
|
|
54282
54616
|
class ListTable extends BaseTable {
|
|
@@ -54327,7 +54661,7 @@
|
|
|
54327
54661
|
this.options.columns = columns;
|
|
54328
54662
|
this.refreshHeader();
|
|
54329
54663
|
setTimeout(() => {
|
|
54330
|
-
this.
|
|
54664
|
+
this.render();
|
|
54331
54665
|
}, 0);
|
|
54332
54666
|
}
|
|
54333
54667
|
get header() {
|
|
@@ -54338,7 +54672,7 @@
|
|
|
54338
54672
|
this.options.header = header;
|
|
54339
54673
|
this.refreshHeader();
|
|
54340
54674
|
setTimeout(() => {
|
|
54341
|
-
this.
|
|
54675
|
+
this.render();
|
|
54342
54676
|
}, 0);
|
|
54343
54677
|
}
|
|
54344
54678
|
get transpose() {
|
|
@@ -54354,7 +54688,7 @@
|
|
|
54354
54688
|
this.internalProps.layoutMap.transpose = transpose;
|
|
54355
54689
|
this.refreshRowColCount();
|
|
54356
54690
|
this._resetFrozenColCount();
|
|
54357
|
-
this.
|
|
54691
|
+
this.render();
|
|
54358
54692
|
}
|
|
54359
54693
|
}
|
|
54360
54694
|
getCellValue(col, row) {
|
|
@@ -54411,11 +54745,10 @@
|
|
|
54411
54745
|
: [];
|
|
54412
54746
|
this.transpose = options.transpose ?? false;
|
|
54413
54747
|
this.refreshHeader();
|
|
54414
|
-
if (internalProps.
|
|
54415
|
-
internalProps.
|
|
54416
|
-
internalProps.
|
|
54748
|
+
if (internalProps.releaseList) {
|
|
54749
|
+
internalProps.releaseList.forEach(releaseObj => releaseObj?.release?.());
|
|
54750
|
+
internalProps.releaseList = null;
|
|
54417
54751
|
}
|
|
54418
|
-
this._updateSize();
|
|
54419
54752
|
if (options.dataSource) {
|
|
54420
54753
|
_setDataSource(this, options.dataSource);
|
|
54421
54754
|
}
|
|
@@ -54425,7 +54758,7 @@
|
|
|
54425
54758
|
else {
|
|
54426
54759
|
this._resetFrozenColCount();
|
|
54427
54760
|
this.scenegraph.createSceneGraph();
|
|
54428
|
-
this.
|
|
54761
|
+
this.render();
|
|
54429
54762
|
}
|
|
54430
54763
|
return new Promise(resolve => {
|
|
54431
54764
|
setTimeout(resolve, 0);
|
|
@@ -54437,7 +54770,7 @@
|
|
|
54437
54770
|
const transpose = table.transpose;
|
|
54438
54771
|
const showHeader = table.showHeader;
|
|
54439
54772
|
if (internalProps.headerEvents) {
|
|
54440
|
-
internalProps.headerEvents.forEach((id) => table.
|
|
54773
|
+
internalProps.headerEvents.forEach((id) => table.off(id));
|
|
54441
54774
|
}
|
|
54442
54775
|
const layoutMap = (internalProps.layoutMap = new SimpleHeaderLayoutMap(this, internalProps.columns ?? [], showHeader, table.options.hierarchyIndent));
|
|
54443
54776
|
layoutMap.transpose = transpose;
|
|
@@ -54526,8 +54859,8 @@
|
|
|
54526
54859
|
}
|
|
54527
54860
|
getCellAddress(findTargetRecord, field) {
|
|
54528
54861
|
let targetRecordIndex;
|
|
54529
|
-
for (let i = 0; i < this.records.length; i++) {
|
|
54530
|
-
const record = this.records[i];
|
|
54862
|
+
for (let i = 0; i < this.internalProps.records.length; i++) {
|
|
54863
|
+
const record = this.internalProps.records[i];
|
|
54531
54864
|
if (typeof findTargetRecord === 'function') {
|
|
54532
54865
|
if (findTargetRecord(record)) {
|
|
54533
54866
|
targetRecordIndex = i;
|
|
@@ -55397,6 +55730,24 @@
|
|
|
55397
55730
|
}
|
|
55398
55731
|
return false;
|
|
55399
55732
|
}
|
|
55733
|
+
isLeftBottomCorner(col, row) {
|
|
55734
|
+
if (col < this.rowHeaderLevelCount && row >= this.rowCount - this.bottomFrozenRowCount) {
|
|
55735
|
+
return true;
|
|
55736
|
+
}
|
|
55737
|
+
return false;
|
|
55738
|
+
}
|
|
55739
|
+
isRightTopCorner(col, row) {
|
|
55740
|
+
if (col >= this.colCount - this.rightFrozenColCount && row < this.columnHeaderLevelCount) {
|
|
55741
|
+
return true;
|
|
55742
|
+
}
|
|
55743
|
+
return false;
|
|
55744
|
+
}
|
|
55745
|
+
isRightBottomCorner(col, row) {
|
|
55746
|
+
if (col >= this.colCount - this.rightFrozenColCount && row >= this.rowCount - this.bottomFrozenRowCount) {
|
|
55747
|
+
return true;
|
|
55748
|
+
}
|
|
55749
|
+
return false;
|
|
55750
|
+
}
|
|
55400
55751
|
getColumnHeaderRange() {
|
|
55401
55752
|
return {
|
|
55402
55753
|
start: { col: this.rowHeaderLevelCount, row: 0 },
|
|
@@ -56194,216 +56545,13 @@
|
|
|
56194
56545
|
getChartDataId(col, row) {
|
|
56195
56546
|
return getChartDataId(col, row, this);
|
|
56196
56547
|
}
|
|
56197
|
-
|
|
56198
|
-
|
|
56199
|
-
|
|
56200
|
-
|
|
56201
|
-
|
|
56202
|
-
|
|
56203
|
-
if (layout.indicatorsAsCol) {
|
|
56204
|
-
if (layout.hasTwoIndicatorAxes &&
|
|
56205
|
-
row === layout.columnHeaderLevelCount - 1 &&
|
|
56206
|
-
col >= layout.rowHeaderLevelCount &&
|
|
56207
|
-
col < layout.colCount - layout.rightFrozenColCount) {
|
|
56208
|
-
const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, layout.columnHeaderLevelCount - 1);
|
|
56209
|
-
let defaultKey = indicatorKeys[1];
|
|
56210
|
-
if (isArray$3(defaultKey)) {
|
|
56211
|
-
defaultKey = defaultKey[0];
|
|
56212
|
-
}
|
|
56213
|
-
if (!defaultKey) {
|
|
56214
|
-
return undefined;
|
|
56215
|
-
}
|
|
56216
|
-
const data = layout.dataset.collectedValues[defaultKey + '_align']
|
|
56217
|
-
? layout.dataset.collectedValues[defaultKey + '_align']
|
|
56218
|
-
: layout.dataset.collectedValues[defaultKey];
|
|
56219
|
-
const index = layout.getRecordIndexByCol(col);
|
|
56220
|
-
const range = data[layout.getColKeysPath()[index][Math.max(0, layout.columnHeaderLevelCount - 1 - layout.topAxesCount)]];
|
|
56221
|
-
const axisOption = layout._table.pivotChartAxes.find(axisOption => {
|
|
56222
|
-
return axisOption.orient === 'top';
|
|
56223
|
-
});
|
|
56224
|
-
if (axisOption?.visible === false) {
|
|
56225
|
-
return;
|
|
56226
|
-
}
|
|
56227
|
-
return merge$2({}, axisOption, {
|
|
56228
|
-
orient: 'top',
|
|
56229
|
-
type: 'linear',
|
|
56230
|
-
range: range,
|
|
56231
|
-
label: {
|
|
56232
|
-
flush: true
|
|
56233
|
-
},
|
|
56234
|
-
title: {
|
|
56235
|
-
visible: false
|
|
56236
|
-
}
|
|
56237
|
-
});
|
|
56238
|
-
}
|
|
56239
|
-
else if (row === layout.rowCount - layout.bottomFrozenRowCount &&
|
|
56240
|
-
col >= layout.rowHeaderLevelCount &&
|
|
56241
|
-
col < layout.colCount - layout.rightFrozenColCount) {
|
|
56242
|
-
const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, row);
|
|
56243
|
-
let defaultKey = indicatorKeys[0];
|
|
56244
|
-
if (isArray$3(defaultKey)) {
|
|
56245
|
-
defaultKey = defaultKey[0];
|
|
56246
|
-
}
|
|
56247
|
-
const data = layout.dataset.collectedValues[defaultKey + '_align']
|
|
56248
|
-
? layout.dataset.collectedValues[defaultKey + '_align']
|
|
56249
|
-
: layout.dataset.collectedValues[defaultKey];
|
|
56250
|
-
const index = layout.getRecordIndexByCol(col);
|
|
56251
|
-
const range = data[layout.getColKeysPath()[index][Math.max(0, layout.columnHeaderLevelCount - 1 - layout.topAxesCount)]];
|
|
56252
|
-
let indicatorInfo = null;
|
|
56253
|
-
indicatorKeys.forEach(key => {
|
|
56254
|
-
const info = layout.getIndicatorInfo(key);
|
|
56255
|
-
if (info) {
|
|
56256
|
-
indicatorInfo = info;
|
|
56257
|
-
}
|
|
56258
|
-
});
|
|
56259
|
-
const axisOption = layout._table.pivotChartAxes.find(axisOption => {
|
|
56260
|
-
return axisOption.orient === 'bottom';
|
|
56261
|
-
});
|
|
56262
|
-
if (axisOption?.visible === false) {
|
|
56263
|
-
return;
|
|
56264
|
-
}
|
|
56265
|
-
return merge$2({}, axisOption, {
|
|
56266
|
-
orient: 'bottom',
|
|
56267
|
-
type: 'linear',
|
|
56268
|
-
range: range,
|
|
56269
|
-
label: {
|
|
56270
|
-
flush: true
|
|
56271
|
-
},
|
|
56272
|
-
title: {
|
|
56273
|
-
text: indicatorInfo?.caption,
|
|
56274
|
-
autoRotate: true
|
|
56275
|
-
}
|
|
56276
|
-
});
|
|
56277
|
-
}
|
|
56278
|
-
else if (col === layout.rowHeaderLevelCount - 1 &&
|
|
56279
|
-
row >= layout.rowHeaderLevelCount &&
|
|
56280
|
-
row < layout.rowCount - layout.bottomFrozenRowCount) {
|
|
56281
|
-
let rowDimensionKey = layout.getDimensionKeyInChartSpec(layout.rowHeaderLevelCount, row)[0];
|
|
56282
|
-
if (isArray$3(rowDimensionKey)) {
|
|
56283
|
-
rowDimensionKey = rowDimensionKey[0];
|
|
56284
|
-
}
|
|
56285
|
-
const data = layout.dataset.collectedValues[rowDimensionKey];
|
|
56286
|
-
const recordRow = layout.getRecordIndexByRow(row);
|
|
56287
|
-
const rowPath = layout.getRowKeysPath()[recordRow];
|
|
56288
|
-
const domain = data[rowPath[rowPath.length - 1]];
|
|
56289
|
-
const axisOption = layout._table.pivotChartAxes.find(axisOption => {
|
|
56290
|
-
return axisOption.orient === 'left';
|
|
56291
|
-
});
|
|
56292
|
-
if (axisOption?.visible === false) {
|
|
56293
|
-
return;
|
|
56294
|
-
}
|
|
56295
|
-
return merge$2({}, axisOption, {
|
|
56296
|
-
orient: 'left',
|
|
56297
|
-
type: 'band',
|
|
56298
|
-
data: Array.from(domain).reverse(),
|
|
56299
|
-
title: {
|
|
56300
|
-
visible: false
|
|
56301
|
-
}
|
|
56302
|
-
});
|
|
56303
|
-
}
|
|
56304
|
-
}
|
|
56305
|
-
else {
|
|
56306
|
-
if (col === layout.rowHeaderLevelCount - 1 &&
|
|
56307
|
-
row >= layout.columnHeaderLevelCount &&
|
|
56308
|
-
row < layout.rowCount - layout.bottomFrozenRowCount) {
|
|
56309
|
-
const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, row);
|
|
56310
|
-
let defaultKey = indicatorKeys[0];
|
|
56311
|
-
if (isArray$3(defaultKey)) {
|
|
56312
|
-
defaultKey = defaultKey[0];
|
|
56313
|
-
}
|
|
56314
|
-
const data = layout.dataset.collectedValues[defaultKey + '_align']
|
|
56315
|
-
? layout.dataset.collectedValues[defaultKey + '_align']
|
|
56316
|
-
: layout.dataset.collectedValues[defaultKey];
|
|
56317
|
-
const index = layout.getRecordIndexByRow(row);
|
|
56318
|
-
const range = data[layout.getRowKeysPath()[index][Math.max(0, layout.rowHeaderLevelCount - 1 - layout.leftAxesCount)]];
|
|
56319
|
-
let indicatorInfo = null;
|
|
56320
|
-
indicatorKeys.forEach(key => {
|
|
56321
|
-
const info = layout.getIndicatorInfo(key);
|
|
56322
|
-
if (info) {
|
|
56323
|
-
indicatorInfo = info;
|
|
56324
|
-
}
|
|
56325
|
-
});
|
|
56326
|
-
const axisOption = layout._table.pivotChartAxes.find(axisOption => {
|
|
56327
|
-
return axisOption.orient === 'left';
|
|
56328
|
-
});
|
|
56329
|
-
if (axisOption?.visible === false) {
|
|
56330
|
-
return;
|
|
56331
|
-
}
|
|
56332
|
-
return merge$2({}, axisOption, {
|
|
56333
|
-
orient: 'left',
|
|
56334
|
-
type: 'linear',
|
|
56335
|
-
range: range,
|
|
56336
|
-
label: {
|
|
56337
|
-
flush: true
|
|
56338
|
-
},
|
|
56339
|
-
title: {
|
|
56340
|
-
text: indicatorInfo?.caption,
|
|
56341
|
-
autoRotate: true
|
|
56342
|
-
}
|
|
56343
|
-
});
|
|
56344
|
-
}
|
|
56345
|
-
else if (col === layout.colCount - layout.rightFrozenColCount &&
|
|
56346
|
-
row >= layout.columnHeaderLevelCount &&
|
|
56347
|
-
row < layout.rowCount - layout.bottomFrozenRowCount) {
|
|
56348
|
-
const indicatorKeys = layout.getIndicatorKeyInChartSpec(layout.rowHeaderLevelCount - 1, row);
|
|
56349
|
-
let defaultKey = indicatorKeys[1];
|
|
56350
|
-
if (isArray$3(defaultKey)) {
|
|
56351
|
-
defaultKey = defaultKey[0];
|
|
56352
|
-
}
|
|
56353
|
-
if (!defaultKey) {
|
|
56354
|
-
return undefined;
|
|
56355
|
-
}
|
|
56356
|
-
const data = layout.dataset.collectedValues[defaultKey + '_align']
|
|
56357
|
-
? layout.dataset.collectedValues[defaultKey + '_align']
|
|
56358
|
-
: layout.dataset.collectedValues[defaultKey];
|
|
56359
|
-
const index = layout.getRecordIndexByRow(row);
|
|
56360
|
-
const range = data[layout.getRowKeysPath()[index][Math.max(0, layout.rowHeaderLevelCount - 1 - layout.leftAxesCount)]];
|
|
56361
|
-
const axisOption = layout._table.pivotChartAxes.find(axisOption => {
|
|
56362
|
-
return axisOption.orient === 'right';
|
|
56363
|
-
});
|
|
56364
|
-
if (axisOption?.visible === false) {
|
|
56365
|
-
return;
|
|
56366
|
-
}
|
|
56367
|
-
return merge$2({}, axisOption, {
|
|
56368
|
-
orient: 'right',
|
|
56369
|
-
type: 'linear',
|
|
56370
|
-
range: range,
|
|
56371
|
-
label: {
|
|
56372
|
-
flush: true
|
|
56373
|
-
},
|
|
56374
|
-
title: {
|
|
56375
|
-
visible: false
|
|
56376
|
-
}
|
|
56377
|
-
});
|
|
56378
|
-
}
|
|
56379
|
-
else if (row === layout.rowCount - layout.bottomFrozenRowCount &&
|
|
56380
|
-
col >= layout.rowHeaderLevelCount &&
|
|
56381
|
-
col < layout.colCount - layout.rightFrozenColCount) {
|
|
56382
|
-
let columnDimensionKey = layout.getDimensionKeyInChartSpec(col, layout.columnHeaderLevelCount)[0];
|
|
56383
|
-
if (isArray$3(columnDimensionKey)) {
|
|
56384
|
-
columnDimensionKey = columnDimensionKey[0];
|
|
56385
|
-
}
|
|
56386
|
-
const data = layout.dataset.collectedValues[columnDimensionKey];
|
|
56387
|
-
const recordCol = layout.getRecordIndexByCol(col);
|
|
56388
|
-
const colPath = layout.getColKeysPath()[recordCol];
|
|
56389
|
-
const domain = data[colPath[colPath.length - 1]];
|
|
56390
|
-
const axisOption = layout._table.pivotChartAxes.find(axisOption => {
|
|
56391
|
-
return axisOption.orient === 'bottom';
|
|
56392
|
-
});
|
|
56393
|
-
if (axisOption?.visible === false) {
|
|
56394
|
-
return;
|
|
56395
|
-
}
|
|
56396
|
-
return merge$2({}, axisOption, {
|
|
56397
|
-
orient: 'bottom',
|
|
56398
|
-
type: 'band',
|
|
56399
|
-
data: Array.from(domain),
|
|
56400
|
-
title: {
|
|
56401
|
-
visible: false
|
|
56402
|
-
}
|
|
56403
|
-
});
|
|
56404
|
-
}
|
|
56548
|
+
release() {
|
|
56549
|
+
const activeChartInstance = this._table._getActiveChartInstance();
|
|
56550
|
+
activeChartInstance?.release();
|
|
56551
|
+
this._indicators.forEach(indicatorObject => {
|
|
56552
|
+
indicatorObject.chartInstance?.release();
|
|
56553
|
+
});
|
|
56405
56554
|
}
|
|
56406
|
-
return undefined;
|
|
56407
56555
|
}
|
|
56408
56556
|
|
|
56409
56557
|
const EMPTY_HEADER = {
|
|
@@ -56918,6 +57066,24 @@
|
|
|
56918
57066
|
}
|
|
56919
57067
|
return false;
|
|
56920
57068
|
}
|
|
57069
|
+
isLeftBottomCorner(col, row) {
|
|
57070
|
+
if (col < this.rowHeaderLevelCount && row >= this.rowCount - this.bottomFrozenRowCount) {
|
|
57071
|
+
return true;
|
|
57072
|
+
}
|
|
57073
|
+
return false;
|
|
57074
|
+
}
|
|
57075
|
+
isRightTopCorner(col, row) {
|
|
57076
|
+
if (col >= this.colCount - this.rightFrozenColCount && row < this.columnHeaderLevelCount) {
|
|
57077
|
+
return true;
|
|
57078
|
+
}
|
|
57079
|
+
return false;
|
|
57080
|
+
}
|
|
57081
|
+
isRightBottomCorner(col, row) {
|
|
57082
|
+
if (col >= this.colCount - this.rightFrozenColCount && row >= this.rowCount - this.bottomFrozenRowCount) {
|
|
57083
|
+
return true;
|
|
57084
|
+
}
|
|
57085
|
+
return false;
|
|
57086
|
+
}
|
|
56921
57087
|
isRowHeader(col, row) {
|
|
56922
57088
|
if (col < this.rowHeaderLevelCount && row >= this.columnHeaderLevelCount) {
|
|
56923
57089
|
return true;
|
|
@@ -57530,6 +57696,23 @@
|
|
|
57530
57696
|
const barWidth = this._chartItemSpanSize || 25;
|
|
57531
57697
|
return (collectedValues?.length ?? 0) * (barWidth + barWidth / 3);
|
|
57532
57698
|
}
|
|
57699
|
+
getOptimunHeightForChart(row) {
|
|
57700
|
+
const path = this.getCellHeaderPaths(this.rowHeaderLevelCount, row).rowHeaderPaths;
|
|
57701
|
+
let collectedValues;
|
|
57702
|
+
for (const key in this.dataset.collectValuesBy) {
|
|
57703
|
+
if (this.dataset.collectValuesBy[key].type === 'yField' && !this.dataset.collectValuesBy[key].range) {
|
|
57704
|
+
collectedValues =
|
|
57705
|
+
this.dataset.collectedValues[key][path
|
|
57706
|
+
.map(pathObj => {
|
|
57707
|
+
return pathObj.value;
|
|
57708
|
+
})
|
|
57709
|
+
.join(this.dataset.stringJoinChar)];
|
|
57710
|
+
break;
|
|
57711
|
+
}
|
|
57712
|
+
}
|
|
57713
|
+
const barWidth = this._chartItemSpanSize || 25;
|
|
57714
|
+
return (collectedValues?.length ?? 0) * (barWidth + barWidth / 3);
|
|
57715
|
+
}
|
|
57533
57716
|
getIndicatorKeyInChartSpec(_col, _row) {
|
|
57534
57717
|
const chartSpec = this.getRawChartSpec(_col, _row);
|
|
57535
57718
|
const indicatorKeys = [];
|
|
@@ -57601,6 +57784,13 @@
|
|
|
57601
57784
|
}
|
|
57602
57785
|
return false;
|
|
57603
57786
|
}
|
|
57787
|
+
release() {
|
|
57788
|
+
const activeChartInstance = this._table._getActiveChartInstance();
|
|
57789
|
+
activeChartInstance?.release();
|
|
57790
|
+
this._indicatorObjects.forEach(indicatorObject => {
|
|
57791
|
+
indicatorObject.chartInstance?.release();
|
|
57792
|
+
});
|
|
57793
|
+
}
|
|
57604
57794
|
}
|
|
57605
57795
|
|
|
57606
57796
|
class FlatDataToObjects {
|
|
@@ -58310,7 +58500,7 @@
|
|
|
58310
58500
|
if (records) {
|
|
58311
58501
|
this.records = records;
|
|
58312
58502
|
const t0 = typeof window !== 'undefined' ? window.performance.now() : 0;
|
|
58313
|
-
this.setRecords(
|
|
58503
|
+
this.setRecords();
|
|
58314
58504
|
this.processCollectedValuesWithSumBy();
|
|
58315
58505
|
this.processCollectedValuesWithSortBy();
|
|
58316
58506
|
const t1 = typeof window !== 'undefined' ? window.performance.now() : 0;
|
|
@@ -58355,7 +58545,7 @@
|
|
|
58355
58545
|
this.registerAggregator(AggregationType.MIN, MinAggregator);
|
|
58356
58546
|
this.registerAggregator(AggregationType.AVG, AvgAggregator);
|
|
58357
58547
|
}
|
|
58358
|
-
setRecords(
|
|
58548
|
+
setRecords() {
|
|
58359
58549
|
this.processRecords();
|
|
58360
58550
|
}
|
|
58361
58551
|
processCollectedValuesWithSumBy() {
|
|
@@ -58389,10 +58579,22 @@
|
|
|
58389
58579
|
if (this.dataConfig?.filterRules?.length >= 1) {
|
|
58390
58580
|
isNeedFilter = true;
|
|
58391
58581
|
}
|
|
58392
|
-
|
|
58393
|
-
|
|
58394
|
-
|
|
58395
|
-
this.
|
|
58582
|
+
if (Array.isArray(this.records)) {
|
|
58583
|
+
for (let i = 0, len = this.records.length; i < len; i++) {
|
|
58584
|
+
const record = this.records[i];
|
|
58585
|
+
if (!isNeedFilter || this.filterRecord(record)) {
|
|
58586
|
+
this.processRecord(record);
|
|
58587
|
+
}
|
|
58588
|
+
}
|
|
58589
|
+
}
|
|
58590
|
+
else {
|
|
58591
|
+
for (const key in this.records) {
|
|
58592
|
+
for (let i = 0, len = this.records[key].length; i < len; i++) {
|
|
58593
|
+
const record = this.records[key][i];
|
|
58594
|
+
if (!isNeedFilter || this.filterRecord(record)) {
|
|
58595
|
+
this.processRecord(record, key);
|
|
58596
|
+
}
|
|
58597
|
+
}
|
|
58396
58598
|
}
|
|
58397
58599
|
}
|
|
58398
58600
|
this.rowFlatKeys = {};
|
|
@@ -58416,7 +58618,7 @@
|
|
|
58416
58618
|
}
|
|
58417
58619
|
return isReserved;
|
|
58418
58620
|
}
|
|
58419
|
-
processRecord(record) {
|
|
58621
|
+
processRecord(record, assignedIndicatorKey) {
|
|
58420
58622
|
this.derivedFieldRules?.forEach((derivedFieldRule, i) => {
|
|
58421
58623
|
record[derivedFieldRule.fieldName] = derivedFieldRule.derivedFunc(record);
|
|
58422
58624
|
});
|
|
@@ -58496,7 +58698,10 @@
|
|
|
58496
58698
|
if (!this.tree[flatRowKey]?.[flatColKey]?.[i]) {
|
|
58497
58699
|
this.tree[flatRowKey][flatColKey][i] = new this.aggregators[aggRule?.aggregationType ?? AggregationType.SUM](aggRule?.field ?? this.indicatorKeys[i], aggRule?.formatFun);
|
|
58498
58700
|
}
|
|
58499
|
-
if (
|
|
58701
|
+
if (assignedIndicatorKey) {
|
|
58702
|
+
this.indicatorKeys[i] === assignedIndicatorKey && this.tree[flatRowKey]?.[flatColKey]?.[i].push(record);
|
|
58703
|
+
}
|
|
58704
|
+
else if (aggRule?.field) {
|
|
58500
58705
|
if (typeof aggRule?.field === 'string') {
|
|
58501
58706
|
isValid$1(record[aggRule?.field]) && this.tree[flatRowKey]?.[flatColKey]?.[i].push(record);
|
|
58502
58707
|
}
|
|
@@ -59095,11 +59300,10 @@
|
|
|
59095
59300
|
this.dataset = new Dataset(internalProps.dataConfig, rowKeys, columnKeys, indicatorKeys, options.records);
|
|
59096
59301
|
}
|
|
59097
59302
|
this.refreshHeader();
|
|
59098
|
-
if (internalProps.
|
|
59099
|
-
internalProps.
|
|
59100
|
-
internalProps.
|
|
59303
|
+
if (internalProps.releaseList) {
|
|
59304
|
+
internalProps.releaseList.forEach(releaseObj => releaseObj?.release?.());
|
|
59305
|
+
internalProps.releaseList = null;
|
|
59101
59306
|
}
|
|
59102
|
-
this._updateSize();
|
|
59103
59307
|
if (options.dataSource) {
|
|
59104
59308
|
_setDataSource(this, options.dataSource);
|
|
59105
59309
|
}
|
|
@@ -59109,7 +59313,7 @@
|
|
|
59109
59313
|
else {
|
|
59110
59314
|
this._resetFrozenColCount();
|
|
59111
59315
|
this.scenegraph.createSceneGraph();
|
|
59112
|
-
this.
|
|
59316
|
+
this.render();
|
|
59113
59317
|
}
|
|
59114
59318
|
this.pivotSortState = [];
|
|
59115
59319
|
if (options.pivotSortState) {
|
|
@@ -59122,7 +59326,7 @@
|
|
|
59122
59326
|
refreshHeader() {
|
|
59123
59327
|
const internalProps = this.internalProps;
|
|
59124
59328
|
if (internalProps.headerEvents) {
|
|
59125
|
-
internalProps.headerEvents.forEach((id) => this.
|
|
59329
|
+
internalProps.headerEvents.forEach((id) => this.off(id));
|
|
59126
59330
|
}
|
|
59127
59331
|
const records = this.options.records ?? this.internalProps.records;
|
|
59128
59332
|
if (this.options.enableDataAnalysis) {
|
|
@@ -59289,7 +59493,7 @@
|
|
|
59289
59493
|
this.internalProps.dataConfig.sortRules = sortRules;
|
|
59290
59494
|
this.dataset.updateSortRules(sortRules);
|
|
59291
59495
|
this.internalProps.layoutMap.updateDataset(this.dataset);
|
|
59292
|
-
this.
|
|
59496
|
+
this.render();
|
|
59293
59497
|
}
|
|
59294
59498
|
updatePivotSortState(pivotSortStateConfig) {
|
|
59295
59499
|
for (let i = 0; i < pivotSortStateConfig.length; i++) {
|
|
@@ -59321,10 +59525,10 @@
|
|
|
59321
59525
|
if (moveContext) {
|
|
59322
59526
|
if (moveContext.moveType === 'column') {
|
|
59323
59527
|
if (this.options.records?.[0]?.constructor === Array) {
|
|
59324
|
-
for (let row = 0; row < this.records.length; row++) {
|
|
59325
|
-
const sourceColumns = this.records[row].splice(moveContext.sourceIndex - this.rowHeaderLevelCount, moveContext.moveSize);
|
|
59528
|
+
for (let row = 0; row < this.internalProps.records.length; row++) {
|
|
59529
|
+
const sourceColumns = this.internalProps.records[row].splice(moveContext.sourceIndex - this.rowHeaderLevelCount, moveContext.moveSize);
|
|
59326
59530
|
sourceColumns.unshift(moveContext.targetIndex - this.rowHeaderLevelCount, 0);
|
|
59327
|
-
Array.prototype.splice.apply(this.records[row], sourceColumns);
|
|
59531
|
+
Array.prototype.splice.apply(this.internalProps.records[row], sourceColumns);
|
|
59328
59532
|
}
|
|
59329
59533
|
}
|
|
59330
59534
|
this.colWidthsMap.adjustOrder(moveContext.sourceIndex, moveContext.targetIndex, moveContext.moveSize);
|
|
@@ -59340,9 +59544,9 @@
|
|
|
59340
59544
|
}
|
|
59341
59545
|
else if (moveContext.moveType === 'row') {
|
|
59342
59546
|
if (this.options.records?.[0]?.constructor === Array) {
|
|
59343
|
-
const sourceRows = this.records.splice(moveContext.sourceIndex - this.columnHeaderLevelCount, moveContext.moveSize);
|
|
59547
|
+
const sourceRows = this.internalProps.records.splice(moveContext.sourceIndex - this.columnHeaderLevelCount, moveContext.moveSize);
|
|
59344
59548
|
sourceRows.unshift(moveContext.targetIndex - this.columnHeaderLevelCount, 0);
|
|
59345
|
-
Array.prototype.splice.apply(this.records, sourceRows);
|
|
59549
|
+
Array.prototype.splice.apply(this.internalProps.records, sourceRows);
|
|
59346
59550
|
}
|
|
59347
59551
|
this.rowHeightsMap.adjustOrder(moveContext.sourceIndex, moveContext.targetIndex, moveContext.moveSize);
|
|
59348
59552
|
}
|
|
@@ -59424,9 +59628,8 @@
|
|
|
59424
59628
|
}
|
|
59425
59629
|
this.setCustomStateNameToSpec();
|
|
59426
59630
|
this.internalProps.dataConfig = { isPivotChart: true };
|
|
59427
|
-
this.internalProps.enableDataAnalysis = true;
|
|
59428
59631
|
this._axes = isArray$3(options.axes) ? options.axes : [];
|
|
59429
|
-
if (
|
|
59632
|
+
if (options.rows || options.columns) {
|
|
59430
59633
|
const rowKeys = options.rows.reduce((keys, rowObj) => {
|
|
59431
59634
|
if (typeof rowObj === 'string') {
|
|
59432
59635
|
keys.push(rowObj);
|
|
@@ -59502,8 +59705,7 @@
|
|
|
59502
59705
|
super.updateOption(options);
|
|
59503
59706
|
this.setCustomStateNameToSpec();
|
|
59504
59707
|
internalProps.dataConfig = {};
|
|
59505
|
-
|
|
59506
|
-
if (this.internalProps.enableDataAnalysis && (options.rows || options.columns)) {
|
|
59708
|
+
if (options.rows || options.columns) {
|
|
59507
59709
|
const rowKeys = options.rows.reduce((keys, rowObj) => {
|
|
59508
59710
|
if (typeof rowObj === 'string') {
|
|
59509
59711
|
keys.push(rowObj);
|
|
@@ -59536,11 +59738,10 @@
|
|
|
59536
59738
|
this.dataset = new Dataset(this.internalProps.dataConfig, rowKeys, columnKeys, indicatorKeys, options.records ?? this.internalProps.records, options.columnTree, options.rowTree);
|
|
59537
59739
|
}
|
|
59538
59740
|
this.refreshHeader();
|
|
59539
|
-
if (internalProps.
|
|
59540
|
-
internalProps.
|
|
59541
|
-
internalProps.
|
|
59741
|
+
if (internalProps.releaseList) {
|
|
59742
|
+
internalProps.releaseList.forEach(releaseObj => releaseObj?.release?.());
|
|
59743
|
+
internalProps.releaseList = null;
|
|
59542
59744
|
}
|
|
59543
|
-
this._updateSize();
|
|
59544
59745
|
if (options.dataSource) {
|
|
59545
59746
|
_setDataSource(this, options.dataSource);
|
|
59546
59747
|
}
|
|
@@ -59550,7 +59751,7 @@
|
|
|
59550
59751
|
else {
|
|
59551
59752
|
this._resetFrozenColCount();
|
|
59552
59753
|
this.scenegraph.createSceneGraph();
|
|
59553
|
-
this.
|
|
59754
|
+
this.render();
|
|
59554
59755
|
}
|
|
59555
59756
|
return new Promise(resolve => {
|
|
59556
59757
|
setTimeout(resolve, 0);
|
|
@@ -59559,11 +59760,9 @@
|
|
|
59559
59760
|
refreshHeader() {
|
|
59560
59761
|
const internalProps = this.internalProps;
|
|
59561
59762
|
if (internalProps.headerEvents) {
|
|
59562
|
-
internalProps.headerEvents.forEach((id) => this.
|
|
59563
|
-
}
|
|
59564
|
-
if (this.internalProps.enableDataAnalysis) {
|
|
59565
|
-
internalProps.layoutMap = new PivotLayoutMap(this, this.dataset);
|
|
59763
|
+
internalProps.headerEvents.forEach((id) => this.off(id));
|
|
59566
59764
|
}
|
|
59765
|
+
internalProps.layoutMap = new PivotLayoutMap(this, this.dataset);
|
|
59567
59766
|
for (let col = 0; col < internalProps.layoutMap.columnWidths.length; col++) {
|
|
59568
59767
|
const { width, minWidth, maxWidth } = internalProps.layoutMap.columnWidths?.[col] ?? {};
|
|
59569
59768
|
if (width && ((typeof width === 'string' && width !== 'auto') || (typeof width === 'number' && width > 0))) {
|
|
@@ -59676,7 +59875,7 @@
|
|
|
59676
59875
|
this.internalProps.dataConfig.sortRules = sortRules;
|
|
59677
59876
|
this.dataset.updateSortRules(sortRules);
|
|
59678
59877
|
this.internalProps.layoutMap.updateDataset(this.dataset);
|
|
59679
|
-
this.
|
|
59878
|
+
this.render();
|
|
59680
59879
|
}
|
|
59681
59880
|
updatePivotSortState(pivotSortStateConfig) {
|
|
59682
59881
|
for (let i = 0; i < pivotSortStateConfig.length; i++) {
|
|
@@ -59708,10 +59907,10 @@
|
|
|
59708
59907
|
if (moveContext) {
|
|
59709
59908
|
if (moveContext.moveType === 'column') {
|
|
59710
59909
|
if (this.options.records?.[0]?.constructor === Array) {
|
|
59711
|
-
for (let row = 0; row < this.records.length; row++) {
|
|
59712
|
-
const sourceColumns = this.records[row].splice(moveContext.sourceIndex - this.rowHeaderLevelCount, moveContext.moveSize);
|
|
59910
|
+
for (let row = 0; row < this.internalProps.records.length; row++) {
|
|
59911
|
+
const sourceColumns = this.internalProps.records[row].splice(moveContext.sourceIndex - this.rowHeaderLevelCount, moveContext.moveSize);
|
|
59713
59912
|
sourceColumns.unshift(moveContext.targetIndex - this.rowHeaderLevelCount, 0);
|
|
59714
|
-
Array.prototype.splice.apply(this.records[row], sourceColumns);
|
|
59913
|
+
Array.prototype.splice.apply(this.internalProps.records[row], sourceColumns);
|
|
59715
59914
|
}
|
|
59716
59915
|
}
|
|
59717
59916
|
this.colWidthsMap.adjustOrder(moveContext.sourceIndex, moveContext.targetIndex, moveContext.moveSize);
|
|
@@ -59727,9 +59926,9 @@
|
|
|
59727
59926
|
}
|
|
59728
59927
|
else if (moveContext.moveType === 'row') {
|
|
59729
59928
|
if (this.options.records?.[0]?.constructor === Array) {
|
|
59730
|
-
const sourceRows = this.records.splice(moveContext.sourceIndex - this.columnHeaderLevelCount, moveContext.moveSize);
|
|
59929
|
+
const sourceRows = this.internalProps.records.splice(moveContext.sourceIndex - this.columnHeaderLevelCount, moveContext.moveSize);
|
|
59731
59930
|
sourceRows.unshift(moveContext.targetIndex - this.columnHeaderLevelCount, 0);
|
|
59732
|
-
Array.prototype.splice.apply(this.records, sourceRows);
|
|
59931
|
+
Array.prototype.splice.apply(this.internalProps.records, sourceRows);
|
|
59733
59932
|
}
|
|
59734
59933
|
this.rowHeightsMap.adjustOrder(moveContext.sourceIndex, moveContext.targetIndex, moveContext.moveSize);
|
|
59735
59934
|
}
|
|
@@ -59940,9 +60139,12 @@
|
|
|
59940
60139
|
});
|
|
59941
60140
|
}
|
|
59942
60141
|
else {
|
|
60142
|
+
const field = this.options.indicatorsAsCol === false
|
|
60143
|
+
? indicator.chartSpec.yField
|
|
60144
|
+
: indicator.chartSpec.xField;
|
|
59943
60145
|
aggregationRules.push({
|
|
59944
60146
|
indicatorKey: indicator.indicatorKey,
|
|
59945
|
-
field: indicator.indicatorKey,
|
|
60147
|
+
field: field ?? indicator.indicatorKey,
|
|
59946
60148
|
aggregationType: AggregationType.RECORD
|
|
59947
60149
|
});
|
|
59948
60150
|
}
|
|
@@ -59991,22 +60193,26 @@
|
|
|
59991
60193
|
}
|
|
59992
60194
|
});
|
|
59993
60195
|
}
|
|
59994
|
-
|
|
59995
|
-
|
|
59996
|
-
|
|
59997
|
-
|
|
59998
|
-
|
|
59999
|
-
|
|
60000
|
-
|
|
60001
|
-
this._chartEventMap[type] = listener;
|
|
60196
|
+
onVChartEvent(type, query, callback) {
|
|
60197
|
+
if (query) {
|
|
60198
|
+
this._chartEventMap[type] = { callback, query };
|
|
60199
|
+
}
|
|
60200
|
+
else {
|
|
60201
|
+
this._chartEventMap[type] = { callback };
|
|
60202
|
+
}
|
|
60002
60203
|
}
|
|
60003
|
-
|
|
60204
|
+
offVChartEvent(type) {
|
|
60004
60205
|
delete this._chartEventMap[type];
|
|
60005
60206
|
}
|
|
60006
60207
|
_bindChartEvent(activeChartInstance) {
|
|
60007
60208
|
if (activeChartInstance) {
|
|
60008
60209
|
for (const key in this._chartEventMap) {
|
|
60009
|
-
|
|
60210
|
+
if (this._chartEventMap[key].query) {
|
|
60211
|
+
activeChartInstance.on(key, this._chartEventMap[key].query, this._chartEventMap[key].callback);
|
|
60212
|
+
}
|
|
60213
|
+
else {
|
|
60214
|
+
activeChartInstance.on(key, this._chartEventMap[key].callback);
|
|
60215
|
+
}
|
|
60010
60216
|
}
|
|
60011
60217
|
}
|
|
60012
60218
|
}
|
|
@@ -60015,7 +60221,7 @@
|
|
|
60015
60221
|
this.dataset.updateFilterRules(filterRules);
|
|
60016
60222
|
clearChartCacheImage(this.scenegraph);
|
|
60017
60223
|
updateChartData(this.scenegraph);
|
|
60018
|
-
this.
|
|
60224
|
+
this.render();
|
|
60019
60225
|
}
|
|
60020
60226
|
setLegendSelected(selectedData) {
|
|
60021
60227
|
this.internalProps.legends.legendComponent.setSelected(selectedData);
|
|
@@ -60029,7 +60235,8 @@
|
|
|
60029
60235
|
const chartNode = cellGroup?.getChildren()?.[0];
|
|
60030
60236
|
if (chartNode.attribute.chartInstance) {
|
|
60031
60237
|
const chartInstance = chartNode.attribute.chartInstance;
|
|
60032
|
-
const { dataId, data,
|
|
60238
|
+
const { dataId, data, axes } = chartNode.attribute;
|
|
60239
|
+
const viewBox = chartNode.getViewBox();
|
|
60033
60240
|
axes.forEach((axis, index) => {
|
|
60034
60241
|
if (axis.type === 'linear') {
|
|
60035
60242
|
const chartAxis = chartInstance._chart._components[index];
|
|
@@ -60052,7 +60259,7 @@
|
|
|
60052
60259
|
});
|
|
60053
60260
|
chartInstance.updateDataSync(dataId, data);
|
|
60054
60261
|
position = chartInstance.convertDatumToPosition(datum);
|
|
60055
|
-
this.
|
|
60262
|
+
this.render();
|
|
60056
60263
|
}
|
|
60057
60264
|
return position
|
|
60058
60265
|
? { x: Math.round(position.x + cellPosition.bounds.x1), y: Math.round(position.y + cellPosition.bounds.y1) }
|
|
@@ -60686,7 +60893,7 @@
|
|
|
60686
60893
|
percentCalc: percentCalc
|
|
60687
60894
|
});
|
|
60688
60895
|
|
|
60689
|
-
const version = "0.9.3-alpha.
|
|
60896
|
+
const version = "0.9.3-alpha.5";
|
|
60690
60897
|
function getIcons() {
|
|
60691
60898
|
return get$1();
|
|
60692
60899
|
}
|