k-vtable 1.0.26 → 1.0.28
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.d.ts +1 -0
- package/cjs/ListTable.js +17 -7
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.js +6 -6
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable-all.js +5 -5
- package/cjs/PivotTable-all.js.map +1 -1
- package/cjs/PivotTable.js +14 -8
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/components/axis/axis.d.ts +5 -3
- package/cjs/components/axis/axis.js +20 -14
- package/cjs/components/axis/axis.js.map +1 -1
- package/cjs/components/axis/get-axis-attributes.d.ts +1 -0
- package/cjs/components/axis/get-axis-attributes.js +5 -2
- package/cjs/components/axis/get-axis-attributes.js.map +1 -1
- package/cjs/components/axis/get-axis-component-size.js +11 -5
- package/cjs/components/axis/get-axis-component-size.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +3 -3
- package/cjs/core/BaseTable.js +16 -13
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/TABLE_EVENT_TYPE.d.ts +2 -0
- package/cjs/core/TABLE_EVENT_TYPE.js +3 -1
- package/cjs/core/TABLE_EVENT_TYPE.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/dataset/dataset.js +13 -4
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/edit/edit-manager.d.ts +3 -2
- package/cjs/edit/edit-manager.js +36 -6
- package/cjs/edit/edit-manager.js.map +1 -1
- package/cjs/event/event.d.ts +9 -0
- package/cjs/event/event.js +161 -85
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/container-dom.js +15 -7
- package/cjs/event/listener/container-dom.js.map +1 -1
- package/cjs/event/self-event-listener/pivot-chart/axis-hover.js +1 -1
- package/cjs/event/self-event-listener/pivot-chart/axis-hover.js.map +1 -1
- package/cjs/event/util.d.ts +1 -0
- package/cjs/event/util.js +13 -2
- package/cjs/event/util.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.js +40 -25
- package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
- package/cjs/layout/chart-helper/get-chart-spec.js +6 -2
- package/cjs/layout/chart-helper/get-chart-spec.js.map +1 -1
- package/cjs/layout/pivot-header-layout.d.ts +4 -1
- package/cjs/layout/pivot-header-layout.js +55 -22
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/plugins/index.js +1 -1
- package/cjs/plugins/plugin-manager.d.ts +2 -0
- package/cjs/plugins/plugin-manager.js +13 -6
- package/cjs/plugins/plugin-manager.js.map +1 -1
- package/cjs/scenegraph/component/menu.d.ts +41 -0
- package/cjs/scenegraph/component/table-component.d.ts +2 -0
- package/cjs/scenegraph/component/table-component.js +39 -9
- package/cjs/scenegraph/component/table-component.js.map +1 -1
- package/cjs/scenegraph/debug-tool/debug-tool.js +1 -1
- package/cjs/scenegraph/debug-tool/debug-tool.js.map +1 -1
- package/cjs/scenegraph/graphic/active-cell-chart-list.d.ts +13 -0
- package/cjs/scenegraph/graphic/active-cell-chart-list.js +152 -0
- package/cjs/scenegraph/graphic/active-cell-chart-list.js.map +1 -0
- package/cjs/scenegraph/graphic/chart.d.ts +9 -2
- package/cjs/scenegraph/graphic/chart.js +95 -15
- package/cjs/scenegraph/graphic/chart.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.js +2 -1
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render.js +3 -3
- package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +3 -3
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/column-helper.js +1 -1
- package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/layout/frozen.js +4 -4
- package/cjs/scenegraph/layout/frozen.js.map +1 -1
- package/cjs/scenegraph/layout/update-width.js +1 -1
- package/cjs/scenegraph/layout/update-width.js.map +1 -1
- package/cjs/scenegraph/refresh-node/update-chart.js +2 -2
- package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +9 -2
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/utils/text-measure.d.ts +38 -0
- package/cjs/state/state.js +15 -23
- package/cjs/state/state.js.map +1 -1
- package/cjs/themes/theme-define.js +22 -16
- package/cjs/themes/theme-define.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +5 -3
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/events.d.ts +8 -0
- package/cjs/ts-types/events.js.map +1 -1
- package/cjs/ts-types/list-table/define/index.d.ts +9 -2
- package/cjs/ts-types/list-table/define/index.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +17 -0
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/ts-types/theme.d.ts +12 -4
- package/cjs/ts-types/theme.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +25073 -25724
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.d.ts +1 -0
- package/es/ListTable.js +18 -8
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.js +6 -6
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable-all.js +5 -3
- package/es/PivotTable-all.js.map +1 -1
- package/es/PivotTable.js +14 -8
- package/es/PivotTable.js.map +1 -1
- package/es/components/axis/axis.d.ts +5 -3
- package/es/components/axis/axis.js +19 -12
- package/es/components/axis/axis.js.map +1 -1
- package/es/components/axis/get-axis-attributes.d.ts +1 -0
- package/es/components/axis/get-axis-attributes.js +5 -2
- package/es/components/axis/get-axis-attributes.js.map +1 -1
- package/es/components/axis/get-axis-component-size.js +12 -4
- package/es/components/axis/get-axis-component-size.js.map +1 -1
- package/es/core/BaseTable.d.ts +3 -3
- package/es/core/BaseTable.js +16 -13
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/TABLE_EVENT_TYPE.d.ts +2 -0
- package/es/core/TABLE_EVENT_TYPE.js +3 -1
- package/es/core/TABLE_EVENT_TYPE.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/dataset/dataset.js +12 -4
- package/es/dataset/dataset.js.map +1 -1
- package/es/edit/edit-manager.d.ts +3 -2
- package/es/edit/edit-manager.js +36 -6
- package/es/edit/edit-manager.js.map +1 -1
- package/es/event/event.d.ts +9 -0
- package/es/event/event.js +161 -85
- package/es/event/event.js.map +1 -1
- package/es/event/listener/container-dom.js +15 -7
- package/es/event/listener/container-dom.js.map +1 -1
- package/es/event/self-event-listener/pivot-chart/axis-hover.js +1 -1
- package/es/event/self-event-listener/pivot-chart/axis-hover.js.map +1 -1
- package/es/event/util.d.ts +1 -0
- package/es/event/util.js +11 -0
- package/es/event/util.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.js +39 -24
- package/es/layout/chart-helper/get-axis-config.js.map +1 -1
- package/es/layout/chart-helper/get-chart-spec.js +5 -3
- package/es/layout/chart-helper/get-chart-spec.js.map +1 -1
- package/es/layout/pivot-header-layout.d.ts +4 -1
- package/es/layout/pivot-header-layout.js +53 -21
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/plugins/index.js +1 -1
- package/es/plugins/plugin-manager.d.ts +2 -0
- package/es/plugins/plugin-manager.js +13 -6
- package/es/plugins/plugin-manager.js.map +1 -1
- package/es/scenegraph/component/menu.d.ts +41 -0
- package/es/scenegraph/component/table-component.d.ts +2 -0
- package/es/scenegraph/component/table-component.js +39 -9
- package/es/scenegraph/component/table-component.js.map +1 -1
- package/es/scenegraph/debug-tool/debug-tool.js +1 -1
- package/es/scenegraph/debug-tool/debug-tool.js.map +1 -1
- package/es/scenegraph/graphic/active-cell-chart-list.d.ts +13 -0
- package/es/scenegraph/graphic/active-cell-chart-list.js +141 -0
- package/es/scenegraph/graphic/active-cell-chart-list.js.map +1 -0
- package/es/scenegraph/graphic/chart.d.ts +9 -2
- package/es/scenegraph/graphic/chart.js +95 -14
- package/es/scenegraph/graphic/chart.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render-helper.js +2 -1
- package/es/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render.js +3 -3
- package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +3 -3
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/column-helper.js +1 -1
- package/es/scenegraph/group-creater/column-helper.js.map +1 -1
- package/es/scenegraph/layout/compute-col-width.js +1 -1
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/layout/frozen.js +4 -4
- package/es/scenegraph/layout/frozen.js.map +1 -1
- package/es/scenegraph/layout/update-width.js +1 -1
- package/es/scenegraph/layout/update-width.js.map +1 -1
- package/es/scenegraph/refresh-node/update-chart.js +2 -2
- package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/es/scenegraph/scenegraph.js +9 -2
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/utils/text-measure.d.ts +38 -0
- package/es/state/state.js +15 -23
- package/es/state/state.js.map +1 -1
- package/es/themes/theme-define.js +18 -12
- package/es/themes/theme-define.js.map +1 -1
- package/es/ts-types/base-table.d.ts +5 -3
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/events.d.ts +8 -0
- package/es/ts-types/events.js.map +1 -1
- package/es/ts-types/list-table/define/index.d.ts +9 -2
- package/es/ts-types/list-table/define/index.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +17 -0
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/ts-types/theme.d.ts +12 -4
- package/es/ts-types/theme.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +11 -11
- package/cjs/layout/pivot-layout.d.ts +0 -1
- package/cjs/layout/pivot-layout.js +0 -1
- package/cjs/layout/pivot-layout.js.map +0 -1
- package/es/layout/pivot-layout.d.ts +0 -1
- package/es/layout/pivot-layout.js +0 -1
- package/es/layout/pivot-layout.js.map +0 -1
|
@@ -33,10 +33,11 @@ export class PivotHeaderLayoutMap {
|
|
|
33
33
|
this._showColumnHeader = !0, this._indicatorShowType = "column", this.rowHierarchyTextStartAlignment = !1,
|
|
34
34
|
this.rowDimensionKeys = [], this.colDimensionKeys = [], this.indicatorKeys = [],
|
|
35
35
|
this.indicatorDimensionKey = IndicatorDimensionKeyPlaceholder, this._rowHeaderExtensionTree = {},
|
|
36
|
-
this._extensionRowDimensionKeys = [], this.fullRowDimensionKeys = [], this.
|
|
37
|
-
this.
|
|
38
|
-
this.
|
|
39
|
-
this.
|
|
36
|
+
this._extensionRowDimensionKeys = [], this.fullRowDimensionKeys = [], this.hasLeftIndicatorAxis = !1,
|
|
37
|
+
this.hasRightIndicatorAxis = !1, this.hasTopIndicatorAxis = !1, this.hasBottomIndicatorAxis = !1,
|
|
38
|
+
this.leftRowSeriesNumberColumnCount = 0, this.rightRowSeriesNumberColumnCount = 0,
|
|
39
|
+
this._useGetBodyCache = !1, this._getBodyCache = new Map, this._useHeaderPathCache = !1,
|
|
40
|
+
this._colHeaderPathCache = new Map, this._rowHeaderPathCache = new Map, this.matchDimensionPath = (paths, treeNodes, needLowestLevel, checkAxisNode = !1, pathIndex = 0) => {
|
|
40
41
|
if (pathIndex >= paths.length) return;
|
|
41
42
|
const currentPath = paths[pathIndex];
|
|
42
43
|
for (let j = 0; j < treeNodes.length; j++) {
|
|
@@ -50,7 +51,7 @@ export class PivotHeaderLayoutMap {
|
|
|
50
51
|
if (!(null == children ? void 0 : children.length) || hasAxisNode) return dimension;
|
|
51
52
|
const findLeafNode = nodes => {
|
|
52
53
|
for (const node of nodes) {
|
|
53
|
-
const nodeChildren = node.children, nodeHasAxis = checkAxisNode && nodeChildren.some((row => "axis" === row.dimensionKey));
|
|
54
|
+
const nodeChildren = node.children, nodeHasAxis = checkAxisNode && nodeChildren && nodeChildren.some((row => "axis" === row.dimensionKey));
|
|
54
55
|
if (!(null == nodeChildren ? void 0 : nodeChildren.length) || nodeHasAxis) return node;
|
|
55
56
|
const leaf = findLeafNode(nodeChildren);
|
|
56
57
|
if (leaf) return leaf;
|
|
@@ -93,15 +94,46 @@ export class PivotHeaderLayoutMap {
|
|
|
93
94
|
this.colDimensionKeys = this.columnDimensionTree.dimensionKeysIncludeVirtual.valueArr(),
|
|
94
95
|
this.rowDimensionKeys = this.rowDimensionTree.dimensionKeysIncludeVirtual.valueArr(),
|
|
95
96
|
this.fullRowDimensionKeys = this.fullRowDimensionKeys.concat(this.rowDimensionKeys),
|
|
96
|
-
this.
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
97
|
+
this._table.isPivotChart() && (this.hasLeftIndicatorAxis = !1, this.hasRightIndicatorAxis = !1,
|
|
98
|
+
this.hasTopIndicatorAxis = !1, this.hasBottomIndicatorAxis = !1, this.indicatorsDefine.forEach((indicatorObject => {
|
|
99
|
+
var _a, _b, _c, _d;
|
|
100
|
+
if (indicatorObject.hasLeftIndicatorAxis = !1, indicatorObject.hasRightIndicatorAxis = !1,
|
|
101
|
+
indicatorObject.hasTopIndicatorAxis = !1, indicatorObject.hasBottomIndicatorAxis = !1,
|
|
102
|
+
!(null == indicatorObject ? void 0 : indicatorObject.chartSpec)) return;
|
|
103
|
+
const axes = null !== (_b = null !== (_a = indicatorObject.chartSpec.axes) && void 0 !== _a ? _a : this._table.pivotChartAxes) && void 0 !== _b ? _b : [], visibleOrients = new Set;
|
|
104
|
+
(null != axes ? axes : []).forEach((axis => {
|
|
105
|
+
(null == axis ? void 0 : axis.orient) && !1 !== axis.visible && visibleOrients.add(axis.orient);
|
|
106
|
+
}));
|
|
107
|
+
const isMultiSeries = (null === (_d = null === (_c = indicatorObject.chartSpec) || void 0 === _c ? void 0 : _c.series) || void 0 === _d ? void 0 : _d.length) > 1;
|
|
108
|
+
if (this.indicatorsAsCol) {
|
|
109
|
+
let hasTop = visibleOrients.has("top"), hasBottom = visibleOrients.has("bottom");
|
|
110
|
+
if (axes.length || (hasBottom = !0), isMultiSeries) {
|
|
111
|
+
const topHiddenExplicitly = axes.some((axis => "top" === (null == axis ? void 0 : axis.orient) && !1 === axis.visible));
|
|
112
|
+
if (!axes.length || !topHiddenExplicitly) {
|
|
113
|
+
hasTop = !0;
|
|
114
|
+
axes.some((axis => "bottom" === (null == axis ? void 0 : axis.orient) && !1 === axis.visible)) || (hasBottom = !0);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
indicatorObject.hasTopIndicatorAxis = hasTop, indicatorObject.hasBottomIndicatorAxis = hasBottom,
|
|
118
|
+
indicatorObject.hasLeftIndicatorAxis = !1, indicatorObject.hasRightIndicatorAxis = !1;
|
|
119
|
+
} else {
|
|
120
|
+
let hasLeft = visibleOrients.has("left"), hasRight = visibleOrients.has("right");
|
|
121
|
+
if (axes.length || (hasLeft = !0), isMultiSeries) {
|
|
122
|
+
const rightHiddenExplicitly = axes.some((axis => "right" === (null == axis ? void 0 : axis.orient) && !1 === axis.visible));
|
|
123
|
+
if (!axes.length || !rightHiddenExplicitly) {
|
|
124
|
+
hasRight = !0;
|
|
125
|
+
axes.some((axis => "left" === (null == axis ? void 0 : axis.orient) && !1 === axis.visible)) || (hasLeft = !0);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
indicatorObject.hasLeftIndicatorAxis = hasLeft, indicatorObject.hasRightIndicatorAxis = hasRight,
|
|
129
|
+
indicatorObject.hasTopIndicatorAxis = !1, indicatorObject.hasBottomIndicatorAxis = !1;
|
|
101
130
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
131
|
+
this.hasLeftIndicatorAxis || (this.hasLeftIndicatorAxis = !!indicatorObject.hasLeftIndicatorAxis),
|
|
132
|
+
this.hasRightIndicatorAxis || (this.hasRightIndicatorAxis = !!indicatorObject.hasRightIndicatorAxis),
|
|
133
|
+
this.hasTopIndicatorAxis || (this.hasTopIndicatorAxis = !!indicatorObject.hasTopIndicatorAxis),
|
|
134
|
+
this.hasBottomIndicatorAxis || (this.hasBottomIndicatorAxis = !!indicatorObject.hasBottomIndicatorAxis);
|
|
135
|
+
}))), this.resetRowHeaderLevelCount(), this.resetColumnHeaderLevelCount(), this._generateColHeaderIds(),
|
|
136
|
+
this.colIndex = 0, this._generateRowHeaderIds(), this._rowHeaderCellFullPathIds_FULL = transpose(this._rowHeaderCellFullPathIds_FULL),
|
|
105
137
|
"tree" === table.options.rowHierarchyType && (null === (_r = this.extensionRows) || void 0 === _r ? void 0 : _r.length) >= 1 && (this.generateExtensionRowTree(),
|
|
106
138
|
this.extensionRows.forEach((extensionRow => {
|
|
107
139
|
const rowKeys = [];
|
|
@@ -709,12 +741,12 @@ export class PivotHeaderLayoutMap {
|
|
|
709
741
|
resetColumnHeaderLevelCount() {
|
|
710
742
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
711
743
|
if (this.showHeader && this.showColumnHeader) {
|
|
712
|
-
if (this._table.isPivotChart() && this.indicatorsAsCol && !(null === (_b = null === (_a = this.dataset) || void 0 === _a ? void 0 : _a.colKeys) || void 0 === _b ? void 0 : _b.length) && 0 === (null === (_d = null === (_c = this.columnDimensionTree) || void 0 === _c ? void 0 : _c.tree) || void 0 === _d ? void 0 : _d.level) && !this.
|
|
744
|
+
if (this._table.isPivotChart() && this.indicatorsAsCol && !(null === (_b = null === (_a = this.dataset) || void 0 === _a ? void 0 : _a.colKeys) || void 0 === _b ? void 0 : _b.length) && 0 === (null === (_d = null === (_c = this.columnDimensionTree) || void 0 === _c ? void 0 : _c.tree) || void 0 === _d ? void 0 : _d.level) && !this.hasTopIndicatorAxis) return void (this.columnHeaderLevelCount = 0);
|
|
713
745
|
let count = this._getColumnHeaderTreeExpandedMaxLevelCount();
|
|
714
746
|
return this.indicatorsAsCol && this.hideIndicatorName && this.colDimensionKeys[this.colDimensionKeys.length - 1] === this.indicatorDimensionKey && count--,
|
|
715
747
|
0 === count && this.dataset && !(null === (_e = this.dataset.customColTree) || void 0 === _e ? void 0 : _e.length) ? "row" !== this.cornerSetting.titleOnDimension && "all" !== this.cornerSetting.titleOnDimension || !this.cornerSetting.forceShowHeader ? this._table.isPivotChart() || 0 !== (null !== (_g = null === (_f = this.dataset.records) || void 0 === _f ? void 0 : _f.length) && void 0 !== _g ? _g : 0) || "column" !== this.cornerSetting.titleOnDimension && "all" !== this.cornerSetting.titleOnDimension || (count = null !== (_h = this.columnsDefine.length) && void 0 !== _h ? _h : 0) : count = 1 : !this.dataset || this._table.isPivotChart() || 0 !== (null !== (_k = null === (_j = this.dataset.records) || void 0 === _j ? void 0 : _j.length) && void 0 !== _k ? _k : 0) || this.dataset.customColTree || "column" !== this.cornerSetting.titleOnDimension && "all" !== this.cornerSetting.titleOnDimension || (count = null !== (_l = this.columnsDefine.length) && void 0 !== _l ? _l : 0,
|
|
716
748
|
!this.hideIndicatorName && this.indicatorsAsCol && count++), this.columnHeaderTitle && (count += 1),
|
|
717
|
-
this._table.isPivotChart() && this.indicatorsAsCol && !this.
|
|
749
|
+
this._table.isPivotChart() && this.indicatorsAsCol && !this.hasTopIndicatorAxis && checkHasCartesianChart(this.indicatorsDefine) && (count -= 1),
|
|
718
750
|
void (this.columnHeaderLevelCount = count);
|
|
719
751
|
}
|
|
720
752
|
this.columnHeaderLevelCount = this.indicatorsAsCol ? this.hideIndicatorName ? 0 : 1 : 0;
|
|
@@ -729,7 +761,7 @@ export class PivotHeaderLayoutMap {
|
|
|
729
761
|
const rowLevelCount = this._getRowHeaderTreeExpandedMaxLevelCount();
|
|
730
762
|
let count = rowLevelCount;
|
|
731
763
|
return 0 === count && this.dataset && !(null === (_c = this.dataset.customRowTree) || void 0 === _c ? void 0 : _c.length) ? "column" !== this.cornerSetting.titleOnDimension && "all" !== this.cornerSetting.titleOnDimension || !this.cornerSetting.forceShowHeader ? this._table.isPivotChart() || 0 !== (null !== (_e = null === (_d = this.dataset.records) || void 0 === _d ? void 0 : _d.length) && void 0 !== _e ? _e : 0) || "row" !== this.cornerSetting.titleOnDimension && "all" !== this.cornerSetting.titleOnDimension || (count = null !== (_f = this.rowsDefine.length) && void 0 !== _f ? _f : 0) : count = 1 : !this.dataset || this._table.isPivotChart() || 0 !== (null !== (_h = null === (_g = this.dataset.records) || void 0 === _g ? void 0 : _g.length) && void 0 !== _h ? _h : 0) || this.dataset.customRowTree || "row" !== this.cornerSetting.titleOnDimension && "all" !== this.cornerSetting.titleOnDimension || (count = this.rowsDefine.length,
|
|
732
|
-
this.hideIndicatorName || this.indicatorsAsCol || count++), !this.indicatorsAsCol && this.hideIndicatorName && this.rowDimensionKeys[this.rowDimensionKeys.length - 1] === this.indicatorDimensionKey && (count = rowLevelCount - 1),
|
|
764
|
+
this.hideIndicatorName || this.indicatorsAsCol || count++), !this.indicatorsAsCol && (this.hideIndicatorName || !this.hasLeftIndicatorAxis && this._table.isPivotChart() && checkHasCartesianChart(this.indicatorsDefine)) && this.rowDimensionKeys[this.rowDimensionKeys.length - 1] === this.indicatorDimensionKey && (count = rowLevelCount - 1),
|
|
733
765
|
this.rowHeaderTitle && (count += 1), void (this.rowHeaderLevelCount = count);
|
|
734
766
|
}
|
|
735
767
|
this.rowHeaderLevelCount = this.indicatorsAsCol || this.hideIndicatorName ? 0 : 1;
|
|
@@ -771,7 +803,7 @@ export class PivotHeaderLayoutMap {
|
|
|
771
803
|
get rightFrozenColCount() {
|
|
772
804
|
if (!this._table.isPivotChart()) return this._table.internalProps.rightFrozenColCount ? this.colCount - this.rowHeaderLevelCount >= this._table.internalProps.rightFrozenColCount ? this._table.internalProps.rightFrozenColCount : this.colCount - this.rowHeaderLevelCount : 0;
|
|
773
805
|
const axisOption = this._table.pivotChartAxes.find((axisOption => "right" === axisOption.orient));
|
|
774
|
-
return !1 === (null == axisOption ? void 0 : axisOption.visible) || this.indicatorsAsCol ? 0 : this.
|
|
806
|
+
return !1 === (null == axisOption ? void 0 : axisOption.visible) || this.indicatorsAsCol ? 0 : this.hasRightIndicatorAxis ? 1 : 0;
|
|
775
807
|
}
|
|
776
808
|
get bodyRowCount() {
|
|
777
809
|
return this.rowCount - this.bottomFrozenRowCount - this.headerLevelCount;
|
|
@@ -1026,7 +1058,7 @@ export class PivotHeaderLayoutMap {
|
|
|
1026
1058
|
if ("axis" !== rowHeader.dimensionKey) {
|
|
1027
1059
|
const rowHeaderPath = {};
|
|
1028
1060
|
rowHeaderPath.dimensionKey = rowHeader.dimensionKey, rowHeaderPath.indicatorKey = rowHeader.indicatorKey,
|
|
1029
|
-
rowHeaderPath.value = null !== (
|
|
1061
|
+
rowHeaderPath.value = null !== (_a = rowHeader.value) && void 0 !== _a ? _a : rowHeader.indicatorKey ? null !== (_c = null === (_b = this.getIndicatorInfoByIndicatorKey(rowHeader.indicatorKey)) || void 0 === _b ? void 0 : _b.title) && void 0 !== _c ? _c : "" : rowHeader.value,
|
|
1030
1062
|
rowHeaderPath.virtual = rowHeader.virtual, rowHeaderPath.role = rowHeader.role,
|
|
1031
1063
|
headerPaths.rowHeaderPaths.push(rowHeaderPath);
|
|
1032
1064
|
}
|
|
@@ -1544,7 +1576,7 @@ export class PivotHeaderLayoutMap {
|
|
|
1544
1576
|
if (this.indicatorKeys.length >= 1 && checkHasCartesianChart(this.indicatorsDefine)) {
|
|
1545
1577
|
if (this.isBottomFrozenRow(col, row) && isHasCartesianChartInline(col, row, "col", this) || this.isRightFrozenColumn(col, row) && isHasCartesianChartInline(col, row, "row", this)) return !0;
|
|
1546
1578
|
if (this.isRowHeader(col, row) && col === this.rowHeaderLevelCount - 1 && isHasCartesianChartInline(col, row, "row", this)) return !0;
|
|
1547
|
-
if (this.
|
|
1579
|
+
if (this.hasTopIndicatorAxis && this.indicatorsAsCol && row === this.columnHeaderLevelCount - 1 && isHasCartesianChartInline(col, row, "col", this)) return !0;
|
|
1548
1580
|
}
|
|
1549
1581
|
return !1;
|
|
1550
1582
|
}
|
|
@@ -1641,7 +1673,7 @@ export class PivotHeaderLayoutMap {
|
|
|
1641
1673
|
}
|
|
1642
1674
|
} else {
|
|
1643
1675
|
const chartSpec = this.getRawChartSpec(_col, _row);
|
|
1644
|
-
if (chartSpec && (dimensionKey = "xField" === type ? "histogram" === chartSpec.type ? chartSpec.x2Field : null !== (_o = chartSpec.xField) && void 0 !== _o ? _o : null === (_q = null === (_p = null == chartSpec ? void 0 : chartSpec.series) || void 0 === _p ? void 0 : _p[0]) || void 0 === _q ? void 0 : _q.xField : null !== (_r = chartSpec.yField) && void 0 !== _r ? _r : null === (_t = null === (_s = null == chartSpec ? void 0 : chartSpec.series) || void 0 === _s ? void 0 : _s[0]) || void 0 === _t ? void 0 : _t.yField,
|
|
1676
|
+
if (chartSpec && (dimensionKey = "xField" === type ? "histogram" === chartSpec.type ? chartSpec.x2Field : null !== (_o = chartSpec.xField) && void 0 !== _o ? _o : null === (_q = null === (_p = null == chartSpec ? void 0 : chartSpec.series) || void 0 === _p ? void 0 : _p[0]) || void 0 === _q ? void 0 : _q.xField : "histogram" === chartSpec.type ? chartSpec.y2Field : null !== (_r = chartSpec.yField) && void 0 !== _r ? _r : null === (_t = null === (_s = null == chartSpec ? void 0 : chartSpec.series) || void 0 === _s ? void 0 : _s[0]) || void 0 === _t ? void 0 : _t.yField,
|
|
1645
1677
|
dimensionKey)) return dimensionKey;
|
|
1646
1678
|
for (let i = 0; i < this.indicatorsDefine.length; i++) {
|
|
1647
1679
|
const chartSpec = this.indicatorsDefine[i].chartSpec;
|
|
@@ -1760,7 +1792,7 @@ export class PivotHeaderLayoutMap {
|
|
|
1760
1792
|
get topAxesCount() {
|
|
1761
1793
|
if (!this._table.isPivotChart()) return 0;
|
|
1762
1794
|
const axisOption = this._table.pivotChartAxes.find((axisOption => "top" === axisOption.orient));
|
|
1763
|
-
return !1 === (null == axisOption ? void 0 : axisOption.visible) ? 0 : this.indicatorsAsCol && this.
|
|
1795
|
+
return !1 === (null == axisOption ? void 0 : axisOption.visible) ? 0 : this.indicatorsAsCol && this.hasTopIndicatorAxis ? 1 : 0;
|
|
1764
1796
|
}
|
|
1765
1797
|
get rightAxesCount() {
|
|
1766
1798
|
return this.rightFrozenColCount;
|