@visactor/vtable 1.22.4-alpha.5 → 1.22.5-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/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 +2 -1
- 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 +2 -2
- package/cjs/core/BaseTable.js +5 -5
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/dataset/dataset-pivot-table.js +1 -2
- package/cjs/edit/edit-manager.js +1 -0
- package/cjs/edit/edit-manager.js.map +1 -1
- package/cjs/edit/editors.js +2 -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 +19 -16
- package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
- package/cjs/layout/pivot-header-layout.d.ts +1 -0
- package/cjs/layout/pivot-header-layout.js +39 -31
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/scenegraph/component/menu.d.ts +41 -0
- package/cjs/scenegraph/graphic/active-cell-chart-list.d.ts +13 -0
- package/cjs/scenegraph/graphic/active-cell-chart-list.js +118 -0
- package/cjs/scenegraph/graphic/active-cell-chart-list.js.map +1 -0
- package/cjs/scenegraph/graphic/chart.d.ts +6 -2
- package/cjs/scenegraph/graphic/chart.js +49 -14
- package/cjs/scenegraph/graphic/chart.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render.js +2 -2
- package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.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 +1 -1
- 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 +1 -1
- package/cjs/state/state.js.map +1 -1
- package/cjs/themes/theme-define.js +16 -16
- package/cjs/themes/theme-define.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +2 -2
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +12 -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 +635 -117
- package/dist/vtable.min.js +2 -2
- 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 +2 -1
- 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 +2 -2
- package/es/core/BaseTable.js +5 -5
- package/es/core/BaseTable.js.map +1 -1
- package/es/dataset/dataset-pivot-table.js +1 -2
- package/es/edit/edit-manager.js +1 -0
- package/es/edit/edit-manager.js.map +1 -1
- package/es/edit/editors.js +2 -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 +19 -16
- package/es/layout/chart-helper/get-axis-config.js.map +1 -1
- package/es/layout/pivot-header-layout.d.ts +1 -0
- package/es/layout/pivot-header-layout.js +36 -26
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/scenegraph/component/menu.d.ts +41 -0
- package/es/scenegraph/graphic/active-cell-chart-list.d.ts +13 -0
- package/es/scenegraph/graphic/active-cell-chart-list.js +107 -0
- package/es/scenegraph/graphic/active-cell-chart-list.js.map +1 -0
- package/es/scenegraph/graphic/chart.d.ts +6 -2
- package/es/scenegraph/graphic/chart.js +49 -13
- package/es/scenegraph/graphic/chart.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render.js +2 -2
- package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +1 -1
- package/es/scenegraph/group-creater/cell-helper.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 +1 -1
- 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 +1 -1
- package/es/state/state.js.map +1 -1
- package/es/themes/theme-define.js +12 -12
- package/es/themes/theme-define.js.map +1 -1
- package/es/ts-types/base-table.d.ts +2 -2
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +12 -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 +9 -9
package/dist/vtable.js
CHANGED
|
@@ -22516,7 +22516,7 @@
|
|
|
22516
22516
|
|
|
22517
22517
|
var AXIS_ELEMENT_NAME;
|
|
22518
22518
|
!function (AXIS_ELEMENT_NAME) {
|
|
22519
|
-
AXIS_ELEMENT_NAME.innerView = "inner-view", AXIS_ELEMENT_NAME.axisContainer = "axis-container", AXIS_ELEMENT_NAME.labelContainer = "axis-label-container", AXIS_ELEMENT_NAME.tickContainer = "axis-tick-container", AXIS_ELEMENT_NAME.tick = "axis-tick", AXIS_ELEMENT_NAME.subTick = "axis-sub-tick", AXIS_ELEMENT_NAME.label = "axis-label", AXIS_ELEMENT_NAME.title = "axis-title", AXIS_ELEMENT_NAME.gridContainer = "axis-grid-container", AXIS_ELEMENT_NAME.grid = "axis-grid", AXIS_ELEMENT_NAME.gridRegion = "axis-grid-region", AXIS_ELEMENT_NAME.line = "axis-line", AXIS_ELEMENT_NAME.background = "axis-background", AXIS_ELEMENT_NAME.axisLabelBackground = "axis-label-background", AXIS_ELEMENT_NAME.axisBreak = "axis-break", AXIS_ELEMENT_NAME.axisBreakSymbol = "axis-break-symbol";
|
|
22519
|
+
AXIS_ELEMENT_NAME.innerView = "inner-view", AXIS_ELEMENT_NAME.axisContainer = "axis-container", AXIS_ELEMENT_NAME.labelContainer = "axis-label-container", AXIS_ELEMENT_NAME.tickContainer = "axis-tick-container", AXIS_ELEMENT_NAME.tick = "axis-tick", AXIS_ELEMENT_NAME.subTick = "axis-sub-tick", AXIS_ELEMENT_NAME.label = "axis-label", AXIS_ELEMENT_NAME.title = "axis-title", AXIS_ELEMENT_NAME.labelHoverOnAxis = "axis-label-hover-on-axis", AXIS_ELEMENT_NAME.gridContainer = "axis-grid-container", AXIS_ELEMENT_NAME.grid = "axis-grid", AXIS_ELEMENT_NAME.gridRegion = "axis-grid-region", AXIS_ELEMENT_NAME.line = "axis-line", AXIS_ELEMENT_NAME.background = "axis-background", AXIS_ELEMENT_NAME.axisLabelBackground = "axis-label-background", AXIS_ELEMENT_NAME.axisBreak = "axis-break", AXIS_ELEMENT_NAME.axisBreakSymbol = "axis-break-symbol";
|
|
22520
22520
|
}(AXIS_ELEMENT_NAME || (AXIS_ELEMENT_NAME = {}));
|
|
22521
22521
|
var AxisStateValue;
|
|
22522
22522
|
!function (AxisStateValue) {
|
|
@@ -22553,6 +22553,26 @@
|
|
|
22553
22553
|
fillOpacity: 1
|
|
22554
22554
|
}
|
|
22555
22555
|
},
|
|
22556
|
+
labelHoverOnAxis: {
|
|
22557
|
+
visible: !1,
|
|
22558
|
+
space: 7,
|
|
22559
|
+
padding: 2,
|
|
22560
|
+
position: 0,
|
|
22561
|
+
autoRotate: !1,
|
|
22562
|
+
textStyle: {
|
|
22563
|
+
fontSize: 12,
|
|
22564
|
+
fill: "red",
|
|
22565
|
+
fontWeight: "normal",
|
|
22566
|
+
fillOpacity: 1
|
|
22567
|
+
},
|
|
22568
|
+
background: {
|
|
22569
|
+
visible: !0,
|
|
22570
|
+
style: {
|
|
22571
|
+
cornerRadius: 2,
|
|
22572
|
+
fill: "black"
|
|
22573
|
+
}
|
|
22574
|
+
}
|
|
22575
|
+
},
|
|
22556
22576
|
tick: {
|
|
22557
22577
|
visible: !0,
|
|
22558
22578
|
inside: !1,
|
|
@@ -24391,14 +24411,15 @@
|
|
|
24391
24411
|
return delayAfterValue > 0 && (totalDelay += delayAfterValue), totalDelay > 0 && animate.wait(totalDelay), loop && loop > 0 && animate.loop(loop), bounce && animate.bounce(!0), animate;
|
|
24392
24412
|
}
|
|
24393
24413
|
_handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic) {
|
|
24394
|
-
var _a, _b, _c, _d, _e, _f;
|
|
24414
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
24395
24415
|
if (custom && customType) {
|
|
24396
|
-
|
|
24397
|
-
|
|
24398
|
-
|
|
24399
|
-
|
|
24400
|
-
|
|
24401
|
-
|
|
24416
|
+
let customParams = this.resolveValue(customParameters, graphic);
|
|
24417
|
+
"function" == typeof customParams && (customParams = customParams(null === (_b = null === (_a = graphic.context) || void 0 === _a ? void 0 : _a.data) || void 0 === _b ? void 0 : _b[0], graphic, {})), customParams = Object.assign({
|
|
24418
|
+
width: (null === (_c = graphic.stage) || void 0 === _c ? void 0 : _c.width) || 0,
|
|
24419
|
+
height: (null === (_d = graphic.stage) || void 0 === _d ? void 0 : _d.height) || 0,
|
|
24420
|
+
group: this._target.parent
|
|
24421
|
+
}, customParams);
|
|
24422
|
+
const objOptions = isFunction$7(options) ? options.call(null, null !== (_f = customParams && (null === (_e = customParams.data) || void 0 === _e ? void 0 : _e[0])) && void 0 !== _f ? _f : null === (_h = null === (_g = graphic.context) || void 0 === _g ? void 0 : _g.data) || void 0 === _h ? void 0 : _h[0], graphic, customParams) : options;
|
|
24402
24423
|
customParams.options = objOptions, customParams.controlOptions = controlOptions, 1 === customType ? this.createCustomAnimation(animate, custom, from, props, duration, easing, customParams) : 2 === customType && this.createCustomInterpolatorAnimation(animate, custom, props, duration, easing, customParams);
|
|
24403
24424
|
} else "to" === type ? animate.to(props, duration, easing) : "from" === type && animate.from(props, duration, easing);
|
|
24404
24425
|
}
|
|
@@ -29071,7 +29092,17 @@
|
|
|
29071
29092
|
loadLineAxisComponent();
|
|
29072
29093
|
class LineAxis extends AxisBase {
|
|
29073
29094
|
constructor(attributes, options) {
|
|
29074
|
-
|
|
29095
|
+
var _a;
|
|
29096
|
+
if (attributes.labelHoverOnAxis && (attributes.labelHoverOnAxis.textStyle = Object.assign({}, attributes.label.style, attributes.labelHoverOnAxis.textStyle), void 0 === attributes.labelHoverOnAxis.space)) {
|
|
29097
|
+
const {
|
|
29098
|
+
padding = 2
|
|
29099
|
+
} = attributes.labelHoverOnAxis,
|
|
29100
|
+
parsedPadding = normalizePadding(padding),
|
|
29101
|
+
toDiffPadding = "bottom" === attributes.orient ? parsedPadding[0] : "left" === attributes.orient ? parsedPadding[1] : "top" === attributes.orient ? parsedPadding[2] : parsedPadding[3],
|
|
29102
|
+
space = (null !== (_a = attributes.label.space) && void 0 !== _a ? _a : LineAxis.defaultAttributes.label.space) - toDiffPadding;
|
|
29103
|
+
attributes.labelHoverOnAxis.space = space;
|
|
29104
|
+
}
|
|
29105
|
+
super((null == options ? void 0 : options.skipDefault) ? attributes : merge$2({}, LineAxis.defaultAttributes, attributes), options), this.labelHoverOnAxisGroup = null;
|
|
29075
29106
|
}
|
|
29076
29107
|
_renderInner(container) {
|
|
29077
29108
|
var _a;
|
|
@@ -29133,6 +29164,15 @@
|
|
|
29133
29164
|
}, panel.style));
|
|
29134
29165
|
bgRect.name = AXIS_ELEMENT_NAME.background, bgRect.id = this._getNodeId("background"), bgRect.states = merge$2({}, DEFAULT_STATES$1, null !== (_a = panel.state) && void 0 !== _a ? _a : {}), axisContainer.insertBefore(bgRect, axisContainer.firstChild);
|
|
29135
29166
|
}
|
|
29167
|
+
const {
|
|
29168
|
+
labelHoverOnAxis: labelHoverOnAxis
|
|
29169
|
+
} = this.attribute;
|
|
29170
|
+
labelHoverOnAxis && labelHoverOnAxis.visible && this.renderLabelHoverOnAxis();
|
|
29171
|
+
}
|
|
29172
|
+
renderLabelHoverOnAxis() {
|
|
29173
|
+
const hoverOnLabelAttributes = this.getLabelHoverOnAxisAttribute(),
|
|
29174
|
+
hoverOnLabel = new Tag$1(Object.assign({}, hoverOnLabelAttributes));
|
|
29175
|
+
hoverOnLabel.name = AXIS_ELEMENT_NAME.title, hoverOnLabel.id = this._getNodeId("hover-on-label"), this.labelHoverOnAxisGroup = hoverOnLabel, this.axisContainer.add(hoverOnLabel);
|
|
29136
29176
|
}
|
|
29137
29177
|
renderLine(container) {
|
|
29138
29178
|
const {
|
|
@@ -29273,6 +29313,66 @@
|
|
|
29273
29313
|
visible: !0
|
|
29274
29314
|
}, background.style)), attrs;
|
|
29275
29315
|
}
|
|
29316
|
+
getLabelHoverOnAxisAttribute() {
|
|
29317
|
+
var _a, _b;
|
|
29318
|
+
const {
|
|
29319
|
+
orient: orient
|
|
29320
|
+
} = this.attribute,
|
|
29321
|
+
_c = this.attribute.labelHoverOnAxis,
|
|
29322
|
+
{
|
|
29323
|
+
position = 0,
|
|
29324
|
+
space = 4,
|
|
29325
|
+
autoRotate = !0,
|
|
29326
|
+
textStyle = {},
|
|
29327
|
+
background = {},
|
|
29328
|
+
formatMethod: formatMethod,
|
|
29329
|
+
text: textContent = "",
|
|
29330
|
+
maxWidth: maxWidth
|
|
29331
|
+
} = _c,
|
|
29332
|
+
restAttrs = __rest$1(_c, ["position", "space", "autoRotate", "textStyle", "background", "formatMethod", "text", "maxWidth"]),
|
|
29333
|
+
point = this.getTickCoord(0);
|
|
29334
|
+
"bottom" === orient || "top" === orient ? point.x = position : point.y = position;
|
|
29335
|
+
let tickLength = 0;
|
|
29336
|
+
(null === (_a = this.attribute.tick) || void 0 === _a ? void 0 : _a.visible) && !1 === this.attribute.tick.inside && (tickLength = this.attribute.tick.length || 4), (null === (_b = this.attribute.subTick) || void 0 === _b ? void 0 : _b.visible) && !1 === this.attribute.subTick.inside && (tickLength = Math.max(tickLength, this.attribute.subTick.length || 2));
|
|
29337
|
+
const offset = tickLength + 0 + space,
|
|
29338
|
+
labelPoint = this.getVerticalCoord(point, offset, !1),
|
|
29339
|
+
vector = this.getVerticalVector(offset, !1, {
|
|
29340
|
+
x: 0,
|
|
29341
|
+
y: 0
|
|
29342
|
+
});
|
|
29343
|
+
let textBaseline,
|
|
29344
|
+
{
|
|
29345
|
+
angle: angle
|
|
29346
|
+
} = restAttrs,
|
|
29347
|
+
textAlign = "center";
|
|
29348
|
+
if (isNil$5(angle) && autoRotate) {
|
|
29349
|
+
const axisVector = this.getRelativeVector();
|
|
29350
|
+
angle = angleTo(axisVector, [1, 0], !0);
|
|
29351
|
+
const {
|
|
29352
|
+
verticalFactor = 1
|
|
29353
|
+
} = this.attribute;
|
|
29354
|
+
textBaseline = 1 === -1 * verticalFactor ? "bottom" : "top";
|
|
29355
|
+
} else {
|
|
29356
|
+
const {
|
|
29357
|
+
textAlign: textAlign2,
|
|
29358
|
+
textBaseline: textBaseline2
|
|
29359
|
+
} = this.getLabelAlign(vector, !1, textStyle.angle);
|
|
29360
|
+
textAlign = textAlign2, textBaseline = textBaseline2;
|
|
29361
|
+
}
|
|
29362
|
+
const maxTagWidth = maxWidth,
|
|
29363
|
+
text = formatMethod ? formatMethod(textContent) : textContent,
|
|
29364
|
+
attrs = Object.assign(Object.assign(Object.assign({}, labelPoint), restAttrs), {
|
|
29365
|
+
maxWidth: maxTagWidth,
|
|
29366
|
+
textStyle: Object.assign({
|
|
29367
|
+
textAlign: textAlign,
|
|
29368
|
+
textBaseline: textBaseline
|
|
29369
|
+
}, textStyle),
|
|
29370
|
+
text: text
|
|
29371
|
+
});
|
|
29372
|
+
return attrs.angle = angle, background && background.visible && (attrs.panel = Object.assign(Object.assign({
|
|
29373
|
+
visible: !0
|
|
29374
|
+
}, restAttrs.panel), background.style)), attrs;
|
|
29375
|
+
}
|
|
29276
29376
|
getTextBaseline(vector, inside) {
|
|
29277
29377
|
let base = "middle";
|
|
29278
29378
|
const {
|
|
@@ -29463,6 +29563,40 @@
|
|
|
29463
29563
|
}
|
|
29464
29564
|
return limitLength && (limitLength = (limitLength - labelSpace - titleSpacing - titleHeight - axisLineWidth - tickLength) / layerCount), limitLength;
|
|
29465
29565
|
}
|
|
29566
|
+
showLabelHoverOnAxis(position, text, adjustPosition = !0) {
|
|
29567
|
+
if (this.attribute.labelHoverOnAxis) {
|
|
29568
|
+
const preContainerBounds = this.axisContainer.AABBBounds,
|
|
29569
|
+
preWidth = preContainerBounds.width(),
|
|
29570
|
+
preHeight = preContainerBounds.height(),
|
|
29571
|
+
preX1 = preContainerBounds.x1,
|
|
29572
|
+
preY1 = preContainerBounds.y1,
|
|
29573
|
+
preX2 = preContainerBounds.x2,
|
|
29574
|
+
preY2 = preContainerBounds.y2;
|
|
29575
|
+
if (this.labelHoverOnAxisGroup) {
|
|
29576
|
+
const {
|
|
29577
|
+
formatMethod: formatMethod
|
|
29578
|
+
} = this.attribute.labelHoverOnAxis,
|
|
29579
|
+
textStr = formatMethod ? formatMethod(text) : text;
|
|
29580
|
+
this.labelHoverOnAxisGroup.setAttribute("text", textStr), this.labelHoverOnAxisGroup.setAttribute("visible", !0), this.labelHoverOnAxisGroup.setAttribute("visibleAll", !0), "left" === this.attribute.orient || "right" === this.attribute.orient ? this.labelHoverOnAxisGroup.setAttributes({
|
|
29581
|
+
y: position
|
|
29582
|
+
}) : this.labelHoverOnAxisGroup.setAttributes({
|
|
29583
|
+
x: position
|
|
29584
|
+
});
|
|
29585
|
+
} else this.attribute.labelHoverOnAxis.visible = !0, this.attribute.labelHoverOnAxis.position = position, this.attribute.labelHoverOnAxis.text = text, this.renderLabelHoverOnAxis();
|
|
29586
|
+
if (adjustPosition) {
|
|
29587
|
+
const afterContainerBounds = this.axisContainer.AABBBounds,
|
|
29588
|
+
diffWidth = afterContainerBounds.width() - preWidth,
|
|
29589
|
+
diffHeight = afterContainerBounds.height() - preHeight;
|
|
29590
|
+
diffWidth > 0 && ("top" === this.attribute.orient || "bottom" === this.attribute.orient) && (afterContainerBounds.x1 < preX1 ? this.showLabelHoverOnAxis(position + diffWidth, text, !1) : afterContainerBounds.x2 > preX2 && this.showLabelHoverOnAxis(position - diffWidth, text, !1)), diffHeight > 0 && ("left" === this.attribute.orient || "right" === this.attribute.orient) && (afterContainerBounds.y1 < preY1 ? this.showLabelHoverOnAxis(position + diffHeight, text, !1) : afterContainerBounds.y2 > preY2 && this.showLabelHoverOnAxis(position - diffHeight, text, !1));
|
|
29591
|
+
}
|
|
29592
|
+
}
|
|
29593
|
+
}
|
|
29594
|
+
hideLabelHoverOnAxis() {
|
|
29595
|
+
this.attribute.labelHoverOnAxis && this.labelHoverOnAxisGroup && this.labelHoverOnAxisGroup.setAttributes({
|
|
29596
|
+
visible: !1,
|
|
29597
|
+
visibleAll: !1
|
|
29598
|
+
});
|
|
29599
|
+
}
|
|
29466
29600
|
release() {
|
|
29467
29601
|
super.release(), this._breaks = null;
|
|
29468
29602
|
}
|
|
@@ -37521,14 +37655,18 @@
|
|
|
37521
37655
|
},
|
|
37522
37656
|
get inlineColumnBgColor() {
|
|
37523
37657
|
return (defaultStyle.hover?.inlineColumnBgColor ??
|
|
37524
|
-
(defaultStyle.hover?.cellBgColor &&
|
|
37658
|
+
(defaultStyle.hover?.cellBgColor &&
|
|
37659
|
+
typeof defaultStyle.hover?.cellBgColor === 'string' &&
|
|
37660
|
+
defaultStyle.hover?.cellBgColor !== 'transparent'
|
|
37525
37661
|
? changeColor(defaultStyle.hover?.cellBgColor, 0.1, false)
|
|
37526
37662
|
: undefined) ??
|
|
37527
37663
|
undefined);
|
|
37528
37664
|
},
|
|
37529
37665
|
get inlineRowBgColor() {
|
|
37530
37666
|
return (defaultStyle.hover?.inlineRowBgColor ??
|
|
37531
|
-
(defaultStyle.hover?.cellBgColor &&
|
|
37667
|
+
(defaultStyle.hover?.cellBgColor &&
|
|
37668
|
+
typeof defaultStyle.hover?.cellBgColor === 'string' &&
|
|
37669
|
+
defaultStyle.hover?.cellBgColor !== 'transparent'
|
|
37532
37670
|
? changeColor(defaultStyle.hover?.cellBgColor, 0.1, false)
|
|
37533
37671
|
: undefined) ??
|
|
37534
37672
|
undefined);
|
|
@@ -37543,7 +37681,9 @@
|
|
|
37543
37681
|
get inlineColumnBgColor() {
|
|
37544
37682
|
return (defaultStyle.select?.inlineColumnBgColor ??
|
|
37545
37683
|
that.selectionStyle?.inlineColumnBgColor ??
|
|
37546
|
-
(that.selectionStyle?.cellBgColor &&
|
|
37684
|
+
(that.selectionStyle?.cellBgColor &&
|
|
37685
|
+
typeof that.selectionStyle.cellBgColor === 'string' &&
|
|
37686
|
+
that.selectionStyle.cellBgColor !== 'transparent'
|
|
37547
37687
|
? changeColor(that.selectionStyle.cellBgColor, 0.1, false)
|
|
37548
37688
|
: undefined) ??
|
|
37549
37689
|
undefined);
|
|
@@ -37551,7 +37691,9 @@
|
|
|
37551
37691
|
get inlineRowBgColor() {
|
|
37552
37692
|
return (defaultStyle.select?.inlineRowBgColor ??
|
|
37553
37693
|
that.selectionStyle.inlineRowBgColor ??
|
|
37554
|
-
(that.selectionStyle?.cellBgColor &&
|
|
37694
|
+
(that.selectionStyle?.cellBgColor &&
|
|
37695
|
+
typeof that.selectionStyle.cellBgColor === 'string' &&
|
|
37696
|
+
that.selectionStyle.cellBgColor !== 'transparent'
|
|
37555
37697
|
? changeColor(that.selectionStyle.cellBgColor, 0.1, false)
|
|
37556
37698
|
: undefined) ??
|
|
37557
37699
|
undefined);
|
|
@@ -38071,14 +38213,18 @@
|
|
|
38071
38213
|
},
|
|
38072
38214
|
get inlineColumnBgColor() {
|
|
38073
38215
|
return (style.hover?.inlineColumnBgColor ??
|
|
38074
|
-
(style.hover?.cellBgColor &&
|
|
38216
|
+
(style.hover?.cellBgColor &&
|
|
38217
|
+
typeof style.hover?.cellBgColor === 'string' &&
|
|
38218
|
+
style.hover?.cellBgColor !== 'transparent'
|
|
38075
38219
|
? changeColor(style.hover?.cellBgColor, 0.1, false)
|
|
38076
38220
|
: undefined) ??
|
|
38077
38221
|
undefined);
|
|
38078
38222
|
},
|
|
38079
38223
|
get inlineRowBgColor() {
|
|
38080
38224
|
return (style.hover?.inlineRowBgColor ??
|
|
38081
|
-
(style.hover?.cellBgColor &&
|
|
38225
|
+
(style.hover?.cellBgColor &&
|
|
38226
|
+
typeof style.hover?.cellBgColor === 'string' &&
|
|
38227
|
+
style.hover?.cellBgColor !== 'transparent'
|
|
38082
38228
|
? changeColor(style.hover?.cellBgColor, 0.1, false)
|
|
38083
38229
|
: undefined) ??
|
|
38084
38230
|
undefined);
|
|
@@ -38092,7 +38238,9 @@
|
|
|
38092
38238
|
get inlineColumnBgColor() {
|
|
38093
38239
|
return (style.select?.inlineColumnBgColor ??
|
|
38094
38240
|
that.selectionStyle?.inlineColumnBgColor ??
|
|
38095
|
-
(that.selectionStyle?.cellBgColor &&
|
|
38241
|
+
(that.selectionStyle?.cellBgColor &&
|
|
38242
|
+
typeof that.selectionStyle.cellBgColor === 'string' &&
|
|
38243
|
+
that.selectionStyle.cellBgColor !== 'transparent'
|
|
38096
38244
|
? changeColor(that.selectionStyle.cellBgColor, 0.1, false)
|
|
38097
38245
|
: undefined) ??
|
|
38098
38246
|
undefined);
|
|
@@ -38100,7 +38248,9 @@
|
|
|
38100
38248
|
get inlineRowBgColor() {
|
|
38101
38249
|
return (style.select?.inlineRowBgColor ??
|
|
38102
38250
|
that.selectionStyle.inlineRowBgColor ??
|
|
38103
|
-
(that.selectionStyle?.cellBgColor &&
|
|
38251
|
+
(that.selectionStyle?.cellBgColor &&
|
|
38252
|
+
typeof that.selectionStyle.cellBgColor === 'string' &&
|
|
38253
|
+
that.selectionStyle.cellBgColor !== 'transparent'
|
|
38104
38254
|
? changeColor(that.selectionStyle.cellBgColor, 0.1, false)
|
|
38105
38255
|
: undefined) ??
|
|
38106
38256
|
undefined);
|
|
@@ -45005,7 +45155,7 @@
|
|
|
45005
45155
|
const axisConfig = table.internalProps.layoutMap.getAxisConfigInPivotChart(col, row);
|
|
45006
45156
|
if (axisConfig) {
|
|
45007
45157
|
const CartesianAxis = Factory.getComponent('axis');
|
|
45008
|
-
const axis = new CartesianAxis(axisConfig, cellGroup.attribute.width, cellGroup.attribute.height, axisConfig.
|
|
45158
|
+
const axis = new CartesianAxis(axisConfig, cellGroup.attribute.width, cellGroup.attribute.height, axisConfig.__vtableBodyChartCellPadding ?? padding, table);
|
|
45009
45159
|
cellGroup.clear();
|
|
45010
45160
|
cellGroup.appendChild(axis.component);
|
|
45011
45161
|
axis.overlap();
|
|
@@ -46986,7 +47136,7 @@
|
|
|
46986
47136
|
const padding = getQuadProps(getProp('padding', cellStyle, col, row, scene.table));
|
|
46987
47137
|
if (axisConfig) {
|
|
46988
47138
|
const CartesianAxis = Factory.getComponent('axis');
|
|
46989
|
-
const axis = new CartesianAxis(axisConfig, cellGroup.attribute.width, cellGroup.attribute.height, axisConfig.
|
|
47139
|
+
const axis = new CartesianAxis(axisConfig, cellGroup.attribute.width, cellGroup.attribute.height, axisConfig.__vtableBodyChartCellPadding ?? padding, scene.table);
|
|
46990
47140
|
cellGroup.clear();
|
|
46991
47141
|
cellGroup.appendChild(axis.component);
|
|
46992
47142
|
axis.overlap();
|
|
@@ -48821,12 +48971,199 @@
|
|
|
48821
48971
|
return hoverMode;
|
|
48822
48972
|
}
|
|
48823
48973
|
|
|
48974
|
+
const chartInstanceListColumnByColumnDirection = {};
|
|
48975
|
+
const chartInstanceListRowByRowDirection = {};
|
|
48976
|
+
function generateChartInstanceListByColumnDirection(col, dimensionValueOrXValue, positionValueOrYValue, canvasXY, table, hideTooltip = false, isScatter = false) {
|
|
48977
|
+
if (!isValid$3(chartInstanceListColumnByColumnDirection[col])) {
|
|
48978
|
+
chartInstanceListColumnByColumnDirection[col] = {};
|
|
48979
|
+
}
|
|
48980
|
+
const { rowStart } = table.getBodyVisibleRowRange();
|
|
48981
|
+
let rowEnd = table.getBodyVisibleRowRange().rowEnd;
|
|
48982
|
+
rowEnd = Math.min(table.rowCount - 1 - table.bottomFrozenRowCount, rowEnd);
|
|
48983
|
+
for (let i = rowStart; i <= rowEnd; i++) {
|
|
48984
|
+
const cellGroup = table.scenegraph.getCell(col, i);
|
|
48985
|
+
const chartNode = cellGroup?.getChildren()?.[0];
|
|
48986
|
+
chartNode.addUpdateShapeAndBoundsTag();
|
|
48987
|
+
if (chartInstanceListColumnByColumnDirection[col][i]) ;
|
|
48988
|
+
else if (isValid$3(chartNode)) {
|
|
48989
|
+
if (chartNode.activeChartInstance) {
|
|
48990
|
+
chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance;
|
|
48991
|
+
}
|
|
48992
|
+
else {
|
|
48993
|
+
chartNode.activate(table);
|
|
48994
|
+
chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance;
|
|
48995
|
+
}
|
|
48996
|
+
}
|
|
48997
|
+
if (table.stateManager.hover.cellPos.col !== col || table.stateManager.hover.cellPos.row !== i) {
|
|
48998
|
+
setTimeout(() => {
|
|
48999
|
+
if (chartInstanceListColumnByColumnDirection[col]?.[i]) {
|
|
49000
|
+
const absolutePosition = table.getCellRelativeRect(col, i);
|
|
49001
|
+
const chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
49002
|
+
let isShowTooltip = !isScatter;
|
|
49003
|
+
if (!isScatter && typeof chartDimensionLinkage === 'object') {
|
|
49004
|
+
isShowTooltip = chartDimensionLinkage.showTooltip ?? true;
|
|
49005
|
+
if (i === rowEnd && isShowTooltip) {
|
|
49006
|
+
const heightLimitToShowTooltipForLastRow = chartDimensionLinkage.heightLimitToShowTooltipForLastRow;
|
|
49007
|
+
const { rowEnd: rowEnd1 } = table.getBodyVisibleRowRange(-heightLimitToShowTooltipForLastRow);
|
|
49008
|
+
if (rowEnd1 === rowEnd) {
|
|
49009
|
+
isShowTooltip = true;
|
|
49010
|
+
}
|
|
49011
|
+
else {
|
|
49012
|
+
const { rowEnd: rowEnd2 } = table.getBodyVisibleRowRange(5);
|
|
49013
|
+
if (rowEnd2 !== rowEnd) {
|
|
49014
|
+
isShowTooltip = true;
|
|
49015
|
+
}
|
|
49016
|
+
else {
|
|
49017
|
+
isShowTooltip = false;
|
|
49018
|
+
}
|
|
49019
|
+
}
|
|
49020
|
+
}
|
|
49021
|
+
}
|
|
49022
|
+
if (isScatter) {
|
|
49023
|
+
chartInstanceListColumnByColumnDirection[col][i].showCrosshair?.((axis) => {
|
|
49024
|
+
if (axis.layoutOrient === 'left') {
|
|
49025
|
+
return positionValueOrYValue;
|
|
49026
|
+
}
|
|
49027
|
+
return dimensionValueOrXValue;
|
|
49028
|
+
});
|
|
49029
|
+
}
|
|
49030
|
+
else {
|
|
49031
|
+
if (hideTooltip) {
|
|
49032
|
+
chartInstanceListColumnByColumnDirection[col][i].hideTooltip();
|
|
49033
|
+
}
|
|
49034
|
+
else {
|
|
49035
|
+
chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
49036
|
+
tooltip: isShowTooltip,
|
|
49037
|
+
showTooltipOption: { x: canvasXY.x, y: absolutePosition.top + 3, activeType: 'dimension' }
|
|
49038
|
+
});
|
|
49039
|
+
}
|
|
49040
|
+
}
|
|
49041
|
+
}
|
|
49042
|
+
}, 0);
|
|
49043
|
+
}
|
|
49044
|
+
table.scenegraph.updateNextFrame();
|
|
49045
|
+
}
|
|
49046
|
+
}
|
|
49047
|
+
function clearChartInstanceListByColumnDirection(col, excludedRow, table) {
|
|
49048
|
+
if (isValid$3(chartInstanceListColumnByColumnDirection[col])) {
|
|
49049
|
+
for (const i in chartInstanceListColumnByColumnDirection[col]) {
|
|
49050
|
+
if (isValid$3(excludedRow) && Number(i) === excludedRow) {
|
|
49051
|
+
continue;
|
|
49052
|
+
}
|
|
49053
|
+
const cellGroup = table.scenegraph.getCell(col, Number(i));
|
|
49054
|
+
const chartNode = cellGroup?.getChildren()?.[0];
|
|
49055
|
+
chartNode.addUpdateShapeAndBoundsTag();
|
|
49056
|
+
if (isValid$3(chartNode)) {
|
|
49057
|
+
chartNode.deactivate(table, {
|
|
49058
|
+
releaseChartInstance: true,
|
|
49059
|
+
releaseColumnChartInstance: false,
|
|
49060
|
+
releaseRowChartInstance: false
|
|
49061
|
+
});
|
|
49062
|
+
chartInstanceListColumnByColumnDirection[col][i] = null;
|
|
49063
|
+
}
|
|
49064
|
+
}
|
|
49065
|
+
delete chartInstanceListColumnByColumnDirection[col];
|
|
49066
|
+
}
|
|
49067
|
+
}
|
|
49068
|
+
function generateChartInstanceListByRowDirection(row, dimensionValueOrXValue, positionValueOrYValue, canvasXY, table, hideTooltip = false, isScatter = false) {
|
|
49069
|
+
if (!isValid$3(chartInstanceListRowByRowDirection[row])) {
|
|
49070
|
+
chartInstanceListRowByRowDirection[row] = {};
|
|
49071
|
+
}
|
|
49072
|
+
const { colStart } = table.getBodyVisibleColRange();
|
|
49073
|
+
let colEnd = table.getBodyVisibleColRange().colEnd;
|
|
49074
|
+
colEnd = Math.min(table.colCount - 1 - table.rightFrozenColCount, colEnd);
|
|
49075
|
+
for (let i = colStart; i <= colEnd; i++) {
|
|
49076
|
+
const cellGroup = table.scenegraph.getCell(i, row);
|
|
49077
|
+
const chartNode = cellGroup?.getChildren()?.[0];
|
|
49078
|
+
chartNode.addUpdateShapeAndBoundsTag();
|
|
49079
|
+
if (chartInstanceListRowByRowDirection[row][i]) ;
|
|
49080
|
+
else if (isValid$3(chartNode)) {
|
|
49081
|
+
if (chartNode.activeChartInstance) {
|
|
49082
|
+
chartInstanceListRowByRowDirection[row][i] = chartNode.activeChartInstance;
|
|
49083
|
+
}
|
|
49084
|
+
else {
|
|
49085
|
+
chartNode.activate(table);
|
|
49086
|
+
chartInstanceListRowByRowDirection[row][i] = chartNode.activeChartInstance;
|
|
49087
|
+
}
|
|
49088
|
+
}
|
|
49089
|
+
if (table.stateManager.hover.cellPos.col !== i || table.stateManager.hover.cellPos.row !== row) {
|
|
49090
|
+
setTimeout(() => {
|
|
49091
|
+
if (chartInstanceListRowByRowDirection[row]?.[i]) {
|
|
49092
|
+
const absolutePosition = table.getCellRelativeRect(i, row);
|
|
49093
|
+
const chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
49094
|
+
let isShowTooltip = !isScatter;
|
|
49095
|
+
if (!isScatter && typeof chartDimensionLinkage === 'object') {
|
|
49096
|
+
isShowTooltip = chartDimensionLinkage.showTooltip ?? true;
|
|
49097
|
+
if (i === colEnd && isShowTooltip) {
|
|
49098
|
+
const widthLimitToShowTooltipForLastColumn = chartDimensionLinkage.widthLimitToShowTooltipForLastColumn;
|
|
49099
|
+
const { colEnd: colEnd1 } = table.getBodyVisibleColRange(-widthLimitToShowTooltipForLastColumn);
|
|
49100
|
+
if (colEnd1 === colEnd) {
|
|
49101
|
+
isShowTooltip = true;
|
|
49102
|
+
}
|
|
49103
|
+
else {
|
|
49104
|
+
const { colEnd: colEnd2 } = table.getBodyVisibleColRange(5);
|
|
49105
|
+
if (colEnd2 !== colEnd) {
|
|
49106
|
+
isShowTooltip = true;
|
|
49107
|
+
}
|
|
49108
|
+
else {
|
|
49109
|
+
isShowTooltip = false;
|
|
49110
|
+
}
|
|
49111
|
+
}
|
|
49112
|
+
}
|
|
49113
|
+
}
|
|
49114
|
+
if (isScatter) {
|
|
49115
|
+
chartInstanceListRowByRowDirection[row][i].showCrosshair?.((axis) => {
|
|
49116
|
+
if (axis.layoutOrient === 'left') {
|
|
49117
|
+
return positionValueOrYValue;
|
|
49118
|
+
}
|
|
49119
|
+
return dimensionValueOrXValue;
|
|
49120
|
+
});
|
|
49121
|
+
}
|
|
49122
|
+
else {
|
|
49123
|
+
if (hideTooltip) {
|
|
49124
|
+
chartInstanceListRowByRowDirection[row][i].hideTooltip();
|
|
49125
|
+
}
|
|
49126
|
+
else {
|
|
49127
|
+
chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
49128
|
+
tooltip: isShowTooltip,
|
|
49129
|
+
showTooltipOption: { x: absolutePosition.left + 3, y: canvasXY.y, activeType: 'dimension' }
|
|
49130
|
+
});
|
|
49131
|
+
}
|
|
49132
|
+
}
|
|
49133
|
+
}
|
|
49134
|
+
}, 0);
|
|
49135
|
+
}
|
|
49136
|
+
table.scenegraph.updateNextFrame();
|
|
49137
|
+
}
|
|
49138
|
+
}
|
|
49139
|
+
function clearChartInstanceListByRowDirection(row, excludedCol, table) {
|
|
49140
|
+
if (isValid$3(chartInstanceListRowByRowDirection[row])) {
|
|
49141
|
+
for (const i in chartInstanceListRowByRowDirection[row]) {
|
|
49142
|
+
if (isValid$3(excludedCol) && Number(i) === excludedCol) {
|
|
49143
|
+
continue;
|
|
49144
|
+
}
|
|
49145
|
+
const cellGroup = table.scenegraph.getCell(Number(i), row);
|
|
49146
|
+
const chartNode = cellGroup?.getChildren()?.[0];
|
|
49147
|
+
chartNode.addUpdateShapeAndBoundsTag();
|
|
49148
|
+
if (isValid$3(chartNode)) {
|
|
49149
|
+
chartNode.deactivate(table, {
|
|
49150
|
+
releaseChartInstance: true,
|
|
49151
|
+
releaseColumnChartInstance: false,
|
|
49152
|
+
releaseRowChartInstance: false
|
|
49153
|
+
});
|
|
49154
|
+
chartInstanceListRowByRowDirection[row][i] = null;
|
|
49155
|
+
}
|
|
49156
|
+
}
|
|
49157
|
+
}
|
|
49158
|
+
delete chartInstanceListRowByRowDirection[row];
|
|
49159
|
+
}
|
|
49160
|
+
|
|
48824
49161
|
const CHART_NUMBER_TYPE = genNumberType();
|
|
48825
49162
|
class Chart extends Rect$2 {
|
|
48826
49163
|
type = 'chart';
|
|
48827
49164
|
chartInstance;
|
|
48828
49165
|
activeChartInstance;
|
|
48829
|
-
|
|
49166
|
+
activeChartInstanceHoverOnMark = null;
|
|
48830
49167
|
cacheCanvas;
|
|
48831
49168
|
isShareChartSpec;
|
|
48832
49169
|
constructor(isShareChartSpec, params) {
|
|
@@ -48854,7 +49191,9 @@
|
|
|
48854
49191
|
}
|
|
48855
49192
|
}
|
|
48856
49193
|
activate(table) {
|
|
48857
|
-
this.
|
|
49194
|
+
if (this.activeChartInstance) {
|
|
49195
|
+
return;
|
|
49196
|
+
}
|
|
48858
49197
|
const { col, row } = this.parent;
|
|
48859
49198
|
const hoverColor = getCellHoverColor(this.parent, table);
|
|
48860
49199
|
const { x1, y1, x2, y2 } = this.getViewBox();
|
|
@@ -48866,6 +49205,7 @@
|
|
|
48866
49205
|
y2: y2 - table.scrollTop
|
|
48867
49206
|
});
|
|
48868
49207
|
this.activeChartInstance?.release();
|
|
49208
|
+
this.attribute.ClassType.globalConfig.uniqueTooltip = false;
|
|
48869
49209
|
this.activeChartInstance = new this.attribute.ClassType(this.attribute.spec, merge$1({}, this.attribute.tableChartOption, {
|
|
48870
49210
|
renderCanvas: this.attribute.canvas,
|
|
48871
49211
|
mode: 'desktop-browser',
|
|
@@ -48941,19 +49281,95 @@
|
|
|
48941
49281
|
Chart.temp = 1;
|
|
48942
49282
|
}, 0);
|
|
48943
49283
|
});
|
|
49284
|
+
if (table.options.chartDimensionLinkage) {
|
|
49285
|
+
this.activeChartInstance.on('dimensionHover', (params) => {
|
|
49286
|
+
const dimensionInfo = params?.dimensionInfo[0];
|
|
49287
|
+
const canvasXY = params?.event?.canvas;
|
|
49288
|
+
const viewport = params?.event?.viewport;
|
|
49289
|
+
if (viewport) {
|
|
49290
|
+
const xValue = dimensionInfo.data[0].series.positionToDataX(viewport.x);
|
|
49291
|
+
const yValue = dimensionInfo.data[0].series.positionToDataY(viewport.y);
|
|
49292
|
+
if (this.attribute.spec.type === 'scatter') {
|
|
49293
|
+
generateChartInstanceListByColumnDirection(col, xValue, undefined, canvasXY, table, false, true);
|
|
49294
|
+
generateChartInstanceListByRowDirection(row, undefined, yValue, canvasXY, table, false, true);
|
|
49295
|
+
if (table.options.chartDimensionLinkage.labelHoverOnAxis?.left) {
|
|
49296
|
+
table.scenegraph
|
|
49297
|
+
.getCell(table.rowHeaderLevelCount - 1, row)
|
|
49298
|
+
.firstChild.showLabelHoverOnAxis(canvasXY.y - table.getCellRelativeRect(col, row).top, yValue);
|
|
49299
|
+
}
|
|
49300
|
+
if (table.options.chartDimensionLinkage.labelHoverOnAxis?.bottom) {
|
|
49301
|
+
table.scenegraph
|
|
49302
|
+
.getCell(col, table.rowCount - table.bottomFrozenRowCount)
|
|
49303
|
+
.firstChild.showLabelHoverOnAxis(canvasXY.x - table.getCellRelativeRect(col, row).left, xValue);
|
|
49304
|
+
}
|
|
49305
|
+
}
|
|
49306
|
+
else {
|
|
49307
|
+
let hideTooltip = false;
|
|
49308
|
+
const preMark = this.activeChartInstanceHoverOnMark;
|
|
49309
|
+
if (params.mark && params.datum && !Array.isArray(params.datum)) {
|
|
49310
|
+
this.activeChartInstanceHoverOnMark = params.mark;
|
|
49311
|
+
hideTooltip = true;
|
|
49312
|
+
}
|
|
49313
|
+
else {
|
|
49314
|
+
this.activeChartInstanceHoverOnMark = null;
|
|
49315
|
+
}
|
|
49316
|
+
if (params.action === 'enter' || preMark !== this.activeChartInstanceHoverOnMark) {
|
|
49317
|
+
const dimensionValue = dimensionInfo.value;
|
|
49318
|
+
const indicatorsAsCol = table.options.indicatorsAsCol;
|
|
49319
|
+
if (indicatorsAsCol) {
|
|
49320
|
+
const series = dimensionInfo.data[0].series;
|
|
49321
|
+
const width = series.getYAxisHelper().getBandwidth(0);
|
|
49322
|
+
const y = series.valueToPositionY(dimensionValue);
|
|
49323
|
+
if (table.options.chartDimensionLinkage.labelHoverOnAxis?.left) {
|
|
49324
|
+
table.scenegraph
|
|
49325
|
+
.getCell(table.rowHeaderLevelCount - 1, row)
|
|
49326
|
+
.firstChild.showLabelHoverOnAxis(y + (series.type === 'line' || series.type === 'area' ? 0 : width / 2), yValue);
|
|
49327
|
+
}
|
|
49328
|
+
generateChartInstanceListByRowDirection(row, dimensionValue, null, canvasXY, table, hideTooltip, false);
|
|
49329
|
+
}
|
|
49330
|
+
else {
|
|
49331
|
+
const series = dimensionInfo.data[0].series;
|
|
49332
|
+
const width = series.getXAxisHelper().getBandwidth(0);
|
|
49333
|
+
const x = series.valueToPositionX(dimensionValue);
|
|
49334
|
+
if (table.options.chartDimensionLinkage.labelHoverOnAxis?.bottom) {
|
|
49335
|
+
table.scenegraph
|
|
49336
|
+
.getCell(col, table.rowCount - table.bottomFrozenRowCount)
|
|
49337
|
+
.firstChild.showLabelHoverOnAxis(x + (series.type === 'line' || series.type === 'area' ? 0 : width / 2), dimensionValue);
|
|
49338
|
+
}
|
|
49339
|
+
generateChartInstanceListByColumnDirection(col, dimensionValue, null, canvasXY, table, hideTooltip, false);
|
|
49340
|
+
}
|
|
49341
|
+
}
|
|
49342
|
+
}
|
|
49343
|
+
}
|
|
49344
|
+
});
|
|
49345
|
+
}
|
|
48944
49346
|
table._bindChartEvent?.(this.activeChartInstance);
|
|
48945
49347
|
}
|
|
48946
49348
|
static temp = 1;
|
|
48947
|
-
deactivate() {
|
|
48948
|
-
this.
|
|
48949
|
-
|
|
48950
|
-
|
|
48951
|
-
|
|
48952
|
-
|
|
48953
|
-
|
|
48954
|
-
|
|
48955
|
-
|
|
48956
|
-
|
|
49349
|
+
deactivate(table, { releaseChartInstance = true, releaseColumnChartInstance = true, releaseRowChartInstance = true } = {}) {
|
|
49350
|
+
this.activeChartInstanceHoverOnMark = null;
|
|
49351
|
+
if (releaseChartInstance) {
|
|
49352
|
+
this.activeChartInstance?.updateViewBox({
|
|
49353
|
+
x1: -1000,
|
|
49354
|
+
x2: -800,
|
|
49355
|
+
y1: -1000,
|
|
49356
|
+
y2: -800
|
|
49357
|
+
}, false, false);
|
|
49358
|
+
this.activeChartInstance?.release();
|
|
49359
|
+
this.activeChartInstance = null;
|
|
49360
|
+
const { col, row } = this.parent;
|
|
49361
|
+
const table = this.stage.table;
|
|
49362
|
+
table.internalProps.layoutMap.isAxisCell(table.rowHeaderLevelCount - 1, row) &&
|
|
49363
|
+
table.scenegraph.getCell(table.rowHeaderLevelCount - 1, row).firstChild.hideLabelHoverOnAxis?.();
|
|
49364
|
+
table.internalProps.layoutMap.isAxisCell(col, table.rowCount - table.bottomFrozenRowCount) &&
|
|
49365
|
+
table.scenegraph.getCell(col, table.rowCount - table.bottomFrozenRowCount).firstChild.hideLabelHoverOnAxis?.();
|
|
49366
|
+
}
|
|
49367
|
+
if (releaseColumnChartInstance) {
|
|
49368
|
+
clearChartInstanceListByColumnDirection(this.parent.col, this.attribute.spec.type === 'scatter' ? this.parent.row : undefined, table);
|
|
49369
|
+
}
|
|
49370
|
+
if (releaseRowChartInstance) {
|
|
49371
|
+
clearChartInstanceListByRowDirection(this.parent.row, this.attribute.spec.type === 'scatter' ? this.parent.col : undefined, table);
|
|
49372
|
+
}
|
|
48957
49373
|
}
|
|
48958
49374
|
updateData(data) {
|
|
48959
49375
|
this.attribute.data = data;
|
|
@@ -49240,8 +49656,8 @@
|
|
|
49240
49656
|
chart.getViewBox();
|
|
49241
49657
|
const { width = groupAttribute.width, height = groupAttribute.height } = chart.attribute;
|
|
49242
49658
|
const { table } = chart.getRootNode();
|
|
49243
|
-
const {
|
|
49244
|
-
if (!
|
|
49659
|
+
const { cacheCanvas, activeChartInstance } = chart;
|
|
49660
|
+
if (!activeChartInstance && cacheCanvas) {
|
|
49245
49661
|
if (isArray$7(cacheCanvas)) {
|
|
49246
49662
|
cacheCanvas.forEach(singleCacheCanvas => {
|
|
49247
49663
|
const { x, y, width, height, canvas } = singleCacheCanvas;
|
|
@@ -55437,7 +55853,7 @@
|
|
|
55437
55853
|
const cellStyle = table._getCellStyle(cell.col, cell.row);
|
|
55438
55854
|
const padding = getQuadProps(getProp('padding', cellStyle, cell.col, cell.row, table));
|
|
55439
55855
|
const CartesianAxis = Factory.getComponent('axis');
|
|
55440
|
-
const axis = new CartesianAxis(axisConfig, cell.attribute.width, cell.attribute.height, axisConfig.
|
|
55856
|
+
const axis = new CartesianAxis(axisConfig, cell.attribute.width, cell.attribute.height, axisConfig.__vtableBodyChartCellPadding ?? padding, table);
|
|
55441
55857
|
cell.clear();
|
|
55442
55858
|
cell.appendChild(axis.component);
|
|
55443
55859
|
axis.overlap();
|
|
@@ -56654,7 +57070,36 @@
|
|
|
56654
57070
|
return;
|
|
56655
57071
|
}
|
|
56656
57072
|
const cellGroup = this.getCell(col, row);
|
|
56657
|
-
cellGroup?.firstChild?.deactivate
|
|
57073
|
+
if (cellGroup?.firstChild?.deactivate) {
|
|
57074
|
+
const chartNode = cellGroup?.firstChild;
|
|
57075
|
+
const chartType = chartNode.attribute.spec.type;
|
|
57076
|
+
cellGroup?.firstChild?.deactivate?.(this.table, this.table.options.chartDimensionLinkage
|
|
57077
|
+
? {
|
|
57078
|
+
releaseChartInstance: chartType === 'scatter'
|
|
57079
|
+
? (col !== this.table.stateManager.hover.cellPos.col &&
|
|
57080
|
+
row !== this.table.stateManager.hover.cellPos.row) ||
|
|
57081
|
+
this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount ||
|
|
57082
|
+
this.table.stateManager.hover.cellPos.row >
|
|
57083
|
+
this.table.rowCount - 1 - this.table.bottomFrozenRowCount ||
|
|
57084
|
+
this.table.stateManager.hover.cellPos.col < this.table.frozenColCount ||
|
|
57085
|
+
this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount
|
|
57086
|
+
: this.table.options.indicatorsAsCol
|
|
57087
|
+
? row !== this.table.stateManager.hover.cellPos.row ||
|
|
57088
|
+
this.table.stateManager.hover.cellPos.col < this.table.frozenColCount ||
|
|
57089
|
+
this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount
|
|
57090
|
+
: col !== this.table.stateManager.hover.cellPos.col ||
|
|
57091
|
+
this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount ||
|
|
57092
|
+
this.table.stateManager.hover.cellPos.row >
|
|
57093
|
+
this.table.rowCount - 1 - this.table.bottomFrozenRowCount,
|
|
57094
|
+
releaseColumnChartInstance: col !== this.table.stateManager.hover.cellPos.col ||
|
|
57095
|
+
this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount ||
|
|
57096
|
+
this.table.stateManager.hover.cellPos.row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount,
|
|
57097
|
+
releaseRowChartInstance: row !== this.table.stateManager.hover.cellPos.row ||
|
|
57098
|
+
this.table.stateManager.hover.cellPos.col < this.table.frozenColCount ||
|
|
57099
|
+
this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount
|
|
57100
|
+
}
|
|
57101
|
+
: undefined);
|
|
57102
|
+
}
|
|
56658
57103
|
}
|
|
56659
57104
|
activateChart(col, row) {
|
|
56660
57105
|
if (col === -1 || row === -1) {
|
|
@@ -60685,9 +61130,9 @@
|
|
|
60685
61130
|
}
|
|
60686
61131
|
checkFrozen() {
|
|
60687
61132
|
let originalFrozenColCount = this.table.options.frozenColCount ??
|
|
60688
|
-
(this.table.isPivotTable() || (this.table.isListTable() && this.table.internalProps.transpose)
|
|
60689
|
-
|
|
60690
|
-
|
|
61133
|
+
(this.table.isPivotTable() || (this.table.isListTable() && this.table.internalProps.transpose)
|
|
61134
|
+
? (this.table.rowHeaderLevelCount ?? 0) + this.table.internalProps.layoutMap.leftRowSeriesNumberColumnCount
|
|
61135
|
+
: 0);
|
|
60691
61136
|
if (originalFrozenColCount) {
|
|
60692
61137
|
originalFrozenColCount = Math.min(originalFrozenColCount, this.table.colCount);
|
|
60693
61138
|
const container = this.table.getContainer();
|
|
@@ -68187,7 +68632,7 @@
|
|
|
68187
68632
|
return;
|
|
68188
68633
|
}
|
|
68189
68634
|
const chartCellStyle = layout._table._getCellStyle(col, row + 1);
|
|
68190
|
-
const
|
|
68635
|
+
const bodyChartCellPadding = getQuadProps(getProp('padding', chartCellStyle, col, row + 1, layout._table));
|
|
68191
68636
|
const { range, ticks, axisOption, targetTicks, targetRange, index, theme } = axisRange;
|
|
68192
68637
|
if (isNumber$4(axisOption?.min)) {
|
|
68193
68638
|
range.min = axisOption.min;
|
|
@@ -68214,7 +68659,7 @@
|
|
|
68214
68659
|
},
|
|
68215
68660
|
__ticksForVTable: ticks,
|
|
68216
68661
|
__vtableChartTheme: theme,
|
|
68217
|
-
|
|
68662
|
+
__vtableBodyChartCellPadding: bodyChartCellPadding
|
|
68218
68663
|
});
|
|
68219
68664
|
}
|
|
68220
68665
|
else if (row === layout.rowCount - layout.bottomFrozenRowCount &&
|
|
@@ -68234,7 +68679,7 @@
|
|
|
68234
68679
|
return;
|
|
68235
68680
|
}
|
|
68236
68681
|
const chartCellStyle = layout._table._getCellStyle(col, row - 1);
|
|
68237
|
-
const
|
|
68682
|
+
const bodyChartCellPadding = getQuadProps(getProp('padding', chartCellStyle, col, row - 1, layout._table));
|
|
68238
68683
|
const { range, ticks, axisOption, index, targetTicks, targetRange, theme } = axisRange;
|
|
68239
68684
|
if (isNumber$4(axisOption?.max)) {
|
|
68240
68685
|
range.max = axisOption.max;
|
|
@@ -68279,7 +68724,7 @@
|
|
|
68279
68724
|
},
|
|
68280
68725
|
__ticksForVTable: ticks,
|
|
68281
68726
|
__vtableChartTheme: theme,
|
|
68282
|
-
|
|
68727
|
+
__vtableBodyChartCellPadding: bodyChartCellPadding
|
|
68283
68728
|
});
|
|
68284
68729
|
}
|
|
68285
68730
|
else if (col === layout.rowHeaderLevelCount - 1 &&
|
|
@@ -68297,7 +68742,7 @@
|
|
|
68297
68742
|
return;
|
|
68298
68743
|
}
|
|
68299
68744
|
const chartCellStyle = layout._table._getCellStyle(col + 1, row);
|
|
68300
|
-
const
|
|
68745
|
+
const bodyChartCellPadding = getQuadProps(getProp('padding', chartCellStyle, col + 1, row, layout._table));
|
|
68301
68746
|
const spec = layout.getRawChartSpec(col + 1, row);
|
|
68302
68747
|
return merge$1({
|
|
68303
68748
|
domain: axisOption?.type === 'linear' ? undefined : Array.from(domain),
|
|
@@ -68310,7 +68755,7 @@
|
|
|
68310
68755
|
type: axisOption?.type ?? 'band',
|
|
68311
68756
|
__vtableChartTheme: theme,
|
|
68312
68757
|
inverse: transformInverse(axisOption, (spec?.direction ?? (chartType === 'scatter' ? 'vertical' : 'horizontal')) === "horizontal"),
|
|
68313
|
-
|
|
68758
|
+
__vtableBodyChartCellPadding: bodyChartCellPadding
|
|
68314
68759
|
});
|
|
68315
68760
|
}
|
|
68316
68761
|
}
|
|
@@ -68332,7 +68777,7 @@
|
|
|
68332
68777
|
return;
|
|
68333
68778
|
}
|
|
68334
68779
|
const chartCellStyle = layout._table._getCellStyle(col + 1, row);
|
|
68335
|
-
const
|
|
68780
|
+
const bodyChartCellPadding = getQuadProps(getProp('padding', chartCellStyle, col + 1, row, layout._table));
|
|
68336
68781
|
const { range, ticks, axisOption, index, targetTicks, targetRange, theme } = axisRange;
|
|
68337
68782
|
if (isNumber$4(axisOption?.max)) {
|
|
68338
68783
|
range.max = axisOption.max;
|
|
@@ -68378,7 +68823,7 @@
|
|
|
68378
68823
|
},
|
|
68379
68824
|
__ticksForVTable: ticks,
|
|
68380
68825
|
__vtableChartTheme: theme,
|
|
68381
|
-
|
|
68826
|
+
__vtableBodyChartCellPadding: bodyChartCellPadding
|
|
68382
68827
|
});
|
|
68383
68828
|
}
|
|
68384
68829
|
else if (col === layout.colCount - layout.rightFrozenColCount &&
|
|
@@ -68390,7 +68835,7 @@
|
|
|
68390
68835
|
return;
|
|
68391
68836
|
}
|
|
68392
68837
|
const chartCellStyle = layout._table._getCellStyle(col - 1, row);
|
|
68393
|
-
const
|
|
68838
|
+
const bodyChartCellPadding = getQuadProps(getProp('padding', chartCellStyle, col - 1, row, layout._table));
|
|
68394
68839
|
const { range, ticks, axisOption, index, targetTicks, targetRange, theme } = axisRange;
|
|
68395
68840
|
if (isNumber$4(axisOption?.min)) {
|
|
68396
68841
|
range.min = axisOption.min;
|
|
@@ -68428,7 +68873,7 @@
|
|
|
68428
68873
|
},
|
|
68429
68874
|
__ticksForVTable: ticks,
|
|
68430
68875
|
__vtableChartTheme: theme,
|
|
68431
|
-
|
|
68876
|
+
__vtableBodyChartCellPadding: bodyChartCellPadding
|
|
68432
68877
|
});
|
|
68433
68878
|
}
|
|
68434
68879
|
else if (row === layout.rowCount - layout.bottomFrozenRowCount &&
|
|
@@ -68446,7 +68891,7 @@
|
|
|
68446
68891
|
return;
|
|
68447
68892
|
}
|
|
68448
68893
|
const chartCellStyle = layout._table._getCellStyle(col, row - 1);
|
|
68449
|
-
const
|
|
68894
|
+
const bodyChartCellPadding = getQuadProps(getProp('padding', chartCellStyle, col, row - 1, layout._table));
|
|
68450
68895
|
return merge$1({
|
|
68451
68896
|
domain: axisOption?.type === 'linear' ? undefined : Array.from(domain),
|
|
68452
68897
|
range: axisOption?.type === 'linear' ? domain : undefined
|
|
@@ -68454,7 +68899,7 @@
|
|
|
68454
68899
|
orient: 'bottom',
|
|
68455
68900
|
type: axisOption?.type ?? 'band',
|
|
68456
68901
|
__vtableChartTheme: theme,
|
|
68457
|
-
|
|
68902
|
+
__vtableBodyChartCellPadding: bodyChartCellPadding
|
|
68458
68903
|
});
|
|
68459
68904
|
}
|
|
68460
68905
|
}
|
|
@@ -68492,6 +68937,10 @@
|
|
|
68492
68937
|
seriesIndice = seriesIndex;
|
|
68493
68938
|
}
|
|
68494
68939
|
const { isZeroAlign, isTickAlign } = checkZeroAlign(spec, orient, layout);
|
|
68940
|
+
if (!axisOption.labelHoverOnAxis) {
|
|
68941
|
+
axisOption.labelHoverOnAxis =
|
|
68942
|
+
layout._table.options.chartDimensionLinkage?.labelHoverOnAxis?.[orient] ?? {};
|
|
68943
|
+
}
|
|
68495
68944
|
return {
|
|
68496
68945
|
axisOption,
|
|
68497
68946
|
isPercent: spec.percent,
|
|
@@ -68505,7 +68954,11 @@
|
|
|
68505
68954
|
}
|
|
68506
68955
|
const axisOption = layout._table.pivotChartAxes.find(axisOption => {
|
|
68507
68956
|
return axisOption.orient === orient;
|
|
68508
|
-
});
|
|
68957
|
+
}) ?? {};
|
|
68958
|
+
if (!axisOption.labelHoverOnAxis) {
|
|
68959
|
+
axisOption.labelHoverOnAxis =
|
|
68960
|
+
layout._table.options.chartDimensionLinkage?.labelHoverOnAxis?.[orient] ?? {};
|
|
68961
|
+
}
|
|
68509
68962
|
const { isZeroAlign, isTickAlign } = checkZeroAlign(spec, orient, layout);
|
|
68510
68963
|
return {
|
|
68511
68964
|
axisOption,
|
|
@@ -69403,7 +69856,7 @@
|
|
|
69403
69856
|
return TABLE_EVENT_TYPE;
|
|
69404
69857
|
}
|
|
69405
69858
|
options;
|
|
69406
|
-
version = "1.22.
|
|
69859
|
+
version = "1.22.5-alpha.0";
|
|
69407
69860
|
pagination;
|
|
69408
69861
|
id = `VTable${Date.now()}`;
|
|
69409
69862
|
headerStyleCache;
|
|
@@ -70875,26 +71328,26 @@
|
|
|
70875
71328
|
}
|
|
70876
71329
|
return { rowStart, colStart, rowEnd, colEnd };
|
|
70877
71330
|
}
|
|
70878
|
-
getBodyVisibleRowRange() {
|
|
71331
|
+
getBodyVisibleRowRange(deltaY = 0) {
|
|
70879
71332
|
const { scrollTop } = this;
|
|
70880
71333
|
const frozenRowsHeight = this.getFrozenRowsHeight();
|
|
70881
71334
|
const bottomFrozenRowsHeight = this.getBottomFrozenRowsHeight();
|
|
70882
71335
|
const { row: rowStart } = this.getRowAt(scrollTop + frozenRowsHeight + 1);
|
|
70883
71336
|
const rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight
|
|
70884
|
-
? this.getRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight).row
|
|
71337
|
+
? this.getRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight + deltaY).row
|
|
70885
71338
|
: this.rowCount - 1;
|
|
70886
71339
|
if (rowEnd < 0) {
|
|
70887
71340
|
return null;
|
|
70888
71341
|
}
|
|
70889
71342
|
return { rowStart, rowEnd };
|
|
70890
71343
|
}
|
|
70891
|
-
getBodyVisibleColRange() {
|
|
71344
|
+
getBodyVisibleColRange(deltaX = 0) {
|
|
70892
71345
|
const { scrollLeft } = this;
|
|
70893
71346
|
const frozenColsWidth = this.getFrozenColsWidth();
|
|
70894
71347
|
const rightFrozenColsWidth = this.getRightFrozenColsWidth();
|
|
70895
71348
|
const { col: colStart } = this.getColAt(scrollLeft + frozenColsWidth + 1);
|
|
70896
71349
|
const colEnd = this.getAllColsWidth() > this.tableNoFrameWidth
|
|
70897
|
-
? this.getColAt(scrollLeft + this.tableNoFrameWidth - 1 - rightFrozenColsWidth).col
|
|
71350
|
+
? this.getColAt(scrollLeft + this.tableNoFrameWidth - 1 - rightFrozenColsWidth + deltaX).col
|
|
70898
71351
|
: this.colCount - 1;
|
|
70899
71352
|
if (colEnd < 0) {
|
|
70900
71353
|
return null;
|
|
@@ -74059,7 +74512,8 @@
|
|
|
74059
74512
|
visible: spec.background?.visible,
|
|
74060
74513
|
style: transformToGraphic(spec.background?.style),
|
|
74061
74514
|
state: transformStateStyle(spec.background?.state)
|
|
74062
|
-
}
|
|
74515
|
+
},
|
|
74516
|
+
labelHoverOnAxis: spec.labelHoverOnAxis
|
|
74063
74517
|
};
|
|
74064
74518
|
}
|
|
74065
74519
|
|
|
@@ -75953,6 +76407,9 @@
|
|
|
75953
76407
|
}
|
|
75954
76408
|
const editor = this.table.getEditor(col, row);
|
|
75955
76409
|
if (editor) {
|
|
76410
|
+
if (this.table.internalProps.layoutMap.isSeriesNumber(col, row)) {
|
|
76411
|
+
return;
|
|
76412
|
+
}
|
|
75956
76413
|
if (this.table.internalProps.layoutMap?.isAggregation?.(col, row)) {
|
|
75957
76414
|
const isPivotTable = this.table.isPivotTable?.();
|
|
75958
76415
|
const updateAggregationOnEditCell = isPivotTable
|
|
@@ -79780,9 +80237,9 @@
|
|
|
79780
80237
|
tickData;
|
|
79781
80238
|
scale;
|
|
79782
80239
|
component;
|
|
79783
|
-
|
|
79784
|
-
constructor(option, width, height,
|
|
79785
|
-
this.
|
|
80240
|
+
bodyChartCellPadding;
|
|
80241
|
+
constructor(option, width, height, bodyChartCellPadding, table) {
|
|
80242
|
+
this.bodyChartCellPadding = bodyChartCellPadding;
|
|
79786
80243
|
this.table = table;
|
|
79787
80244
|
this.orient = option.orient ?? 'left';
|
|
79788
80245
|
this.type = option.type ?? 'band';
|
|
@@ -79790,16 +80247,30 @@
|
|
|
79790
80247
|
if (this.orient === 'left' || this.orient === 'right') {
|
|
79791
80248
|
const innerOffsetTop = 0;
|
|
79792
80249
|
const innerOffsetBottom = 0;
|
|
79793
|
-
this.
|
|
79794
|
-
|
|
79795
|
-
|
|
80250
|
+
if (this.orient === 'left') {
|
|
80251
|
+
this.x = this.option.cellPaddingLeft ?? 0;
|
|
80252
|
+
this.width = width - (this.option.cellPaddingLeft ?? 0);
|
|
80253
|
+
}
|
|
80254
|
+
if (this.orient === 'right') {
|
|
80255
|
+
this.x = 0;
|
|
80256
|
+
this.width = width - (this.option.cellPaddingRight ?? 0);
|
|
80257
|
+
}
|
|
80258
|
+
this.height = height - bodyChartCellPadding[0] - bodyChartCellPadding[2] - innerOffsetBottom;
|
|
80259
|
+
this.y = bodyChartCellPadding[0] + innerOffsetTop;
|
|
79796
80260
|
}
|
|
79797
80261
|
else if (this.orient === 'top' || this.orient === 'bottom') {
|
|
79798
80262
|
const innerOffsetLeft = 0;
|
|
79799
80263
|
const innerOffsetRight = 0;
|
|
79800
|
-
this.width = width -
|
|
79801
|
-
this.
|
|
79802
|
-
this.
|
|
80264
|
+
this.width = width - bodyChartCellPadding[1] - bodyChartCellPadding[3] - innerOffsetRight;
|
|
80265
|
+
this.x = bodyChartCellPadding[3] + innerOffsetLeft;
|
|
80266
|
+
if (this.orient === 'top') {
|
|
80267
|
+
this.y = this.option.cellPaddingTop ?? 0;
|
|
80268
|
+
this.height = height - (this.option.cellPaddingTop ?? 0);
|
|
80269
|
+
}
|
|
80270
|
+
if (this.orient === 'bottom') {
|
|
80271
|
+
this.y = 0;
|
|
80272
|
+
this.height = height - (this.option.cellPaddingBottom ?? 0);
|
|
80273
|
+
}
|
|
79803
80274
|
}
|
|
79804
80275
|
this.visible = option.visible ?? true;
|
|
79805
80276
|
this.inverse = 'inverse' in option ? !!option.inverse : false;
|
|
@@ -79879,8 +80350,24 @@
|
|
|
79879
80350
|
this.component.originAxis = this;
|
|
79880
80351
|
}
|
|
79881
80352
|
resize(width, height) {
|
|
79882
|
-
|
|
79883
|
-
|
|
80353
|
+
if (this.orient === 'left') {
|
|
80354
|
+
this.width = width - (this.option.cellPaddingLeft ?? 0);
|
|
80355
|
+
}
|
|
80356
|
+
else if (this.orient === 'right') {
|
|
80357
|
+
this.width = width - (this.option.cellPaddingRight ?? 0);
|
|
80358
|
+
}
|
|
80359
|
+
else if (this.orient === 'top' || this.orient === 'bottom') {
|
|
80360
|
+
this.width = width - (this.bodyChartCellPadding[1] + this.bodyChartCellPadding[3]);
|
|
80361
|
+
}
|
|
80362
|
+
if (this.orient === 'top') {
|
|
80363
|
+
this.height = height - (this.option.cellPaddingTop ?? 0);
|
|
80364
|
+
}
|
|
80365
|
+
else if (this.orient === 'bottom') {
|
|
80366
|
+
this.height = height - (this.option.cellPaddingBottom ?? 0);
|
|
80367
|
+
}
|
|
80368
|
+
else if (this.orient === 'left' || this.orient === 'right') {
|
|
80369
|
+
this.height = height - (this.bodyChartCellPadding[2] + this.bodyChartCellPadding[0]);
|
|
80370
|
+
}
|
|
79884
80371
|
this.updateScaleRange();
|
|
79885
80372
|
this.computeData();
|
|
79886
80373
|
const axisStylrAttrs = getAxisAttributes(this.option);
|
|
@@ -80108,7 +80595,15 @@
|
|
|
80108
80595
|
}
|
|
80109
80596
|
titleWidth += attribute.title.space ?? 4;
|
|
80110
80597
|
}
|
|
80111
|
-
|
|
80598
|
+
let paddingWidth = 0;
|
|
80599
|
+
const themeAxisConfig = getTableAxisTheme(config.orient, table.theme);
|
|
80600
|
+
if (config.orient === 'left') {
|
|
80601
|
+
paddingWidth = themeAxisConfig?.cellPaddingLeft ?? 0;
|
|
80602
|
+
}
|
|
80603
|
+
else if (config.orient === 'right') {
|
|
80604
|
+
paddingWidth = themeAxisConfig?.cellPaddingRight ?? 0;
|
|
80605
|
+
}
|
|
80606
|
+
return Math.ceil(tickWidth + labelWidth + titleWidth + paddingWidth + 1);
|
|
80112
80607
|
}
|
|
80113
80608
|
function computeAxisComponentHeight(config, table) {
|
|
80114
80609
|
const attribute = merge$1({}, commonAxis, config);
|
|
@@ -80183,7 +80678,15 @@
|
|
|
80183
80678
|
}
|
|
80184
80679
|
titleHeight += attribute.title.space ?? 4;
|
|
80185
80680
|
}
|
|
80186
|
-
|
|
80681
|
+
let paddingHeight = 0;
|
|
80682
|
+
const themeAxisConfig = getTableAxisTheme(config.orient, table.theme);
|
|
80683
|
+
if (config.orient === 'top') {
|
|
80684
|
+
paddingHeight = themeAxisConfig?.cellPaddingTop ?? 0;
|
|
80685
|
+
}
|
|
80686
|
+
else if (config.orient === 'bottom') {
|
|
80687
|
+
paddingHeight = themeAxisConfig?.cellPaddingBottom ?? 0;
|
|
80688
|
+
}
|
|
80689
|
+
return tickHeight + labelHeight + titleHeight + paddingHeight + 1;
|
|
80187
80690
|
}
|
|
80188
80691
|
function formatDecimal(number) {
|
|
80189
80692
|
if (typeof number !== 'number') {
|
|
@@ -87446,6 +87949,65 @@
|
|
|
87446
87949
|
}
|
|
87447
87950
|
return null;
|
|
87448
87951
|
}
|
|
87952
|
+
matchDimensionPath = (paths, treeNodes, needLowestLevel, checkAxisNode = false, pathIndex = 0) => {
|
|
87953
|
+
if (pathIndex >= paths.length) {
|
|
87954
|
+
return undefined;
|
|
87955
|
+
}
|
|
87956
|
+
const currentPath = paths[pathIndex];
|
|
87957
|
+
for (let j = 0; j < treeNodes.length; j++) {
|
|
87958
|
+
const dimension = treeNodes[j];
|
|
87959
|
+
const isMatch = (!isValid$3(currentPath.indicatorKey) &&
|
|
87960
|
+
dimension.dimensionKey === currentPath.dimensionKey &&
|
|
87961
|
+
dimension.value === currentPath.value) ||
|
|
87962
|
+
(isValid$3(currentPath.indicatorKey) &&
|
|
87963
|
+
dimension.indicatorKey === currentPath.indicatorKey &&
|
|
87964
|
+
((isValid$3(dimension.value) && isValid$3(currentPath.value) && currentPath.value === dimension.value) ||
|
|
87965
|
+
!isValid$3(dimension.value) ||
|
|
87966
|
+
!isValid$3(currentPath.value)));
|
|
87967
|
+
if (isMatch) {
|
|
87968
|
+
const children = dimension.children;
|
|
87969
|
+
if (pathIndex === paths.length - 1) {
|
|
87970
|
+
if (needLowestLevel) {
|
|
87971
|
+
const hasAxisNode = checkAxisNode && children && children.some((row) => row.dimensionKey === 'axis');
|
|
87972
|
+
if (!children?.length || hasAxisNode) {
|
|
87973
|
+
return dimension;
|
|
87974
|
+
}
|
|
87975
|
+
const findLeafNode = (nodes) => {
|
|
87976
|
+
for (const node of nodes) {
|
|
87977
|
+
const nodeChildren = node.children;
|
|
87978
|
+
const nodeHasAxis = checkAxisNode && nodeChildren.some((row) => row.dimensionKey === 'axis');
|
|
87979
|
+
if (!nodeChildren?.length || nodeHasAxis) {
|
|
87980
|
+
return node;
|
|
87981
|
+
}
|
|
87982
|
+
const leaf = findLeafNode(nodeChildren);
|
|
87983
|
+
if (leaf) {
|
|
87984
|
+
return leaf;
|
|
87985
|
+
}
|
|
87986
|
+
}
|
|
87987
|
+
return undefined;
|
|
87988
|
+
};
|
|
87989
|
+
const leafNode = findLeafNode(children);
|
|
87990
|
+
if (leafNode) {
|
|
87991
|
+
return leafNode;
|
|
87992
|
+
}
|
|
87993
|
+
}
|
|
87994
|
+
else {
|
|
87995
|
+
return dimension;
|
|
87996
|
+
}
|
|
87997
|
+
}
|
|
87998
|
+
if (children?.length) {
|
|
87999
|
+
const result = this.matchDimensionPath(paths, children, needLowestLevel, checkAxisNode, pathIndex + 1);
|
|
88000
|
+
if (result) {
|
|
88001
|
+
return result;
|
|
88002
|
+
}
|
|
88003
|
+
}
|
|
88004
|
+
else if (pathIndex === paths.length - 1) {
|
|
88005
|
+
return dimension;
|
|
88006
|
+
}
|
|
88007
|
+
}
|
|
88008
|
+
}
|
|
88009
|
+
return undefined;
|
|
88010
|
+
};
|
|
87449
88011
|
getCellAdressByHeaderPath(dimensionPaths) {
|
|
87450
88012
|
let colHeaderPaths;
|
|
87451
88013
|
let rowHeaderPaths;
|
|
@@ -87537,34 +88099,10 @@
|
|
|
87537
88099
|
let row;
|
|
87538
88100
|
let defaultCol;
|
|
87539
88101
|
let defaultRow;
|
|
87540
|
-
let rowArr = this.rowTree;
|
|
87541
88102
|
let rowDimensionFinded;
|
|
87542
|
-
let colArr = this.columnTree;
|
|
87543
88103
|
let colDimensionFinded;
|
|
87544
88104
|
if (colHeaderPaths) {
|
|
87545
|
-
|
|
87546
|
-
const colDimension = colHeaderPaths[i];
|
|
87547
|
-
for (let j = 0; j < colArr.length; j++) {
|
|
87548
|
-
const dimension = colArr[j];
|
|
87549
|
-
if ((!isValid$3(colDimension.indicatorKey) &&
|
|
87550
|
-
dimension.dimensionKey === colDimension.dimensionKey &&
|
|
87551
|
-
dimension.value === colDimension.value) ||
|
|
87552
|
-
(isValid$3(colDimension.indicatorKey) &&
|
|
87553
|
-
dimension.indicatorKey === colDimension.indicatorKey &&
|
|
87554
|
-
((isValid$3(dimension.value) && isValid$3(colDimension.value) && colDimension.value === dimension.value) ||
|
|
87555
|
-
!isValid$3(dimension.value) ||
|
|
87556
|
-
!isValid$3(colDimension.value)))) {
|
|
87557
|
-
colArr = dimension.children;
|
|
87558
|
-
if (needLowestLevel_colPaths && !colArr?.length) {
|
|
87559
|
-
colDimensionFinded = dimension;
|
|
87560
|
-
}
|
|
87561
|
-
else if (!needLowestLevel_colPaths) {
|
|
87562
|
-
colDimensionFinded = dimension;
|
|
87563
|
-
}
|
|
87564
|
-
break;
|
|
87565
|
-
}
|
|
87566
|
-
}
|
|
87567
|
-
}
|
|
88105
|
+
colDimensionFinded = this.matchDimensionPath(colHeaderPaths, this.columnTree, needLowestLevel_colPaths);
|
|
87568
88106
|
}
|
|
87569
88107
|
if (rowHeaderPaths?.length >= 1) {
|
|
87570
88108
|
if (this.rowHierarchyType === 'tree') {
|
|
@@ -87593,27 +88131,7 @@
|
|
|
87593
88131
|
row = this._rowHeaderCellIds.indexOf(findedCellIdPath) + this.columnHeaderLevelCount;
|
|
87594
88132
|
}
|
|
87595
88133
|
else {
|
|
87596
|
-
|
|
87597
|
-
const rowDimension = rowHeaderPaths[i];
|
|
87598
|
-
for (let j = 0; j < rowArr.length; j++) {
|
|
87599
|
-
const dimension = rowArr[j];
|
|
87600
|
-
if ((!isValid$3(rowDimension.indicatorKey) &&
|
|
87601
|
-
dimension.dimensionKey === rowDimension.dimensionKey &&
|
|
87602
|
-
dimension.value === rowDimension.value) ||
|
|
87603
|
-
(isValid$3(rowDimension.indicatorKey) &&
|
|
87604
|
-
dimension.indicatorKey === rowDimension.indicatorKey &&
|
|
87605
|
-
(!isValid$3(rowDimension.value) || dimension.value === rowDimension.value))) {
|
|
87606
|
-
rowArr = dimension.children;
|
|
87607
|
-
if (needLowestLevel_rowPaths && (!rowArr?.length || rowArr.some(row => row.dimensionKey === 'axis'))) {
|
|
87608
|
-
rowDimensionFinded = dimension;
|
|
87609
|
-
}
|
|
87610
|
-
else if (!needLowestLevel_rowPaths) {
|
|
87611
|
-
rowDimensionFinded = dimension;
|
|
87612
|
-
}
|
|
87613
|
-
break;
|
|
87614
|
-
}
|
|
87615
|
-
}
|
|
87616
|
-
}
|
|
88134
|
+
rowDimensionFinded = this.matchDimensionPath(rowHeaderPaths, this.rowTree, needLowestLevel_rowPaths, true);
|
|
87617
88135
|
}
|
|
87618
88136
|
}
|
|
87619
88137
|
if (!forceBody && needLowestLevel_colPaths && needLowestLevel_rowPaths) {
|
|
@@ -93983,7 +94501,7 @@
|
|
|
93983
94501
|
}
|
|
93984
94502
|
|
|
93985
94503
|
registerForVrender();
|
|
93986
|
-
const version = "1.22.
|
|
94504
|
+
const version = "1.22.5-alpha.0";
|
|
93987
94505
|
function getIcons() {
|
|
93988
94506
|
return get$2();
|
|
93989
94507
|
}
|