@visactor/vtable-calendar 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/dist/vtable-calendar.js +379 -76
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +2 -2
package/dist/vtable-calendar.js
CHANGED
|
@@ -22421,7 +22421,7 @@
|
|
|
22421
22421
|
|
|
22422
22422
|
var AXIS_ELEMENT_NAME;
|
|
22423
22423
|
!function (AXIS_ELEMENT_NAME) {
|
|
22424
|
-
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";
|
|
22424
|
+
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";
|
|
22425
22425
|
}(AXIS_ELEMENT_NAME || (AXIS_ELEMENT_NAME = {}));
|
|
22426
22426
|
var AxisStateValue;
|
|
22427
22427
|
!function (AxisStateValue) {
|
|
@@ -22458,6 +22458,26 @@
|
|
|
22458
22458
|
fillOpacity: 1
|
|
22459
22459
|
}
|
|
22460
22460
|
},
|
|
22461
|
+
labelHoverOnAxis: {
|
|
22462
|
+
visible: !1,
|
|
22463
|
+
space: 7,
|
|
22464
|
+
padding: 2,
|
|
22465
|
+
position: 0,
|
|
22466
|
+
autoRotate: !1,
|
|
22467
|
+
textStyle: {
|
|
22468
|
+
fontSize: 12,
|
|
22469
|
+
fill: "red",
|
|
22470
|
+
fontWeight: "normal",
|
|
22471
|
+
fillOpacity: 1
|
|
22472
|
+
},
|
|
22473
|
+
background: {
|
|
22474
|
+
visible: !0,
|
|
22475
|
+
style: {
|
|
22476
|
+
cornerRadius: 2,
|
|
22477
|
+
fill: "black"
|
|
22478
|
+
}
|
|
22479
|
+
}
|
|
22480
|
+
},
|
|
22461
22481
|
tick: {
|
|
22462
22482
|
visible: !0,
|
|
22463
22483
|
inside: !1,
|
|
@@ -24296,14 +24316,15 @@
|
|
|
24296
24316
|
return delayAfterValue > 0 && (totalDelay += delayAfterValue), totalDelay > 0 && animate.wait(totalDelay), loop && loop > 0 && animate.loop(loop), bounce && animate.bounce(!0), animate;
|
|
24297
24317
|
}
|
|
24298
24318
|
_handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic) {
|
|
24299
|
-
var _a, _b, _c, _d, _e, _f;
|
|
24319
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
24300
24320
|
if (custom && customType) {
|
|
24301
|
-
|
|
24302
|
-
|
|
24303
|
-
|
|
24304
|
-
|
|
24305
|
-
|
|
24306
|
-
|
|
24321
|
+
let customParams = this.resolveValue(customParameters, graphic);
|
|
24322
|
+
"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({
|
|
24323
|
+
width: (null === (_c = graphic.stage) || void 0 === _c ? void 0 : _c.width) || 0,
|
|
24324
|
+
height: (null === (_d = graphic.stage) || void 0 === _d ? void 0 : _d.height) || 0,
|
|
24325
|
+
group: this._target.parent
|
|
24326
|
+
}, customParams);
|
|
24327
|
+
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;
|
|
24307
24328
|
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);
|
|
24308
24329
|
} else "to" === type ? animate.to(props, duration, easing) : "from" === type && animate.from(props, duration, easing);
|
|
24309
24330
|
}
|
|
@@ -28976,7 +28997,17 @@
|
|
|
28976
28997
|
loadLineAxisComponent();
|
|
28977
28998
|
class LineAxis extends AxisBase {
|
|
28978
28999
|
constructor(attributes, options) {
|
|
28979
|
-
|
|
29000
|
+
var _a;
|
|
29001
|
+
if (attributes.labelHoverOnAxis && (attributes.labelHoverOnAxis.textStyle = Object.assign({}, attributes.label.style, attributes.labelHoverOnAxis.textStyle), void 0 === attributes.labelHoverOnAxis.space)) {
|
|
29002
|
+
const {
|
|
29003
|
+
padding = 2
|
|
29004
|
+
} = attributes.labelHoverOnAxis,
|
|
29005
|
+
parsedPadding = normalizePadding(padding),
|
|
29006
|
+
toDiffPadding = "bottom" === attributes.orient ? parsedPadding[0] : "left" === attributes.orient ? parsedPadding[1] : "top" === attributes.orient ? parsedPadding[2] : parsedPadding[3],
|
|
29007
|
+
space = (null !== (_a = attributes.label.space) && void 0 !== _a ? _a : LineAxis.defaultAttributes.label.space) - toDiffPadding;
|
|
29008
|
+
attributes.labelHoverOnAxis.space = space;
|
|
29009
|
+
}
|
|
29010
|
+
super((null == options ? void 0 : options.skipDefault) ? attributes : merge$2({}, LineAxis.defaultAttributes, attributes), options), this.labelHoverOnAxisGroup = null;
|
|
28980
29011
|
}
|
|
28981
29012
|
_renderInner(container) {
|
|
28982
29013
|
var _a;
|
|
@@ -29038,6 +29069,15 @@
|
|
|
29038
29069
|
}, panel.style));
|
|
29039
29070
|
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);
|
|
29040
29071
|
}
|
|
29072
|
+
const {
|
|
29073
|
+
labelHoverOnAxis: labelHoverOnAxis
|
|
29074
|
+
} = this.attribute;
|
|
29075
|
+
labelHoverOnAxis && labelHoverOnAxis.visible && this.renderLabelHoverOnAxis();
|
|
29076
|
+
}
|
|
29077
|
+
renderLabelHoverOnAxis() {
|
|
29078
|
+
const hoverOnLabelAttributes = this.getLabelHoverOnAxisAttribute(),
|
|
29079
|
+
hoverOnLabel = new Tag(Object.assign({}, hoverOnLabelAttributes));
|
|
29080
|
+
hoverOnLabel.name = AXIS_ELEMENT_NAME.title, hoverOnLabel.id = this._getNodeId("hover-on-label"), this.labelHoverOnAxisGroup = hoverOnLabel, this.axisContainer.add(hoverOnLabel);
|
|
29041
29081
|
}
|
|
29042
29082
|
renderLine(container) {
|
|
29043
29083
|
const {
|
|
@@ -29178,6 +29218,66 @@
|
|
|
29178
29218
|
visible: !0
|
|
29179
29219
|
}, background.style)), attrs;
|
|
29180
29220
|
}
|
|
29221
|
+
getLabelHoverOnAxisAttribute() {
|
|
29222
|
+
var _a, _b;
|
|
29223
|
+
const {
|
|
29224
|
+
orient: orient
|
|
29225
|
+
} = this.attribute,
|
|
29226
|
+
_c = this.attribute.labelHoverOnAxis,
|
|
29227
|
+
{
|
|
29228
|
+
position = 0,
|
|
29229
|
+
space = 4,
|
|
29230
|
+
autoRotate = !0,
|
|
29231
|
+
textStyle = {},
|
|
29232
|
+
background = {},
|
|
29233
|
+
formatMethod: formatMethod,
|
|
29234
|
+
text: textContent = "",
|
|
29235
|
+
maxWidth: maxWidth
|
|
29236
|
+
} = _c,
|
|
29237
|
+
restAttrs = __rest$3(_c, ["position", "space", "autoRotate", "textStyle", "background", "formatMethod", "text", "maxWidth"]),
|
|
29238
|
+
point = this.getTickCoord(0);
|
|
29239
|
+
"bottom" === orient || "top" === orient ? point.x = position : point.y = position;
|
|
29240
|
+
let tickLength = 0;
|
|
29241
|
+
(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));
|
|
29242
|
+
const offset = tickLength + 0 + space,
|
|
29243
|
+
labelPoint = this.getVerticalCoord(point, offset, !1),
|
|
29244
|
+
vector = this.getVerticalVector(offset, !1, {
|
|
29245
|
+
x: 0,
|
|
29246
|
+
y: 0
|
|
29247
|
+
});
|
|
29248
|
+
let textBaseline,
|
|
29249
|
+
{
|
|
29250
|
+
angle: angle
|
|
29251
|
+
} = restAttrs,
|
|
29252
|
+
textAlign = "center";
|
|
29253
|
+
if (isNil$5(angle) && autoRotate) {
|
|
29254
|
+
const axisVector = this.getRelativeVector();
|
|
29255
|
+
angle = angleTo(axisVector, [1, 0], !0);
|
|
29256
|
+
const {
|
|
29257
|
+
verticalFactor = 1
|
|
29258
|
+
} = this.attribute;
|
|
29259
|
+
textBaseline = 1 === -1 * verticalFactor ? "bottom" : "top";
|
|
29260
|
+
} else {
|
|
29261
|
+
const {
|
|
29262
|
+
textAlign: textAlign2,
|
|
29263
|
+
textBaseline: textBaseline2
|
|
29264
|
+
} = this.getLabelAlign(vector, !1, textStyle.angle);
|
|
29265
|
+
textAlign = textAlign2, textBaseline = textBaseline2;
|
|
29266
|
+
}
|
|
29267
|
+
const maxTagWidth = maxWidth,
|
|
29268
|
+
text = formatMethod ? formatMethod(textContent) : textContent,
|
|
29269
|
+
attrs = Object.assign(Object.assign(Object.assign({}, labelPoint), restAttrs), {
|
|
29270
|
+
maxWidth: maxTagWidth,
|
|
29271
|
+
textStyle: Object.assign({
|
|
29272
|
+
textAlign: textAlign,
|
|
29273
|
+
textBaseline: textBaseline
|
|
29274
|
+
}, textStyle),
|
|
29275
|
+
text: text
|
|
29276
|
+
});
|
|
29277
|
+
return attrs.angle = angle, background && background.visible && (attrs.panel = Object.assign(Object.assign({
|
|
29278
|
+
visible: !0
|
|
29279
|
+
}, restAttrs.panel), background.style)), attrs;
|
|
29280
|
+
}
|
|
29181
29281
|
getTextBaseline(vector, inside) {
|
|
29182
29282
|
let base = "middle";
|
|
29183
29283
|
const {
|
|
@@ -29368,6 +29468,40 @@
|
|
|
29368
29468
|
}
|
|
29369
29469
|
return limitLength && (limitLength = (limitLength - labelSpace - titleSpacing - titleHeight - axisLineWidth - tickLength) / layerCount), limitLength;
|
|
29370
29470
|
}
|
|
29471
|
+
showLabelHoverOnAxis(position, text, adjustPosition = !0) {
|
|
29472
|
+
if (this.attribute.labelHoverOnAxis) {
|
|
29473
|
+
const preContainerBounds = this.axisContainer.AABBBounds,
|
|
29474
|
+
preWidth = preContainerBounds.width(),
|
|
29475
|
+
preHeight = preContainerBounds.height(),
|
|
29476
|
+
preX1 = preContainerBounds.x1,
|
|
29477
|
+
preY1 = preContainerBounds.y1,
|
|
29478
|
+
preX2 = preContainerBounds.x2,
|
|
29479
|
+
preY2 = preContainerBounds.y2;
|
|
29480
|
+
if (this.labelHoverOnAxisGroup) {
|
|
29481
|
+
const {
|
|
29482
|
+
formatMethod: formatMethod
|
|
29483
|
+
} = this.attribute.labelHoverOnAxis,
|
|
29484
|
+
textStr = formatMethod ? formatMethod(text) : text;
|
|
29485
|
+
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({
|
|
29486
|
+
y: position
|
|
29487
|
+
}) : this.labelHoverOnAxisGroup.setAttributes({
|
|
29488
|
+
x: position
|
|
29489
|
+
});
|
|
29490
|
+
} else this.attribute.labelHoverOnAxis.visible = !0, this.attribute.labelHoverOnAxis.position = position, this.attribute.labelHoverOnAxis.text = text, this.renderLabelHoverOnAxis();
|
|
29491
|
+
if (adjustPosition) {
|
|
29492
|
+
const afterContainerBounds = this.axisContainer.AABBBounds,
|
|
29493
|
+
diffWidth = afterContainerBounds.width() - preWidth,
|
|
29494
|
+
diffHeight = afterContainerBounds.height() - preHeight;
|
|
29495
|
+
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));
|
|
29496
|
+
}
|
|
29497
|
+
}
|
|
29498
|
+
}
|
|
29499
|
+
hideLabelHoverOnAxis() {
|
|
29500
|
+
this.attribute.labelHoverOnAxis && this.labelHoverOnAxisGroup && this.labelHoverOnAxisGroup.setAttributes({
|
|
29501
|
+
visible: !1,
|
|
29502
|
+
visibleAll: !1
|
|
29503
|
+
});
|
|
29504
|
+
}
|
|
29371
29505
|
release() {
|
|
29372
29506
|
super.release(), this._breaks = null;
|
|
29373
29507
|
}
|
|
@@ -35786,12 +35920,12 @@
|
|
|
35786
35920
|
return null !== (_b = null === (_a = defaultStyle.hover) || void 0 === _a ? void 0 : _a.cellBgColor) && void 0 !== _b ? _b : void 0;
|
|
35787
35921
|
},
|
|
35788
35922
|
get inlineColumnBgColor() {
|
|
35789
|
-
var _a, _b, _c, _d, _e, _f;
|
|
35790
|
-
return null !== (
|
|
35923
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
35924
|
+
return null !== (_g = null !== (_b = null === (_a = defaultStyle.hover) || void 0 === _a ? void 0 : _a.inlineColumnBgColor) && void 0 !== _b ? _b : (null === (_c = defaultStyle.hover) || void 0 === _c ? void 0 : _c.cellBgColor) && "string" == typeof (null === (_d = defaultStyle.hover) || void 0 === _d ? void 0 : _d.cellBgColor) && "transparent" !== (null === (_e = defaultStyle.hover) || void 0 === _e ? void 0 : _e.cellBgColor) ? changeColor(null === (_f = defaultStyle.hover) || void 0 === _f ? void 0 : _f.cellBgColor, .1, !1) : void 0) && void 0 !== _g ? _g : void 0;
|
|
35791
35925
|
},
|
|
35792
35926
|
get inlineRowBgColor() {
|
|
35793
|
-
var _a, _b, _c, _d, _e, _f;
|
|
35794
|
-
return null !== (
|
|
35927
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
35928
|
+
return null !== (_g = null !== (_b = null === (_a = defaultStyle.hover) || void 0 === _a ? void 0 : _a.inlineRowBgColor) && void 0 !== _b ? _b : (null === (_c = defaultStyle.hover) || void 0 === _c ? void 0 : _c.cellBgColor) && "string" == typeof (null === (_d = defaultStyle.hover) || void 0 === _d ? void 0 : _d.cellBgColor) && "transparent" !== (null === (_e = defaultStyle.hover) || void 0 === _e ? void 0 : _e.cellBgColor) ? changeColor(null === (_f = defaultStyle.hover) || void 0 === _f ? void 0 : _f.cellBgColor, .1, !1) : void 0) && void 0 !== _g ? _g : void 0;
|
|
35795
35929
|
}
|
|
35796
35930
|
};
|
|
35797
35931
|
},
|
|
@@ -35799,11 +35933,11 @@
|
|
|
35799
35933
|
if (defaultStyle.select) return {
|
|
35800
35934
|
get inlineColumnBgColor() {
|
|
35801
35935
|
var _a, _b, _c, _d, _e, _f;
|
|
35802
|
-
return null !== (_f = null !== (_d = null !== (_b = null === (_a = defaultStyle.select) || void 0 === _a ? void 0 : _a.inlineColumnBgColor) && void 0 !== _b ? _b : null === (_c = that.selectionStyle) || void 0 === _c ? void 0 : _c.inlineColumnBgColor) && void 0 !== _d ? _d : (null === (_e = that.selectionStyle) || void 0 === _e ? void 0 : _e.cellBgColor) && "string" == typeof that.selectionStyle.cellBgColor ? changeColor(that.selectionStyle.cellBgColor, .1, !1) : void 0) && void 0 !== _f ? _f : void 0;
|
|
35936
|
+
return null !== (_f = null !== (_d = null !== (_b = null === (_a = defaultStyle.select) || void 0 === _a ? void 0 : _a.inlineColumnBgColor) && void 0 !== _b ? _b : null === (_c = that.selectionStyle) || void 0 === _c ? void 0 : _c.inlineColumnBgColor) && void 0 !== _d ? _d : (null === (_e = that.selectionStyle) || void 0 === _e ? void 0 : _e.cellBgColor) && "string" == typeof that.selectionStyle.cellBgColor && "transparent" !== that.selectionStyle.cellBgColor ? changeColor(that.selectionStyle.cellBgColor, .1, !1) : void 0) && void 0 !== _f ? _f : void 0;
|
|
35803
35937
|
},
|
|
35804
35938
|
get inlineRowBgColor() {
|
|
35805
35939
|
var _a, _b, _c, _d, _e;
|
|
35806
|
-
return null !== (_e = null !== (_c = null !== (_b = null === (_a = defaultStyle.select) || void 0 === _a ? void 0 : _a.inlineRowBgColor) && void 0 !== _b ? _b : that.selectionStyle.inlineRowBgColor) && void 0 !== _c ? _c : (null === (_d = that.selectionStyle) || void 0 === _d ? void 0 : _d.cellBgColor) && "string" == typeof that.selectionStyle.cellBgColor ? changeColor(that.selectionStyle.cellBgColor, .1, !1) : void 0) && void 0 !== _e ? _e : void 0;
|
|
35940
|
+
return null !== (_e = null !== (_c = null !== (_b = null === (_a = defaultStyle.select) || void 0 === _a ? void 0 : _a.inlineRowBgColor) && void 0 !== _b ? _b : that.selectionStyle.inlineRowBgColor) && void 0 !== _c ? _c : (null === (_d = that.selectionStyle) || void 0 === _d ? void 0 : _d.cellBgColor) && "string" == typeof that.selectionStyle.cellBgColor && "transparent" !== that.selectionStyle.cellBgColor ? changeColor(that.selectionStyle.cellBgColor, .1, !1) : void 0) && void 0 !== _e ? _e : void 0;
|
|
35807
35941
|
}
|
|
35808
35942
|
};
|
|
35809
35943
|
},
|
|
@@ -36427,12 +36561,12 @@
|
|
|
36427
36561
|
return null !== (_b = null === (_a = style.hover) || void 0 === _a ? void 0 : _a.cellBgColor) && void 0 !== _b ? _b : void 0;
|
|
36428
36562
|
},
|
|
36429
36563
|
get inlineColumnBgColor() {
|
|
36430
|
-
var _a, _b, _c, _d, _e, _f;
|
|
36431
|
-
return null !== (
|
|
36564
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
36565
|
+
return null !== (_g = null !== (_b = null === (_a = style.hover) || void 0 === _a ? void 0 : _a.inlineColumnBgColor) && void 0 !== _b ? _b : (null === (_c = style.hover) || void 0 === _c ? void 0 : _c.cellBgColor) && "string" == typeof (null === (_d = style.hover) || void 0 === _d ? void 0 : _d.cellBgColor) && "transparent" !== (null === (_e = style.hover) || void 0 === _e ? void 0 : _e.cellBgColor) ? changeColor(null === (_f = style.hover) || void 0 === _f ? void 0 : _f.cellBgColor, .1, !1) : void 0) && void 0 !== _g ? _g : void 0;
|
|
36432
36566
|
},
|
|
36433
36567
|
get inlineRowBgColor() {
|
|
36434
|
-
var _a, _b, _c, _d, _e, _f;
|
|
36435
|
-
return null !== (
|
|
36568
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
36569
|
+
return null !== (_g = null !== (_b = null === (_a = style.hover) || void 0 === _a ? void 0 : _a.inlineRowBgColor) && void 0 !== _b ? _b : (null === (_c = style.hover) || void 0 === _c ? void 0 : _c.cellBgColor) && "string" == typeof (null === (_d = style.hover) || void 0 === _d ? void 0 : _d.cellBgColor) && "transparent" !== (null === (_e = style.hover) || void 0 === _e ? void 0 : _e.cellBgColor) ? changeColor(null === (_f = style.hover) || void 0 === _f ? void 0 : _f.cellBgColor, .1, !1) : void 0) && void 0 !== _g ? _g : void 0;
|
|
36436
36570
|
}
|
|
36437
36571
|
};
|
|
36438
36572
|
},
|
|
@@ -36440,11 +36574,11 @@
|
|
|
36440
36574
|
return {
|
|
36441
36575
|
get inlineColumnBgColor() {
|
|
36442
36576
|
var _a, _b, _c, _d, _e, _f;
|
|
36443
|
-
return null !== (_f = null !== (_d = null !== (_b = null === (_a = style.select) || void 0 === _a ? void 0 : _a.inlineColumnBgColor) && void 0 !== _b ? _b : null === (_c = that.selectionStyle) || void 0 === _c ? void 0 : _c.inlineColumnBgColor) && void 0 !== _d ? _d : (null === (_e = that.selectionStyle) || void 0 === _e ? void 0 : _e.cellBgColor) && "string" == typeof that.selectionStyle.cellBgColor ? changeColor(that.selectionStyle.cellBgColor, .1, !1) : void 0) && void 0 !== _f ? _f : void 0;
|
|
36577
|
+
return null !== (_f = null !== (_d = null !== (_b = null === (_a = style.select) || void 0 === _a ? void 0 : _a.inlineColumnBgColor) && void 0 !== _b ? _b : null === (_c = that.selectionStyle) || void 0 === _c ? void 0 : _c.inlineColumnBgColor) && void 0 !== _d ? _d : (null === (_e = that.selectionStyle) || void 0 === _e ? void 0 : _e.cellBgColor) && "string" == typeof that.selectionStyle.cellBgColor && "transparent" !== that.selectionStyle.cellBgColor ? changeColor(that.selectionStyle.cellBgColor, .1, !1) : void 0) && void 0 !== _f ? _f : void 0;
|
|
36444
36578
|
},
|
|
36445
36579
|
get inlineRowBgColor() {
|
|
36446
36580
|
var _a, _b, _c, _d, _e;
|
|
36447
|
-
return null !== (_e = null !== (_c = null !== (_b = null === (_a = style.select) || void 0 === _a ? void 0 : _a.inlineRowBgColor) && void 0 !== _b ? _b : that.selectionStyle.inlineRowBgColor) && void 0 !== _c ? _c : (null === (_d = that.selectionStyle) || void 0 === _d ? void 0 : _d.cellBgColor) && "string" == typeof that.selectionStyle.cellBgColor ? changeColor(that.selectionStyle.cellBgColor, .1, !1) : void 0) && void 0 !== _e ? _e : void 0;
|
|
36581
|
+
return null !== (_e = null !== (_c = null !== (_b = null === (_a = style.select) || void 0 === _a ? void 0 : _a.inlineRowBgColor) && void 0 !== _b ? _b : that.selectionStyle.inlineRowBgColor) && void 0 !== _c ? _c : (null === (_d = that.selectionStyle) || void 0 === _d ? void 0 : _d.cellBgColor) && "string" == typeof that.selectionStyle.cellBgColor && "transparent" !== that.selectionStyle.cellBgColor ? changeColor(that.selectionStyle.cellBgColor, .1, !1) : void 0) && void 0 !== _e ? _e : void 0;
|
|
36448
36582
|
},
|
|
36449
36583
|
get cellBgColor() {
|
|
36450
36584
|
var _a, _b, _c;
|
|
@@ -41116,7 +41250,7 @@
|
|
|
41116
41250
|
cellGroup = Factory.getFunction("createTextCellGroup")(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, customElementsGroup, renderDefault, cellTheme, range, isAsync);
|
|
41117
41251
|
const axisConfig = table.internalProps.layoutMap.getAxisConfigInPivotChart(col, row);
|
|
41118
41252
|
if (axisConfig) {
|
|
41119
|
-
const axis = new (Factory.getComponent("axis"))(axisConfig, cellGroup.attribute.width, cellGroup.attribute.height, null !== (_a = axisConfig.
|
|
41253
|
+
const axis = new (Factory.getComponent("axis"))(axisConfig, cellGroup.attribute.width, cellGroup.attribute.height, null !== (_a = axisConfig.__vtableBodyChartCellPadding) && void 0 !== _a ? _a : padding, table);
|
|
41120
41254
|
cellGroup.clear(), cellGroup.appendChild(axis.component), axis.overlap();
|
|
41121
41255
|
} else table.internalProps.layoutMap.isEmpty(col, row) ? (cellGroup.setAttributes({
|
|
41122
41256
|
fill: !1,
|
|
@@ -42347,7 +42481,7 @@
|
|
|
42347
42481
|
cellStyle = scene.table._getCellStyle(col, row),
|
|
42348
42482
|
padding = getQuadProps(getProp("padding", cellStyle, col, row, scene.table));
|
|
42349
42483
|
if (axisConfig) {
|
|
42350
|
-
const axis = new (Factory.getComponent("axis"))(axisConfig, cellGroup.attribute.width, cellGroup.attribute.height, null !== (_e = axisConfig.
|
|
42484
|
+
const axis = new (Factory.getComponent("axis"))(axisConfig, cellGroup.attribute.width, cellGroup.attribute.height, null !== (_e = axisConfig.__vtableBodyChartCellPadding) && void 0 !== _e ? _e : padding, scene.table);
|
|
42351
42485
|
cellGroup.clear(), cellGroup.appendChild(axis.component), axis.overlap();
|
|
42352
42486
|
}
|
|
42353
42487
|
} else if ("axis" === (null === (_f = cell.firstChild) || void 0 === _f ? void 0 : _f.name)) null === (_g = cell.firstChild) || void 0 === _g || _g.originAxis.resize(cell.attribute.width, cell.attribute.height);else {
|
|
@@ -43638,10 +43772,125 @@
|
|
|
43638
43772
|
return hoverMode;
|
|
43639
43773
|
}
|
|
43640
43774
|
|
|
43775
|
+
const chartInstanceListColumnByColumnDirection = {};
|
|
43776
|
+
const chartInstanceListRowByRowDirection = {};
|
|
43777
|
+
function generateChartInstanceListByColumnDirection(col, dimensionValueOrXValue, positionValueOrYValue, canvasXY, table, hideTooltip = !1, isScatter = !1) {
|
|
43778
|
+
var _a;
|
|
43779
|
+
isValid$3(chartInstanceListColumnByColumnDirection[col]) || (chartInstanceListColumnByColumnDirection[col] = {});
|
|
43780
|
+
const {
|
|
43781
|
+
rowStart: rowStart
|
|
43782
|
+
} = table.getBodyVisibleRowRange();
|
|
43783
|
+
let rowEnd = table.getBodyVisibleRowRange().rowEnd;
|
|
43784
|
+
rowEnd = Math.min(table.rowCount - 1 - table.bottomFrozenRowCount, rowEnd);
|
|
43785
|
+
for (let i = rowStart; i <= rowEnd; i++) {
|
|
43786
|
+
const cellGroup = table.scenegraph.getCell(col, i),
|
|
43787
|
+
chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
|
|
43788
|
+
chartNode.addUpdateShapeAndBoundsTag(), chartInstanceListColumnByColumnDirection[col][i] || isValid$3(chartNode) && (chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance), table.stateManager.hover.cellPos.col === col && table.stateManager.hover.cellPos.row === i || setTimeout(() => {
|
|
43789
|
+
var _a, _b, _c, _d;
|
|
43790
|
+
if (null === (_a = chartInstanceListColumnByColumnDirection[col]) || void 0 === _a ? void 0 : _a[i]) {
|
|
43791
|
+
const absolutePosition = table.getCellRelativeRect(col, i),
|
|
43792
|
+
chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
43793
|
+
let isShowTooltip = !isScatter;
|
|
43794
|
+
if (!isScatter && "object" == typeof chartDimensionLinkage && (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, i === rowEnd && isShowTooltip)) {
|
|
43795
|
+
const heightLimitToShowTooltipForLastRow = chartDimensionLinkage.heightLimitToShowTooltipForLastRow,
|
|
43796
|
+
{
|
|
43797
|
+
rowEnd: rowEnd1
|
|
43798
|
+
} = table.getBodyVisibleRowRange(-heightLimitToShowTooltipForLastRow);
|
|
43799
|
+
if (rowEnd1 === rowEnd) isShowTooltip = !0;else {
|
|
43800
|
+
const {
|
|
43801
|
+
rowEnd: rowEnd2
|
|
43802
|
+
} = table.getBodyVisibleRowRange(5);
|
|
43803
|
+
isShowTooltip = rowEnd2 !== rowEnd;
|
|
43804
|
+
}
|
|
43805
|
+
}
|
|
43806
|
+
isScatter ? null === (_d = (_c = chartInstanceListColumnByColumnDirection[col][i]).showCrosshair) || void 0 === _d || _d.call(_c, axis => "left" === axis.layoutOrient ? positionValueOrYValue : dimensionValueOrXValue) : hideTooltip ? chartInstanceListColumnByColumnDirection[col][i].hideTooltip() : chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
43807
|
+
tooltip: isShowTooltip,
|
|
43808
|
+
showTooltipOption: {
|
|
43809
|
+
x: canvasXY.x,
|
|
43810
|
+
y: absolutePosition.top + 3,
|
|
43811
|
+
activeType: "dimension"
|
|
43812
|
+
}
|
|
43813
|
+
});
|
|
43814
|
+
}
|
|
43815
|
+
}, 0), table.scenegraph.updateNextFrame();
|
|
43816
|
+
}
|
|
43817
|
+
}
|
|
43818
|
+
function clearChartInstanceListByColumnDirection(col, excludedRow, table) {
|
|
43819
|
+
var _a;
|
|
43820
|
+
if (isValid$3(chartInstanceListColumnByColumnDirection[col])) {
|
|
43821
|
+
for (const i in chartInstanceListColumnByColumnDirection[col]) {
|
|
43822
|
+
if (isValid$3(excludedRow) && Number(i) === excludedRow) continue;
|
|
43823
|
+
const cellGroup = table.scenegraph.getCell(col, Number(i)),
|
|
43824
|
+
chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
|
|
43825
|
+
chartNode.addUpdateShapeAndBoundsTag(), isValid$3(chartNode) && (chartNode.deactivate(table, {
|
|
43826
|
+
releaseChartInstance: !0,
|
|
43827
|
+
releaseColumnChartInstance: !1,
|
|
43828
|
+
releaseRowChartInstance: !1
|
|
43829
|
+
}), chartInstanceListColumnByColumnDirection[col][i] = null);
|
|
43830
|
+
}
|
|
43831
|
+
delete chartInstanceListColumnByColumnDirection[col];
|
|
43832
|
+
}
|
|
43833
|
+
}
|
|
43834
|
+
function generateChartInstanceListByRowDirection(row, dimensionValueOrXValue, positionValueOrYValue, canvasXY, table, hideTooltip = !1, isScatter = !1) {
|
|
43835
|
+
var _a;
|
|
43836
|
+
isValid$3(chartInstanceListRowByRowDirection[row]) || (chartInstanceListRowByRowDirection[row] = {});
|
|
43837
|
+
const {
|
|
43838
|
+
colStart: colStart
|
|
43839
|
+
} = table.getBodyVisibleColRange();
|
|
43840
|
+
let colEnd = table.getBodyVisibleColRange().colEnd;
|
|
43841
|
+
colEnd = Math.min(table.colCount - 1 - table.rightFrozenColCount, colEnd);
|
|
43842
|
+
for (let i = colStart; i <= colEnd; i++) {
|
|
43843
|
+
const cellGroup = table.scenegraph.getCell(i, row),
|
|
43844
|
+
chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
|
|
43845
|
+
chartNode.addUpdateShapeAndBoundsTag(), chartInstanceListRowByRowDirection[row][i] || isValid$3(chartNode) && (chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListRowByRowDirection[row][i] = chartNode.activeChartInstance), table.stateManager.hover.cellPos.col === i && table.stateManager.hover.cellPos.row === row || setTimeout(() => {
|
|
43846
|
+
var _a, _b, _c, _d;
|
|
43847
|
+
if (null === (_a = chartInstanceListRowByRowDirection[row]) || void 0 === _a ? void 0 : _a[i]) {
|
|
43848
|
+
const absolutePosition = table.getCellRelativeRect(i, row),
|
|
43849
|
+
chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
43850
|
+
let isShowTooltip = !isScatter;
|
|
43851
|
+
if (!isScatter && "object" == typeof chartDimensionLinkage && (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, i === colEnd && isShowTooltip)) {
|
|
43852
|
+
const widthLimitToShowTooltipForLastColumn = chartDimensionLinkage.widthLimitToShowTooltipForLastColumn,
|
|
43853
|
+
{
|
|
43854
|
+
colEnd: colEnd1
|
|
43855
|
+
} = table.getBodyVisibleColRange(-widthLimitToShowTooltipForLastColumn);
|
|
43856
|
+
if (colEnd1 === colEnd) isShowTooltip = !0;else {
|
|
43857
|
+
const {
|
|
43858
|
+
colEnd: colEnd2
|
|
43859
|
+
} = table.getBodyVisibleColRange(5);
|
|
43860
|
+
isShowTooltip = colEnd2 !== colEnd;
|
|
43861
|
+
}
|
|
43862
|
+
}
|
|
43863
|
+
isScatter ? null === (_d = (_c = chartInstanceListRowByRowDirection[row][i]).showCrosshair) || void 0 === _d || _d.call(_c, axis => "left" === axis.layoutOrient ? positionValueOrYValue : dimensionValueOrXValue) : hideTooltip ? chartInstanceListRowByRowDirection[row][i].hideTooltip() : chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
43864
|
+
tooltip: isShowTooltip,
|
|
43865
|
+
showTooltipOption: {
|
|
43866
|
+
x: absolutePosition.left + 3,
|
|
43867
|
+
y: canvasXY.y,
|
|
43868
|
+
activeType: "dimension"
|
|
43869
|
+
}
|
|
43870
|
+
});
|
|
43871
|
+
}
|
|
43872
|
+
}, 0), table.scenegraph.updateNextFrame();
|
|
43873
|
+
}
|
|
43874
|
+
}
|
|
43875
|
+
function clearChartInstanceListByRowDirection(row, excludedCol, table) {
|
|
43876
|
+
var _a;
|
|
43877
|
+
if (isValid$3(chartInstanceListRowByRowDirection[row])) for (const i in chartInstanceListRowByRowDirection[row]) {
|
|
43878
|
+
if (isValid$3(excludedCol) && Number(i) === excludedCol) continue;
|
|
43879
|
+
const cellGroup = table.scenegraph.getCell(Number(i), row),
|
|
43880
|
+
chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
|
|
43881
|
+
chartNode.addUpdateShapeAndBoundsTag(), isValid$3(chartNode) && (chartNode.deactivate(table, {
|
|
43882
|
+
releaseChartInstance: !0,
|
|
43883
|
+
releaseColumnChartInstance: !1,
|
|
43884
|
+
releaseRowChartInstance: !1
|
|
43885
|
+
}), chartInstanceListRowByRowDirection[row][i] = null);
|
|
43886
|
+
}
|
|
43887
|
+
delete chartInstanceListRowByRowDirection[row];
|
|
43888
|
+
}
|
|
43889
|
+
|
|
43641
43890
|
const CHART_NUMBER_TYPE = genNumberType();
|
|
43642
43891
|
class Chart extends Rect$1 {
|
|
43643
43892
|
constructor(isShareChartSpec, params) {
|
|
43644
|
-
if (super(params), this.type = "chart", this.numberType = CHART_NUMBER_TYPE, this.isShareChartSpec = isShareChartSpec, params.chartInstance) this.chartInstance = params.chartInstance;else {
|
|
43893
|
+
if (super(params), this.type = "chart", this.activeChartInstanceHoverOnMark = null, this.numberType = CHART_NUMBER_TYPE, this.isShareChartSpec = isShareChartSpec, params.chartInstance) this.chartInstance = params.chartInstance;else {
|
|
43645
43894
|
const chartInstance = this.chartInstance = new params.ClassType(params.spec, merge$1({}, this.attribute.tableChartOption, {
|
|
43646
43895
|
renderCanvas: params.canvas,
|
|
43647
43896
|
mode: "node" === this.attribute.mode ? "node" : "desktop-browser",
|
|
@@ -43663,7 +43912,7 @@
|
|
|
43663
43912
|
}
|
|
43664
43913
|
activate(table) {
|
|
43665
43914
|
var _a, _b, _c, _d, _e;
|
|
43666
|
-
this.
|
|
43915
|
+
if (this.activeChartInstance) return;
|
|
43667
43916
|
const {
|
|
43668
43917
|
col: col,
|
|
43669
43918
|
row: row
|
|
@@ -43681,7 +43930,7 @@
|
|
|
43681
43930
|
y1: y1 - table.scrollTop,
|
|
43682
43931
|
y2: y2 - table.scrollTop
|
|
43683
43932
|
});
|
|
43684
|
-
null === (_a = this.activeChartInstance) || void 0 === _a || _a.release(), this.activeChartInstance = new this.attribute.ClassType(this.attribute.spec, merge$1({}, this.attribute.tableChartOption, {
|
|
43933
|
+
null === (_a = this.activeChartInstance) || void 0 === _a || _a.release(), this.attribute.ClassType.globalConfig.uniqueTooltip = !1, this.activeChartInstance = new this.attribute.ClassType(this.attribute.spec, merge$1({}, this.attribute.tableChartOption, {
|
|
43685
43934
|
renderCanvas: this.attribute.canvas,
|
|
43686
43935
|
mode: "desktop-browser",
|
|
43687
43936
|
canvasControled: !1,
|
|
@@ -43727,16 +43976,56 @@
|
|
|
43727
43976
|
table.scenegraph.updateChartState(null === (_a = null == params ? void 0 : params.value) || void 0 === _a ? void 0 : _a.inBrushData), Chart.temp = 0, setTimeout(() => {
|
|
43728
43977
|
Chart.temp = 1;
|
|
43729
43978
|
}, 0);
|
|
43979
|
+
}), table.options.chartDimensionLinkage && this.activeChartInstance.on("dimensionHover", params => {
|
|
43980
|
+
var _a, _b, _c, _d, _e, _f;
|
|
43981
|
+
const dimensionInfo = null == params ? void 0 : params.dimensionInfo[0],
|
|
43982
|
+
canvasXY = null === (_a = null == params ? void 0 : params.event) || void 0 === _a ? void 0 : _a.canvas,
|
|
43983
|
+
viewport = null === (_b = null == params ? void 0 : params.event) || void 0 === _b ? void 0 : _b.viewport;
|
|
43984
|
+
if (viewport) {
|
|
43985
|
+
const xValue = dimensionInfo.data[0].series.positionToDataX(viewport.x),
|
|
43986
|
+
yValue = dimensionInfo.data[0].series.positionToDataY(viewport.y);
|
|
43987
|
+
if ("scatter" === this.attribute.spec.type) generateChartInstanceListByColumnDirection(col, xValue, void 0, canvasXY, table, !1, !0), generateChartInstanceListByRowDirection(row, void 0, yValue, canvasXY, table, !1, !0), (null === (_c = table.options.chartDimensionLinkage.labelHoverOnAxis) || void 0 === _c ? void 0 : _c.left) && table.scenegraph.getCell(table.rowHeaderLevelCount - 1, row).firstChild.showLabelHoverOnAxis(canvasXY.y - table.getCellRelativeRect(col, row).top, yValue), (null === (_d = table.options.chartDimensionLinkage.labelHoverOnAxis) || void 0 === _d ? void 0 : _d.bottom) && table.scenegraph.getCell(col, table.rowCount - table.bottomFrozenRowCount).firstChild.showLabelHoverOnAxis(canvasXY.x - table.getCellRelativeRect(col, row).left, xValue);else {
|
|
43988
|
+
let hideTooltip = !1;
|
|
43989
|
+
const preMark = this.activeChartInstanceHoverOnMark;
|
|
43990
|
+
if (params.mark && params.datum && !Array.isArray(params.datum) ? (this.activeChartInstanceHoverOnMark = params.mark, hideTooltip = !0) : this.activeChartInstanceHoverOnMark = null, "enter" === params.action || preMark !== this.activeChartInstanceHoverOnMark) {
|
|
43991
|
+
const dimensionValue = dimensionInfo.value;
|
|
43992
|
+
if (table.options.indicatorsAsCol) {
|
|
43993
|
+
const series = dimensionInfo.data[0].series,
|
|
43994
|
+
width = series.getYAxisHelper().getBandwidth(0),
|
|
43995
|
+
y = series.valueToPositionY(dimensionValue);
|
|
43996
|
+
(null === (_e = table.options.chartDimensionLinkage.labelHoverOnAxis) || void 0 === _e ? void 0 : _e.left) && table.scenegraph.getCell(table.rowHeaderLevelCount - 1, row).firstChild.showLabelHoverOnAxis(y + ("line" === series.type || "area" === series.type ? 0 : width / 2), yValue), generateChartInstanceListByRowDirection(row, dimensionValue, null, canvasXY, table, hideTooltip, !1);
|
|
43997
|
+
} else {
|
|
43998
|
+
const series = dimensionInfo.data[0].series,
|
|
43999
|
+
width = series.getXAxisHelper().getBandwidth(0),
|
|
44000
|
+
x = series.valueToPositionX(dimensionValue);
|
|
44001
|
+
(null === (_f = table.options.chartDimensionLinkage.labelHoverOnAxis) || void 0 === _f ? void 0 : _f.bottom) && table.scenegraph.getCell(col, table.rowCount - table.bottomFrozenRowCount).firstChild.showLabelHoverOnAxis(x + ("line" === series.type || "area" === series.type ? 0 : width / 2), dimensionValue), generateChartInstanceListByColumnDirection(col, dimensionValue, null, canvasXY, table, hideTooltip, !1);
|
|
44002
|
+
}
|
|
44003
|
+
}
|
|
44004
|
+
}
|
|
44005
|
+
}
|
|
43730
44006
|
}), null === (_e = (_d = table)._bindChartEvent) || void 0 === _e || _e.call(_d, this.activeChartInstance);
|
|
43731
44007
|
}
|
|
43732
|
-
deactivate(
|
|
43733
|
-
|
|
43734
|
-
|
|
43735
|
-
|
|
43736
|
-
|
|
43737
|
-
|
|
43738
|
-
|
|
43739
|
-
|
|
44008
|
+
deactivate(table, {
|
|
44009
|
+
releaseChartInstance = !0,
|
|
44010
|
+
releaseColumnChartInstance = !0,
|
|
44011
|
+
releaseRowChartInstance = !0
|
|
44012
|
+
} = {}) {
|
|
44013
|
+
var _a, _b, _c, _d, _e, _f;
|
|
44014
|
+
if (this.activeChartInstanceHoverOnMark = null, releaseChartInstance) {
|
|
44015
|
+
null === (_a = this.activeChartInstance) || void 0 === _a || _a.updateViewBox({
|
|
44016
|
+
x1: -1e3,
|
|
44017
|
+
x2: -800,
|
|
44018
|
+
y1: -1e3,
|
|
44019
|
+
y2: -800
|
|
44020
|
+
}, !1, !1), null === (_b = this.activeChartInstance) || void 0 === _b || _b.release(), this.activeChartInstance = null;
|
|
44021
|
+
const {
|
|
44022
|
+
col: col,
|
|
44023
|
+
row: row
|
|
44024
|
+
} = this.parent,
|
|
44025
|
+
table = this.stage.table;
|
|
44026
|
+
table.internalProps.layoutMap.isAxisCell(table.rowHeaderLevelCount - 1, row) && (null === (_d = (_c = table.scenegraph.getCell(table.rowHeaderLevelCount - 1, row).firstChild).hideLabelHoverOnAxis) || void 0 === _d || _d.call(_c)), table.internalProps.layoutMap.isAxisCell(col, table.rowCount - table.bottomFrozenRowCount) && (null === (_f = (_e = table.scenegraph.getCell(col, table.rowCount - table.bottomFrozenRowCount).firstChild).hideLabelHoverOnAxis) || void 0 === _f || _f.call(_e));
|
|
44027
|
+
}
|
|
44028
|
+
releaseColumnChartInstance && clearChartInstanceListByColumnDirection(this.parent.col, "scatter" === this.attribute.spec.type ? this.parent.row : void 0, table), releaseRowChartInstance && clearChartInstanceListByRowDirection(this.parent.row, "scatter" === this.attribute.spec.type ? this.parent.col : void 0, table);
|
|
43740
44029
|
}
|
|
43741
44030
|
updateData(data) {
|
|
43742
44031
|
this.attribute.data = data;
|
|
@@ -43977,11 +44266,10 @@
|
|
|
43977
44266
|
table: table
|
|
43978
44267
|
} = chart.getRootNode(),
|
|
43979
44268
|
{
|
|
43980
|
-
active: active,
|
|
43981
44269
|
cacheCanvas: cacheCanvas,
|
|
43982
44270
|
activeChartInstance: activeChartInstance
|
|
43983
44271
|
} = chart;
|
|
43984
|
-
if (!
|
|
44272
|
+
if (!activeChartInstance && cacheCanvas) isArray$7(cacheCanvas) ? cacheCanvas.forEach(singleCacheCanvas => {
|
|
43985
44273
|
const {
|
|
43986
44274
|
x: x,
|
|
43987
44275
|
y: y,
|
|
@@ -48271,10 +48559,17 @@
|
|
|
48271
48559
|
resetResidentHoverIcon(col, row, this);
|
|
48272
48560
|
}
|
|
48273
48561
|
deactivateChart(col, row) {
|
|
48274
|
-
var _a, _b;
|
|
48562
|
+
var _a, _b, _c;
|
|
48275
48563
|
if (-1 === col || -1 === row) return;
|
|
48276
48564
|
const cellGroup = this.getCell(col, row);
|
|
48277
|
-
|
|
48565
|
+
if (null === (_a = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _a ? void 0 : _a.deactivate) {
|
|
48566
|
+
const chartType = (null == cellGroup ? void 0 : cellGroup.firstChild).attribute.spec.type;
|
|
48567
|
+
null === (_c = null === (_b = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _b ? void 0 : _b.deactivate) || void 0 === _c || _c.call(_b, this.table, this.table.options.chartDimensionLinkage ? {
|
|
48568
|
+
releaseChartInstance: "scatter" === chartType ? col !== this.table.stateManager.hover.cellPos.col && row !== this.table.stateManager.hover.cellPos.row || this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount || this.table.stateManager.hover.cellPos.row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount || this.table.stateManager.hover.cellPos.col < this.table.frozenColCount || this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount : this.table.options.indicatorsAsCol ? row !== this.table.stateManager.hover.cellPos.row || this.table.stateManager.hover.cellPos.col < this.table.frozenColCount || this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount : col !== this.table.stateManager.hover.cellPos.col || this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount || this.table.stateManager.hover.cellPos.row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount,
|
|
48569
|
+
releaseColumnChartInstance: col !== this.table.stateManager.hover.cellPos.col || this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount || this.table.stateManager.hover.cellPos.row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount,
|
|
48570
|
+
releaseRowChartInstance: row !== this.table.stateManager.hover.cellPos.row || this.table.stateManager.hover.cellPos.col < this.table.frozenColCount || this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount
|
|
48571
|
+
} : void 0);
|
|
48572
|
+
}
|
|
48278
48573
|
}
|
|
48279
48574
|
activateChart(col, row) {
|
|
48280
48575
|
var _a, _b, _c;
|
|
@@ -50497,7 +50792,7 @@
|
|
|
50497
50792
|
}
|
|
50498
50793
|
checkFrozen() {
|
|
50499
50794
|
var _a, _b;
|
|
50500
|
-
let originalFrozenColCount =
|
|
50795
|
+
let originalFrozenColCount = null !== (_a = this.table.options.frozenColCount) && void 0 !== _a ? _a : this.table.isPivotTable() || this.table.isListTable() && this.table.internalProps.transpose ? (null !== (_b = this.table.rowHeaderLevelCount) && void 0 !== _b ? _b : 0) + this.table.internalProps.layoutMap.leftRowSeriesNumberColumnCount : 0;
|
|
50501
50796
|
if (originalFrozenColCount) {
|
|
50502
50797
|
originalFrozenColCount = Math.min(originalFrozenColCount, this.table.colCount);
|
|
50503
50798
|
const container = this.table.getContainer();
|
|
@@ -54866,7 +55161,7 @@
|
|
|
54866
55161
|
const axisRange = getRange("top", col, row + 1, col, layout.columnHeaderLevelCount - 1, col, row, 1, layout);
|
|
54867
55162
|
if (!axisRange) return;
|
|
54868
55163
|
const chartCellStyle = layout._table._getCellStyle(col, row + 1),
|
|
54869
|
-
|
|
55164
|
+
bodyChartCellPadding = getQuadProps(getProp("padding", chartCellStyle, col, row + 1, layout._table)),
|
|
54870
55165
|
{
|
|
54871
55166
|
range: range,
|
|
54872
55167
|
ticks: ticks,
|
|
@@ -54889,7 +55184,7 @@
|
|
|
54889
55184
|
},
|
|
54890
55185
|
__ticksForVTable: ticks,
|
|
54891
55186
|
__vtableChartTheme: theme,
|
|
54892
|
-
|
|
55187
|
+
__vtableBodyChartCellPadding: bodyChartCellPadding
|
|
54893
55188
|
});
|
|
54894
55189
|
}
|
|
54895
55190
|
if (row === layout.rowCount - layout.bottomFrozenRowCount && col >= layout.rowHeaderLevelCount && col < layout.colCount - layout.rightFrozenColCount) {
|
|
@@ -54905,7 +55200,7 @@
|
|
|
54905
55200
|
} = getAxisOption(col, row - 1, "bottom", layout);
|
|
54906
55201
|
if (!axisRange) return;
|
|
54907
55202
|
const chartCellStyle = layout._table._getCellStyle(col, row - 1),
|
|
54908
|
-
|
|
55203
|
+
bodyChartCellPadding = getQuadProps(getProp("padding", chartCellStyle, col, row - 1, layout._table)),
|
|
54909
55204
|
{
|
|
54910
55205
|
range: range,
|
|
54911
55206
|
ticks: ticks,
|
|
@@ -54941,7 +55236,7 @@
|
|
|
54941
55236
|
},
|
|
54942
55237
|
__ticksForVTable: ticks,
|
|
54943
55238
|
__vtableChartTheme: theme,
|
|
54944
|
-
|
|
55239
|
+
__vtableBodyChartCellPadding: bodyChartCellPadding
|
|
54945
55240
|
});
|
|
54946
55241
|
}
|
|
54947
55242
|
if (col === layout.rowHeaderLevelCount - 1 && row >= layout.columnHeaderLevelCount && row < layout.rowCount - layout.bottomFrozenRowCount) {
|
|
@@ -54957,7 +55252,7 @@
|
|
|
54957
55252
|
} = getAxisOption(col + 1, row, "left", layout);
|
|
54958
55253
|
if (!1 === (null == axisOption ? void 0 : axisOption.visible)) return;
|
|
54959
55254
|
const chartCellStyle = layout._table._getCellStyle(col + 1, row),
|
|
54960
|
-
|
|
55255
|
+
bodyChartCellPadding = getQuadProps(getProp("padding", chartCellStyle, col + 1, row, layout._table)),
|
|
54961
55256
|
spec = layout.getRawChartSpec(col + 1, row);
|
|
54962
55257
|
return merge$1({
|
|
54963
55258
|
domain: "linear" === (null == axisOption ? void 0 : axisOption.type) ? void 0 : Array.from(domain),
|
|
@@ -54970,7 +55265,7 @@
|
|
|
54970
55265
|
type: null !== (_e = null == axisOption ? void 0 : axisOption.type) && void 0 !== _e ? _e : "band",
|
|
54971
55266
|
__vtableChartTheme: theme,
|
|
54972
55267
|
inverse: transformInverse(axisOption, "horizontal" === (null !== (_f = null == spec ? void 0 : spec.direction) && void 0 !== _f ? _f : "scatter" === chartType ? "vertical" : "horizontal")),
|
|
54973
|
-
|
|
55268
|
+
__vtableBodyChartCellPadding: bodyChartCellPadding
|
|
54974
55269
|
});
|
|
54975
55270
|
}
|
|
54976
55271
|
} else {
|
|
@@ -54987,7 +55282,7 @@
|
|
|
54987
55282
|
} = getAxisOption(col + 1, row, "left", layout);
|
|
54988
55283
|
if (!axisRange) return;
|
|
54989
55284
|
const chartCellStyle = layout._table._getCellStyle(col + 1, row),
|
|
54990
|
-
|
|
55285
|
+
bodyChartCellPadding = getQuadProps(getProp("padding", chartCellStyle, col + 1, row, layout._table)),
|
|
54991
55286
|
{
|
|
54992
55287
|
range: range,
|
|
54993
55288
|
ticks: ticks,
|
|
@@ -55024,7 +55319,7 @@
|
|
|
55024
55319
|
},
|
|
55025
55320
|
__ticksForVTable: ticks,
|
|
55026
55321
|
__vtableChartTheme: theme,
|
|
55027
|
-
|
|
55322
|
+
__vtableBodyChartCellPadding: bodyChartCellPadding
|
|
55028
55323
|
});
|
|
55029
55324
|
}
|
|
55030
55325
|
if (col === layout.colCount - layout.rightFrozenColCount && row >= layout.columnHeaderLevelCount && row < layout.rowCount - layout.bottomFrozenRowCount) {
|
|
@@ -55034,7 +55329,7 @@
|
|
|
55034
55329
|
} = getAxisOption(col - 1, row, "right", layout);
|
|
55035
55330
|
if (!axisRange) return;
|
|
55036
55331
|
const chartCellStyle = layout._table._getCellStyle(col - 1, row),
|
|
55037
|
-
|
|
55332
|
+
bodyChartCellPadding = getQuadProps(getProp("padding", chartCellStyle, col - 1, row, layout._table)),
|
|
55038
55333
|
{
|
|
55039
55334
|
range: range,
|
|
55040
55335
|
ticks: ticks,
|
|
@@ -55069,7 +55364,7 @@
|
|
|
55069
55364
|
},
|
|
55070
55365
|
__ticksForVTable: ticks,
|
|
55071
55366
|
__vtableChartTheme: theme,
|
|
55072
|
-
|
|
55367
|
+
__vtableBodyChartCellPadding: bodyChartCellPadding
|
|
55073
55368
|
});
|
|
55074
55369
|
}
|
|
55075
55370
|
if (row === layout.rowCount - layout.bottomFrozenRowCount && col >= layout.rowHeaderLevelCount && col < layout.colCount - layout.rightFrozenColCount) {
|
|
@@ -55086,7 +55381,7 @@
|
|
|
55086
55381
|
} = getAxisOption(col, row - 1, "bottom", layout);
|
|
55087
55382
|
if (!1 === (null == axisOption ? void 0 : axisOption.visible)) return;
|
|
55088
55383
|
const chartCellStyle = layout._table._getCellStyle(col, row - 1),
|
|
55089
|
-
|
|
55384
|
+
bodyChartCellPadding = getQuadProps(getProp("padding", chartCellStyle, col, row - 1, layout._table));
|
|
55090
55385
|
return merge$1({
|
|
55091
55386
|
domain: "linear" === (null == axisOption ? void 0 : axisOption.type) ? void 0 : Array.from(domain),
|
|
55092
55387
|
range: "linear" === (null == axisOption ? void 0 : axisOption.type) ? domain : void 0
|
|
@@ -55094,13 +55389,13 @@
|
|
|
55094
55389
|
orient: "bottom",
|
|
55095
55390
|
type: null !== (_o = null == axisOption ? void 0 : axisOption.type) && void 0 !== _o ? _o : "band",
|
|
55096
55391
|
__vtableChartTheme: theme,
|
|
55097
|
-
|
|
55392
|
+
__vtableBodyChartCellPadding: bodyChartCellPadding
|
|
55098
55393
|
});
|
|
55099
55394
|
}
|
|
55100
55395
|
}
|
|
55101
55396
|
}
|
|
55102
55397
|
function getAxisOption(col, row, orient, layout) {
|
|
55103
|
-
var _a, _b;
|
|
55398
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
55104
55399
|
const spec = layout.getRawChartSpec(col, row),
|
|
55105
55400
|
axes = null !== (_a = spec.axes) && void 0 !== _a ? _a : [];
|
|
55106
55401
|
if (layout._table.pivotChartAxes.forEach(axis => {
|
|
@@ -55121,22 +55416,23 @@
|
|
|
55121
55416
|
isZeroAlign: isZeroAlign,
|
|
55122
55417
|
isTickAlign: isTickAlign
|
|
55123
55418
|
} = checkZeroAlign(spec, orient, layout);
|
|
55124
|
-
return {
|
|
55419
|
+
return axisOption.labelHoverOnAxis || (axisOption.labelHoverOnAxis = null !== (_d = null === (_c = null === (_b = layout._table.options.chartDimensionLinkage) || void 0 === _b ? void 0 : _b.labelHoverOnAxis) || void 0 === _c ? void 0 : _c[orient]) && void 0 !== _d ? _d : {}), {
|
|
55125
55420
|
axisOption: axisOption,
|
|
55126
55421
|
isPercent: spec.percent,
|
|
55127
55422
|
isZeroAlign: isZeroAlign,
|
|
55128
55423
|
isTickAlign: isTickAlign,
|
|
55129
55424
|
seriesIndice: seriesIndice,
|
|
55130
55425
|
theme: spec.theme,
|
|
55131
|
-
chartType: null !== (
|
|
55426
|
+
chartType: null !== (_e = null == seriesSpec ? void 0 : seriesSpec.type) && void 0 !== _e ? _e : spec.type
|
|
55132
55427
|
};
|
|
55133
55428
|
}
|
|
55134
55429
|
}
|
|
55135
|
-
const axisOption = layout._table.pivotChartAxes.find(axisOption => axisOption.orient === orient)
|
|
55136
|
-
|
|
55137
|
-
|
|
55138
|
-
|
|
55139
|
-
|
|
55430
|
+
const axisOption = null !== (_f = layout._table.pivotChartAxes.find(axisOption => axisOption.orient === orient)) && void 0 !== _f ? _f : {};
|
|
55431
|
+
axisOption.labelHoverOnAxis || (axisOption.labelHoverOnAxis = null !== (_j = null === (_h = null === (_g = layout._table.options.chartDimensionLinkage) || void 0 === _g ? void 0 : _g.labelHoverOnAxis) || void 0 === _h ? void 0 : _h[orient]) && void 0 !== _j ? _j : {});
|
|
55432
|
+
const {
|
|
55433
|
+
isZeroAlign: isZeroAlign,
|
|
55434
|
+
isTickAlign: isTickAlign
|
|
55435
|
+
} = checkZeroAlign(spec, orient, layout);
|
|
55140
55436
|
return {
|
|
55141
55437
|
axisOption: axisOption,
|
|
55142
55438
|
isPercent: !1,
|
|
@@ -55599,7 +55895,7 @@
|
|
|
55599
55895
|
}
|
|
55600
55896
|
constructor(container, options = {}) {
|
|
55601
55897
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
55602
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.22.
|
|
55898
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.22.5-alpha.0", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
|
|
55603
55899
|
this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
|
|
55604
55900
|
options: options,
|
|
55605
55901
|
container: container
|
|
@@ -56440,7 +56736,7 @@
|
|
|
56440
56736
|
colEnd: colEnd
|
|
56441
56737
|
};
|
|
56442
56738
|
}
|
|
56443
|
-
getBodyVisibleRowRange() {
|
|
56739
|
+
getBodyVisibleRowRange(deltaY = 0) {
|
|
56444
56740
|
const {
|
|
56445
56741
|
scrollTop: scrollTop
|
|
56446
56742
|
} = this,
|
|
@@ -56449,13 +56745,13 @@
|
|
|
56449
56745
|
{
|
|
56450
56746
|
row: rowStart
|
|
56451
56747
|
} = this.getRowAt(scrollTop + frozenRowsHeight + 1),
|
|
56452
|
-
rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight ? this.getRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight).row : this.rowCount - 1;
|
|
56748
|
+
rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight ? this.getRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight + deltaY).row : this.rowCount - 1;
|
|
56453
56749
|
return rowEnd < 0 ? null : {
|
|
56454
56750
|
rowStart: rowStart,
|
|
56455
56751
|
rowEnd: rowEnd
|
|
56456
56752
|
};
|
|
56457
56753
|
}
|
|
56458
|
-
getBodyVisibleColRange() {
|
|
56754
|
+
getBodyVisibleColRange(deltaX = 0) {
|
|
56459
56755
|
const {
|
|
56460
56756
|
scrollLeft: scrollLeft
|
|
56461
56757
|
} = this,
|
|
@@ -56464,7 +56760,7 @@
|
|
|
56464
56760
|
{
|
|
56465
56761
|
col: colStart
|
|
56466
56762
|
} = this.getColAt(scrollLeft + frozenColsWidth + 1),
|
|
56467
|
-
colEnd = this.getAllColsWidth() > this.tableNoFrameWidth ? this.getColAt(scrollLeft + this.tableNoFrameWidth - 1 - rightFrozenColsWidth).col : this.colCount - 1;
|
|
56763
|
+
colEnd = this.getAllColsWidth() > this.tableNoFrameWidth ? this.getColAt(scrollLeft + this.tableNoFrameWidth - 1 - rightFrozenColsWidth + deltaX).col : this.colCount - 1;
|
|
56468
56764
|
return colEnd < 0 ? null : {
|
|
56469
56765
|
colStart: colStart,
|
|
56470
56766
|
colEnd: colEnd
|
|
@@ -58973,7 +59269,8 @@
|
|
|
58973
59269
|
visible: null === (_l = spec.background) || void 0 === _l ? void 0 : _l.visible,
|
|
58974
59270
|
style: transformToGraphic(null === (_m = spec.background) || void 0 === _m ? void 0 : _m.style),
|
|
58975
59271
|
state: transformStateStyle(null === (_o = spec.background) || void 0 === _o ? void 0 : _o.state)
|
|
58976
|
-
}
|
|
59272
|
+
},
|
|
59273
|
+
labelHoverOnAxis: spec.labelHoverOnAxis
|
|
58977
59274
|
};
|
|
58978
59275
|
}
|
|
58979
59276
|
|
|
@@ -59966,6 +60263,7 @@
|
|
|
59966
60263
|
if (this.editingEditor) return;
|
|
59967
60264
|
const editor = this.table.getEditor(col, row);
|
|
59968
60265
|
if (editor) {
|
|
60266
|
+
if (this.table.internalProps.layoutMap.isSeriesNumber(col, row)) return;
|
|
59969
60267
|
if (null === (_b = null === (_a = this.table.internalProps.layoutMap) || void 0 === _a ? void 0 : _a.isAggregation) || void 0 === _b ? void 0 : _b.call(_a, col, row)) {
|
|
59970
60268
|
const isPivotTable = null === (_d = (_c = this.table).isPivotTable) || void 0 === _d ? void 0 : _d.call(_c),
|
|
59971
60269
|
updateAggregationOnEditCell = !!isPivotTable && (null === (_f = null === (_e = this.table.internalProps) || void 0 === _e ? void 0 : _e.dataConfig) || void 0 === _f ? void 0 : _f.updateAggregationOnEditCell);
|
|
@@ -62713,18 +63011,18 @@
|
|
|
62713
63011
|
|
|
62714
63012
|
const scaleParser = scale => scale;
|
|
62715
63013
|
class CartesianAxis {
|
|
62716
|
-
constructor(option, width, height,
|
|
62717
|
-
var _a, _b, _c;
|
|
62718
|
-
if (this.x = 0, this.y = 0, this.
|
|
63014
|
+
constructor(option, width, height, bodyChartCellPadding, table) {
|
|
63015
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
63016
|
+
if (this.x = 0, this.y = 0, this.bodyChartCellPadding = bodyChartCellPadding, this.table = table, this.orient = null !== (_a = option.orient) && void 0 !== _a ? _a : "left", this.type = null !== (_b = option.type) && void 0 !== _b ? _b : "band", this.option = merge$1({}, getCommonAxis(option.__vtableChartTheme), getTableAxisTheme(this.orient, table.theme), getChartSpecAxisTheme(this.orient, this.type, option.__vtableChartTheme), option), "left" === this.orient || "right" === this.orient) {
|
|
62719
63017
|
const innerOffsetTop = 0,
|
|
62720
63018
|
innerOffsetBottom = 0;
|
|
62721
|
-
this.width = width, this.height = height -
|
|
63019
|
+
"left" === this.orient && (this.x = null !== (_c = this.option.cellPaddingLeft) && void 0 !== _c ? _c : 0, this.width = width - (null !== (_d = this.option.cellPaddingLeft) && void 0 !== _d ? _d : 0)), "right" === this.orient && (this.x = 0, this.width = width - (null !== (_e = this.option.cellPaddingRight) && void 0 !== _e ? _e : 0)), this.height = height - bodyChartCellPadding[0] - bodyChartCellPadding[2] - innerOffsetBottom, this.y = bodyChartCellPadding[0] + innerOffsetTop;
|
|
62722
63020
|
} else if ("top" === this.orient || "bottom" === this.orient) {
|
|
62723
63021
|
const innerOffsetLeft = 0,
|
|
62724
63022
|
innerOffsetRight = 0;
|
|
62725
|
-
this.width = width -
|
|
63023
|
+
this.width = width - bodyChartCellPadding[1] - bodyChartCellPadding[3] - innerOffsetRight, this.x = bodyChartCellPadding[3] + innerOffsetLeft, "top" === this.orient && (this.y = null !== (_f = this.option.cellPaddingTop) && void 0 !== _f ? _f : 0, this.height = height - (null !== (_g = this.option.cellPaddingTop) && void 0 !== _g ? _g : 0)), "bottom" === this.orient && (this.y = 0, this.height = height - (null !== (_h = this.option.cellPaddingBottom) && void 0 !== _h ? _h : 0));
|
|
62726
63024
|
}
|
|
62727
|
-
this.visible = null === (
|
|
63025
|
+
this.visible = null === (_j = option.visible) || void 0 === _j || _j, this.inverse = "inverse" in option && !!option.inverse, "band" === option.type && (this.data = option.domain), this.initScale(), this.initData(), this.createComponent(), this.initEvent();
|
|
62728
63026
|
}
|
|
62729
63027
|
initScale() {
|
|
62730
63028
|
const option = this.option;
|
|
@@ -62771,7 +63069,8 @@
|
|
|
62771
63069
|
})), this.component.originAxis = this;
|
|
62772
63070
|
}
|
|
62773
63071
|
resize(width, height) {
|
|
62774
|
-
|
|
63072
|
+
var _a, _b, _c, _d;
|
|
63073
|
+
"left" === this.orient ? this.width = width - (null !== (_a = this.option.cellPaddingLeft) && void 0 !== _a ? _a : 0) : "right" === this.orient ? this.width = width - (null !== (_b = this.option.cellPaddingRight) && void 0 !== _b ? _b : 0) : "top" !== this.orient && "bottom" !== this.orient || (this.width = width - (this.bodyChartCellPadding[1] + this.bodyChartCellPadding[3])), "top" === this.orient ? this.height = height - (null !== (_c = this.option.cellPaddingTop) && void 0 !== _c ? _c : 0) : "bottom" === this.orient ? this.height = height - (null !== (_d = this.option.cellPaddingBottom) && void 0 !== _d ? _d : 0) : "left" !== this.orient && "right" !== this.orient || (this.height = height - (this.bodyChartCellPadding[2] + this.bodyChartCellPadding[0])), this.updateScaleRange(), this.computeData();
|
|
62775
63074
|
const axisStylrAttrs = getAxisAttributes(this.option),
|
|
62776
63075
|
attrs = this.getUpdateAttribute();
|
|
62777
63076
|
attrs.verticalFactor = "top" === this.orient || "right" === this.orient ? -1 : 1, this.component.setAttributes(merge$1({}, axisStylrAttrs, attrs)), this.component.setAttributes(this.setLayoutStartPosition({
|
|
@@ -62891,7 +63190,7 @@
|
|
|
62891
63190
|
}
|
|
62892
63191
|
|
|
62893
63192
|
function computeAxisComponentWidth(config, table) {
|
|
62894
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
63193
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
62895
63194
|
const attribute = merge$1({}, commonAxis, config);
|
|
62896
63195
|
let tickWidth = 0;
|
|
62897
63196
|
!1 !== attribute.tick.visible && (tickWidth = null !== (_a = attribute.tick.width) && void 0 !== _a ? _a : 4);
|
|
@@ -62953,10 +63252,12 @@
|
|
|
62953
63252
|
size = getSizeAfterResize(Math.min(width, widthLimit), height, null === (_s = null === (_r = attribute.title) || void 0 === _r ? void 0 : _r.style) || void 0 === _s ? void 0 : _s.angle);
|
|
62954
63253
|
titleWidth = "left" !== config.orient && "right" !== config.orient || !attribute.title.autoRotate ? size.width : size.height, titleWidth += null !== (_t = attribute.title.space) && void 0 !== _t ? _t : 4;
|
|
62955
63254
|
}
|
|
62956
|
-
|
|
63255
|
+
let paddingWidth = 0;
|
|
63256
|
+
const themeAxisConfig = getTableAxisTheme(config.orient, table.theme);
|
|
63257
|
+
return "left" === config.orient ? paddingWidth = null !== (_u = null == themeAxisConfig ? void 0 : themeAxisConfig.cellPaddingLeft) && void 0 !== _u ? _u : 0 : "right" === config.orient && (paddingWidth = null !== (_v = null == themeAxisConfig ? void 0 : themeAxisConfig.cellPaddingRight) && void 0 !== _v ? _v : 0), Math.ceil(tickWidth + labelWidth + titleWidth + paddingWidth + 1);
|
|
62957
63258
|
}
|
|
62958
63259
|
function computeAxisComponentHeight(config, table) {
|
|
62959
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
63260
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
62960
63261
|
const attribute = merge$1({}, commonAxis, config);
|
|
62961
63262
|
let tickHeight = 0;
|
|
62962
63263
|
!1 !== attribute.tick.visible && (tickHeight = null !== (_a = attribute.tick.width) && void 0 !== _a ? _a : 4);
|
|
@@ -63018,7 +63319,9 @@
|
|
|
63018
63319
|
size = getSizeAfterResize(Math.min(width, widthLimit), height, null === (_s = null === (_r = attribute.title) || void 0 === _r ? void 0 : _r.style) || void 0 === _s ? void 0 : _s.angle);
|
|
63019
63320
|
titleHeight = "bottom" !== config.orient && "top" !== config.orient || !attribute.title.autoRotate ? size.height : size.width, titleHeight += null !== (_t = attribute.title.space) && void 0 !== _t ? _t : 4;
|
|
63020
63321
|
}
|
|
63021
|
-
|
|
63322
|
+
let paddingHeight = 0;
|
|
63323
|
+
const themeAxisConfig = getTableAxisTheme(config.orient, table.theme);
|
|
63324
|
+
return "top" === config.orient ? paddingHeight = null !== (_u = null == themeAxisConfig ? void 0 : themeAxisConfig.cellPaddingTop) && void 0 !== _u ? _u : 0 : "bottom" === config.orient && (paddingHeight = null !== (_v = null == themeAxisConfig ? void 0 : themeAxisConfig.cellPaddingBottom) && void 0 !== _v ? _v : 0), tickHeight + labelHeight + titleHeight + paddingHeight + 1;
|
|
63022
63325
|
}
|
|
63023
63326
|
function formatDecimal(number) {
|
|
63024
63327
|
return "number" != typeof number && (number = Number(number)), Number(number.toPrecision(1)).toString();
|