@visactor/vchart 1.5.1-alpha.2 → 1.5.1-alpha.4
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/build/es5/index.js +1 -1
- package/build/index.js +361 -288
- package/build/index.min.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/compile/compiler.d.ts +0 -1
- package/cjs/compile/compiler.js +1 -1
- package/cjs/compile/compiler.js.map +1 -1
- package/cjs/compile/util.js.map +1 -1
- package/cjs/component/tooltip/handler/base.d.ts +2 -4
- package/cjs/component/tooltip/handler/base.js +15 -38
- package/cjs/component/tooltip/handler/base.js.map +1 -1
- package/cjs/component/tooltip/handler/canvas/canvas-tooltip-handler.js +2 -2
- package/cjs/component/tooltip/handler/canvas/canvas-tooltip-handler.js.map +1 -1
- package/cjs/component/tooltip/handler/dom/dom-tooltip-handler.js +2 -2
- package/cjs/component/tooltip/handler/dom/dom-tooltip-handler.js.map +1 -1
- package/cjs/component/tooltip/handler/dom/util.d.ts +1 -2
- package/cjs/component/tooltip/handler/dom/util.js +14 -13
- package/cjs/component/tooltip/handler/dom/util.js.map +1 -1
- package/cjs/component/tooltip/handler/interface/style.d.ts +4 -23
- package/cjs/component/tooltip/handler/interface/style.js.map +1 -1
- package/cjs/component/tooltip/handler/utils/attribute.d.ts +9 -11
- package/cjs/component/tooltip/handler/utils/attribute.js +136 -126
- package/cjs/component/tooltip/handler/utils/attribute.js.map +1 -1
- package/cjs/component/tooltip/handler/utils/common.d.ts +8 -0
- package/cjs/component/tooltip/handler/utils/common.js +42 -2
- package/cjs/component/tooltip/handler/utils/common.js.map +1 -1
- package/cjs/component/tooltip/handler/utils/index.d.ts +0 -1
- package/cjs/component/tooltip/handler/utils/index.js +1 -2
- package/cjs/component/tooltip/handler/utils/index.js.map +1 -1
- package/cjs/component/tooltip/interface/theme.d.ts +5 -3
- package/cjs/component/tooltip/interface/theme.js.map +1 -1
- package/cjs/core/index.d.ts +1 -1
- package/cjs/core/index.js +1 -1
- package/cjs/core/index.js.map +1 -1
- package/cjs/core/vchart.js +1 -1
- package/cjs/core/vchart.js.map +1 -1
- package/cjs/env/env.d.ts +7 -0
- package/cjs/env/env.js +48 -0
- package/cjs/env/env.js.map +1 -0
- package/cjs/env/index.d.ts +1 -0
- package/cjs/env/index.js +21 -0
- package/cjs/env/index.js.map +1 -0
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +2 -1
- package/cjs/index.js.map +1 -1
- package/cjs/interaction/interaction.js +1 -2
- package/cjs/interaction/trigger.js +2 -1
- package/cjs/mark/arc.js +1 -1
- package/cjs/mark/area.js +1 -1
- package/cjs/series/gauge/gauge.d.ts +2 -0
- package/cjs/series/gauge/gauge.js +10 -4
- package/cjs/series/gauge/gauge.js.map +1 -1
- package/cjs/series/sankey/sankey.js +3 -18
- package/cjs/series/sankey/sankey.js.map +1 -1
- package/cjs/theme/builtin/common/series/gauge.js +1 -1
- package/cjs/theme/builtin/common/series/gauge.js.map +1 -1
- package/cjs/vchart-all.js +3 -2
- package/cjs/vchart-all.js.map +1 -1
- package/cjs/vchart-simple.js +3 -2
- package/cjs/vchart-simple.js.map +1 -1
- package/esm/compile/compiler.d.ts +0 -1
- package/esm/compile/compiler.js +1 -1
- package/esm/compile/compiler.js.map +1 -1
- package/esm/compile/util.js.map +1 -1
- package/esm/component/tooltip/handler/base.d.ts +2 -4
- package/esm/component/tooltip/handler/base.js +14 -39
- package/esm/component/tooltip/handler/base.js.map +1 -1
- package/esm/component/tooltip/handler/canvas/canvas-tooltip-handler.js +2 -2
- package/esm/component/tooltip/handler/canvas/canvas-tooltip-handler.js.map +1 -1
- package/esm/component/tooltip/handler/dom/dom-tooltip-handler.js +2 -2
- package/esm/component/tooltip/handler/dom/dom-tooltip-handler.js.map +1 -1
- package/esm/component/tooltip/handler/dom/util.d.ts +1 -2
- package/esm/component/tooltip/handler/dom/util.js +14 -14
- package/esm/component/tooltip/handler/dom/util.js.map +1 -1
- package/esm/component/tooltip/handler/interface/style.d.ts +4 -23
- package/esm/component/tooltip/handler/interface/style.js.map +1 -1
- package/esm/component/tooltip/handler/utils/attribute.d.ts +9 -11
- package/esm/component/tooltip/handler/utils/attribute.js +131 -123
- package/esm/component/tooltip/handler/utils/attribute.js.map +1 -1
- package/esm/component/tooltip/handler/utils/common.d.ts +8 -0
- package/esm/component/tooltip/handler/utils/common.js +41 -1
- package/esm/component/tooltip/handler/utils/common.js.map +1 -1
- package/esm/component/tooltip/handler/utils/index.d.ts +0 -1
- package/esm/component/tooltip/handler/utils/index.js +0 -2
- package/esm/component/tooltip/handler/utils/index.js.map +1 -1
- package/esm/component/tooltip/interface/theme.d.ts +5 -3
- package/esm/component/tooltip/interface/theme.js.map +1 -1
- package/esm/core/index.d.ts +1 -1
- package/esm/core/index.js +1 -1
- package/esm/core/index.js.map +1 -1
- package/esm/core/vchart.js +3 -3
- package/esm/core/vchart.js.map +1 -1
- package/esm/env/env.d.ts +7 -0
- package/esm/env/env.js +32 -0
- package/esm/env/env.js.map +1 -0
- package/esm/env/index.d.ts +1 -0
- package/esm/env/index.js +2 -0
- package/esm/env/index.js.map +1 -0
- package/esm/index.d.ts +1 -0
- package/esm/index.js +2 -0
- package/esm/index.js.map +1 -1
- package/esm/interaction/interaction.js +1 -2
- package/esm/interaction/trigger.js +2 -1
- package/esm/mark/arc.js +1 -1
- package/esm/mark/area.js +1 -1
- package/esm/series/gauge/gauge.d.ts +2 -0
- package/esm/series/gauge/gauge.js +10 -4
- package/esm/series/gauge/gauge.js.map +1 -1
- package/esm/series/sankey/sankey.js +3 -17
- package/esm/series/sankey/sankey.js.map +1 -1
- package/esm/theme/builtin/common/series/gauge.js +1 -1
- package/esm/theme/builtin/common/series/gauge.js.map +1 -1
- package/esm/vchart-all.js +4 -1
- package/esm/vchart-all.js.map +1 -1
- package/esm/vchart-simple.js +4 -1
- package/esm/vchart-simple.js.map +1 -1
- package/package.json +14 -14
- package/cjs/component/tooltip/handler/utils/style.d.ts +0 -4
- package/cjs/component/tooltip/handler/utils/style.js +0 -32
- package/cjs/component/tooltip/handler/utils/style.js.map +0 -1
- package/esm/component/tooltip/handler/utils/style.d.ts +0 -4
- package/esm/component/tooltip/handler/utils/style.js +0 -26
- package/esm/component/tooltip/handler/utils/style.js.map +0 -1
package/build/index.js
CHANGED
|
@@ -22154,16 +22154,17 @@
|
|
|
22154
22154
|
}
|
|
22155
22155
|
createCommonPattern(size, padding, color, targetContext, cb) {
|
|
22156
22156
|
const r = (size - 2 * padding) / 2,
|
|
22157
|
+
dpr = targetContext.dpr,
|
|
22157
22158
|
canvas = canvasAllocate.allocate({
|
|
22158
22159
|
width: size,
|
|
22159
22160
|
height: size,
|
|
22160
|
-
dpr:
|
|
22161
|
+
dpr: dpr
|
|
22161
22162
|
}),
|
|
22162
22163
|
ctx = canvas.getContext("2d");
|
|
22163
22164
|
if (!ctx) return null;
|
|
22164
|
-
ctx.clearRect(0, 0, size, size), cb(r, ctx);
|
|
22165
|
+
ctx.inuse = !0, ctx.clearMatrix(), ctx.setTransformForCurrent(!0), ctx.clearRect(0, 0, size, size), cb(r, ctx);
|
|
22165
22166
|
const pattern = targetContext.createPattern(canvas.nativeCanvas, "repeat");
|
|
22166
|
-
return canvasAllocate.free(canvas), pattern;
|
|
22167
|
+
return pattern.setTransform && pattern.setTransform(new DOMMatrix([1 / dpr, 0, 0, 1 / dpr, 0, 0])), canvasAllocate.free(canvas), pattern;
|
|
22167
22168
|
}
|
|
22168
22169
|
createCirclePattern(size, padding, color, targetContext) {
|
|
22169
22170
|
return this.createCommonPattern(size, padding, color, targetContext, (r, ctx) => {
|
|
@@ -27312,7 +27313,7 @@
|
|
|
27312
27313
|
const gauge = {
|
|
27313
27314
|
outerRadius: 0.8,
|
|
27314
27315
|
innerRadius: 0.6,
|
|
27315
|
-
padAngle:
|
|
27316
|
+
padAngle: 1.146,
|
|
27316
27317
|
segment: {
|
|
27317
27318
|
style: {
|
|
27318
27319
|
fillOpacity: 1
|
|
@@ -38696,7 +38697,7 @@
|
|
|
38696
38697
|
})), Factory$1.registerAnimationType("linkPathGrowIn", linkPathGrowIn), Factory$1.registerAnimationType("linkPathGrowOut", linkPathGrowOut), Factory$1.registerAnimationType("linkPathUpdate", linkPathUpdate);
|
|
38697
38698
|
};
|
|
38698
38699
|
|
|
38699
|
-
const GROUP_ATTRIBUTES = ["x", "y", "dx", "dy", "scaleX", "scaleY", "angle", "anchor", "postMatrix", "visible", "clip", "pickable", "childrenPickable", "zIndex"];
|
|
38700
|
+
const GROUP_ATTRIBUTES = ["x", "y", "dx", "dy", "scaleX", "scaleY", "angle", "anchor", "postMatrix", "visible", "clip", "pickable", "childrenPickable", "zIndex", "cursor"];
|
|
38700
38701
|
class AbstractComponent extends Group$1 {
|
|
38701
38702
|
constructor(attributes) {
|
|
38702
38703
|
let mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "2d";
|
|
@@ -38780,7 +38781,11 @@
|
|
|
38780
38781
|
} = this._getSliderRenderBounds();
|
|
38781
38782
|
"vertical" === direction ? (currentPos = e.clientY, delta = currentPos - this._prePos, currentScrollValue = delta / height) : (currentPos = e.clientX, delta = currentPos - this._prePos, currentScrollValue = delta / width), this.setScrollRange([preScrollRange[0] + currentScrollValue, preScrollRange[1] + currentScrollValue], !0), this._prePos = currentPos;
|
|
38782
38783
|
}, this._onSliderPointerUp = e => {
|
|
38783
|
-
e.preventDefault(), "browser" === vglobal.env ? (vglobal.removeEventListener("pointermove", this._onSliderPointerMove
|
|
38784
|
+
e.preventDefault(), "browser" === vglobal.env ? (vglobal.removeEventListener("pointermove", this._onSliderPointerMove, {
|
|
38785
|
+
capture: !0
|
|
38786
|
+
}), vglobal.removeEventListener("pointerup", this._onSliderPointerUp)) : (this._slider.removeEventListener("pointermove", this._onSliderPointerMove, {
|
|
38787
|
+
capture: !0
|
|
38788
|
+
}), this._slider.removeEventListener("pointerup", this._onSliderPointerUp), this._slider.removeEventListener("pointerupoutside", this._onSliderPointerUp));
|
|
38784
38789
|
};
|
|
38785
38790
|
}
|
|
38786
38791
|
setScrollRange(range) {
|
|
@@ -38805,7 +38810,7 @@
|
|
|
38805
38810
|
return this.attribute.range;
|
|
38806
38811
|
}
|
|
38807
38812
|
bindEvents() {
|
|
38808
|
-
this._rail && this._rail.addEventListener("pointerdown", this._onRailPointerDown), this._slider && this._slider.addEventListener("pointerdown", this._onSliderPointerDown);
|
|
38813
|
+
this.attribute.disableTriggerEvent || (this._rail && this._rail.addEventListener("pointerdown", this._onRailPointerDown), this._slider && this._slider.addEventListener("pointerdown", this._onSliderPointerDown));
|
|
38809
38814
|
}
|
|
38810
38815
|
render() {
|
|
38811
38816
|
this._reset();
|
|
@@ -40089,6 +40094,7 @@
|
|
|
40089
40094
|
isFunction$1(dataFilter) && (data = dataFilter(data)), labels = isFunction$1(customLayoutFunc) ? customLayoutFunc(data, d => this._idToGraphic.get(d.id)) : this._layout(data), isFunction$1(customOverlapFunc) ? labels = customOverlapFunc(labels, d => this._idToGraphic.get(d.id)) : !1 !== overlap && (labels = this._overlapping(labels)), !1 !== smartInvert && this._smartInvert(labels), this._renderLabels(labels);
|
|
40090
40095
|
}
|
|
40091
40096
|
_bindEvent(target) {
|
|
40097
|
+
if (this.attribute.disableTriggerEvent) return;
|
|
40092
40098
|
if (!target) return;
|
|
40093
40099
|
const {
|
|
40094
40100
|
hover: hover,
|
|
@@ -41330,10 +41336,11 @@
|
|
|
41330
41336
|
line.name = `${this.name}-line`, line.id = this._getNodeId("line" + index), isEmpty(null == state ? void 0 : state.line) || (line.states = isArray$1(state.line) ? null !== (_b = state.line[index]) && void 0 !== _b ? _b : state.line[state.line.length - 1] : state.line), this.add(line);
|
|
41331
41337
|
});
|
|
41332
41338
|
} else {
|
|
41333
|
-
const line =
|
|
41339
|
+
const line = createPolygon(Object.assign(Object.assign({
|
|
41334
41340
|
points: this._clipPoints(this.attribute.points)
|
|
41335
41341
|
}, array(lineStyle)[0]), {
|
|
41336
|
-
fill: !1
|
|
41342
|
+
fill: !1,
|
|
41343
|
+
closePath: !1
|
|
41337
41344
|
}));
|
|
41338
41345
|
line.name = `${this.name}-line`, line.id = this._getNodeId("line"), isEmpty(null == state ? void 0 : state.line) || (line.states = [].concat(state.line)[0]), this.add(line);
|
|
41339
41346
|
}
|
|
@@ -41584,6 +41591,7 @@
|
|
|
41584
41591
|
}), this.add(this._innerView), this._renderInner(this._innerView), this._bindEvent();
|
|
41585
41592
|
}
|
|
41586
41593
|
_bindEvent() {
|
|
41594
|
+
if (this.attribute.disableTriggerEvent) return;
|
|
41587
41595
|
const {
|
|
41588
41596
|
hover: hover,
|
|
41589
41597
|
select: select
|
|
@@ -43227,6 +43235,7 @@
|
|
|
43227
43235
|
start && (this.state.start = start), end && (this.state.end = end), this._isHorizontal = "top" === orient || "bottom" === orient, this._layoutCache.max = this._isHorizontal ? width : height, this._layoutCache.attPos = this._isHorizontal ? "x" : "y", this._layoutCache.attSize = this._isHorizontal ? "width" : "height", this._activeCache.startPos = position, this._activeCache.lastPos = position, this._showText = "auto" !== showDetail && showDetail, previewData && (this._previewData = previewData), isFunction$1(previewCallbackX) && (this._previewCallbackX = previewCallbackX), isFunction$1(previewCallbackY) && (this._previewCallbackY = previewCallbackY), isFunction$1(previewCallbackX1) && (this._previewCallbackX1 = previewCallbackX1), isFunction$1(previewCallbackY1) && (this._previewCallbackY1 = previewCallbackY1), isFunction$1(updateStateCallback) && (this._updateStateCallback = updateStateCallback);
|
|
43228
43236
|
}
|
|
43229
43237
|
bindEvents() {
|
|
43238
|
+
if (this.attribute.disableTriggerEvent) return;
|
|
43230
43239
|
const {
|
|
43231
43240
|
showDetail: showDetail,
|
|
43232
43241
|
brushSelect: brushSelect
|
|
@@ -44018,6 +44027,12 @@
|
|
|
44018
44027
|
}
|
|
44019
44028
|
|
|
44020
44029
|
let MarkLine$1 = class MarkLine extends Marker {
|
|
44030
|
+
getLine() {
|
|
44031
|
+
return this._line;
|
|
44032
|
+
}
|
|
44033
|
+
getLabel() {
|
|
44034
|
+
return this._label;
|
|
44035
|
+
}
|
|
44021
44036
|
constructor(attributes) {
|
|
44022
44037
|
super(merge$1({}, MarkLine.defaultAttributes, attributes));
|
|
44023
44038
|
}
|
|
@@ -44114,6 +44129,12 @@
|
|
|
44114
44129
|
MarkLine$1.defaultAttributes = DEFAULT_MARK_LINE_THEME;
|
|
44115
44130
|
|
|
44116
44131
|
let MarkArea$1 = class MarkArea extends Marker {
|
|
44132
|
+
getArea() {
|
|
44133
|
+
return this._area;
|
|
44134
|
+
}
|
|
44135
|
+
getLabel() {
|
|
44136
|
+
return this._label;
|
|
44137
|
+
}
|
|
44117
44138
|
constructor(attributes) {
|
|
44118
44139
|
super(merge$1({}, MarkArea.defaultAttributes, attributes));
|
|
44119
44140
|
}
|
|
@@ -44484,7 +44505,7 @@
|
|
|
44484
44505
|
container.translateTo(0 - containerBounds.x1 + parsedPadding[3], 0 - containerBounds.y1 + parsedPadding[0]), this.add(container), this.attribute.width = width + parsedPadding[1] + parsedPadding[3], this.attribute.height = height + parsedPadding[0] + parsedPadding[2], this._bindEvents();
|
|
44485
44506
|
}
|
|
44486
44507
|
_bindEvents() {
|
|
44487
|
-
this.preHandler && (this.preHandler.addEventListener("pointerenter", this._onHover), this.preHandler.addEventListener("pointerleave", this._onUnHover), this.preHandler.addEventListener("pointerdown", this._onClick)), this.nextHandler && (this.nextHandler.addEventListener("pointerenter", this._onHover), this.nextHandler.addEventListener("pointerleave", this._onUnHover), this.nextHandler.addEventListener("pointerdown", this._onClick));
|
|
44508
|
+
this.attribute.disableTriggerEvent || (this.preHandler && (this.preHandler.addEventListener("pointerenter", this._onHover), this.preHandler.addEventListener("pointerleave", this._onUnHover), this.preHandler.addEventListener("pointerdown", this._onClick)), this.nextHandler && (this.nextHandler.addEventListener("pointerenter", this._onHover), this.nextHandler.addEventListener("pointerleave", this._onUnHover), this.nextHandler.addEventListener("pointerdown", this._onClick)));
|
|
44488
44509
|
}
|
|
44489
44510
|
_reset() {
|
|
44490
44511
|
this.removeAllChild(), this._current = 1, this._total = this.attribute.total, this.preHandler = this.nextHandler = this.text = null;
|
|
@@ -44713,6 +44734,7 @@
|
|
|
44713
44734
|
doWrap && autoPage && pages > maxPages && (pagerRendered = this._renderPager(isHorizontal)), pagerRendered || (itemsContainer.setAttribute("y", this._title ? this._title.AABBBounds.height() + get$1(this.attribute, "title.space", 8) : 0), this._innerView.add(itemsContainer));
|
|
44714
44735
|
}
|
|
44715
44736
|
_bindEvents() {
|
|
44737
|
+
if (this.attribute.disableTriggerEvent) return;
|
|
44716
44738
|
if (!this._itemsContainer) return;
|
|
44717
44739
|
const {
|
|
44718
44740
|
hover = !0,
|
|
@@ -44833,7 +44855,8 @@
|
|
|
44833
44855
|
maxCol = 1,
|
|
44834
44856
|
maxRow = 2,
|
|
44835
44857
|
item = {},
|
|
44836
|
-
pager = {}
|
|
44858
|
+
pager = {},
|
|
44859
|
+
disableTriggerEvent: disableTriggerEvent
|
|
44837
44860
|
} = this.attribute,
|
|
44838
44861
|
{
|
|
44839
44862
|
spaceCol = DEFAULT_ITEM_SPACE_COL,
|
|
@@ -44854,7 +44877,7 @@
|
|
|
44854
44877
|
startY = 0,
|
|
44855
44878
|
pages = 1;
|
|
44856
44879
|
if (isHorizontal) {
|
|
44857
|
-
if (pagerComp = new Pager(Object.assign({
|
|
44880
|
+
if (pagerComp = new Pager(Object.assign(Object.assign({
|
|
44858
44881
|
layout: 1 === maxRow ? "horizontal" : "vertical",
|
|
44859
44882
|
total: 99
|
|
44860
44883
|
}, merge$1({
|
|
@@ -44862,7 +44885,9 @@
|
|
|
44862
44885
|
preShape: "triangleUp",
|
|
44863
44886
|
nextShape: "triangleDown"
|
|
44864
44887
|
}
|
|
44865
|
-
}, pageStyle))
|
|
44888
|
+
}, pageStyle)), {
|
|
44889
|
+
disableTriggerEvent: disableTriggerEvent
|
|
44890
|
+
})), this._pager = pagerComp, this._innerView.add(pagerComp), pageHeight = (maxRow - 1) * spaceRow + this._itemHeight * maxRow, pageWidth = maxWidth - pagerComp.AABBBounds.width() - pagerSpace, pageWidth <= 0) return this._innerView.removeChild(pagerComp), !1;
|
|
44866
44891
|
itemsContainer.getChildren().forEach((item, index) => {
|
|
44867
44892
|
const {
|
|
44868
44893
|
width: width,
|
|
@@ -44880,7 +44905,8 @@
|
|
|
44880
44905
|
} else {
|
|
44881
44906
|
if (pagerComp = new Pager(Object.assign({
|
|
44882
44907
|
layout: "horizontal",
|
|
44883
|
-
total: 99
|
|
44908
|
+
total: 99,
|
|
44909
|
+
disableTriggerEvent: disableTriggerEvent
|
|
44884
44910
|
}, pageStyle)), this._pager = pagerComp, this._innerView.add(pagerComp), pageWidth = this._itemMaxWidth * maxCol + (maxCol - 1) * spaceCol, pageHeight = maxHeight - pagerComp.AABBBounds.height() - pagerSpace - renderStartY, pageHeight <= 0) return this._innerView.removeChild(pagerComp), !1;
|
|
44885
44911
|
itemsContainer.getChildren().forEach((item, index) => {
|
|
44886
44912
|
const {
|
|
@@ -45157,7 +45183,11 @@
|
|
|
45157
45183
|
}
|
|
45158
45184
|
this._prePos = currentPos, this._dispatchChangeEvent();
|
|
45159
45185
|
}, this._onTrackPointerUp = e => {
|
|
45160
|
-
e.preventDefault(), "browser" === vglobal.env ? (vglobal.removeEventListener("pointermove", this._onTrackPointerMove
|
|
45186
|
+
e.preventDefault(), "browser" === vglobal.env ? (vglobal.removeEventListener("pointermove", this._onTrackPointerMove, {
|
|
45187
|
+
capture: !0
|
|
45188
|
+
}), vglobal.removeEventListener("pointerup", this._onTrackPointerUp)) : (this._track.removeEventListener("pointermove", this._onTrackPointerMove, {
|
|
45189
|
+
capture: !0
|
|
45190
|
+
}), this._track.removeEventListener("pointerup", this._onTrackPointerUp), this._track.removeEventListener("pointerupoutside", this._onTrackPointerUp));
|
|
45161
45191
|
}, this._onRailPointerDown = e => {
|
|
45162
45192
|
e.stopPropagation();
|
|
45163
45193
|
const {
|
|
@@ -45402,6 +45432,7 @@
|
|
|
45402
45432
|
return createText(textStyle);
|
|
45403
45433
|
}
|
|
45404
45434
|
_bindEvents() {
|
|
45435
|
+
if (this.attribute.disableTriggerEvent) return;
|
|
45405
45436
|
const {
|
|
45406
45437
|
slidable: slidable,
|
|
45407
45438
|
range: range
|
|
@@ -45562,7 +45593,8 @@
|
|
|
45562
45593
|
endText: endText,
|
|
45563
45594
|
handlerText: handlerText,
|
|
45564
45595
|
showTooltip: showTooltip,
|
|
45565
|
-
tooltip: tooltip
|
|
45596
|
+
tooltip: tooltip,
|
|
45597
|
+
disableTriggerEvent: disableTriggerEvent
|
|
45566
45598
|
} = this.attribute,
|
|
45567
45599
|
domain = [],
|
|
45568
45600
|
step = (max - min) / (colors.length - 1);
|
|
@@ -45593,12 +45625,13 @@
|
|
|
45593
45625
|
endText: endText,
|
|
45594
45626
|
handlerText: handlerText,
|
|
45595
45627
|
showTooltip: showTooltip,
|
|
45596
|
-
tooltip: tooltip
|
|
45628
|
+
tooltip: tooltip,
|
|
45629
|
+
disableTriggerEvent: disableTriggerEvent
|
|
45597
45630
|
});
|
|
45598
45631
|
this._innerView.add(slider), this._slider = slider, slider.translateTo(0 - slider.AABBBounds.x1, (this._title ? this._title.AABBBounds.height() + get$1(this.attribute, "title.space", DEFAULT_TITLE_SPACE) : 0) - slider.AABBBounds.y1), this._updateColor();
|
|
45599
45632
|
}
|
|
45600
45633
|
_bindEvents() {
|
|
45601
|
-
this._slider && this._slider.addEventListener("change", this._onSliderChange);
|
|
45634
|
+
this.attribute.disableTriggerEvent || this._slider && this._slider.addEventListener("change", this._onSliderChange);
|
|
45602
45635
|
}
|
|
45603
45636
|
_getTrackColor() {
|
|
45604
45637
|
const {
|
|
@@ -45735,7 +45768,8 @@
|
|
|
45735
45768
|
handlerText: handlerText,
|
|
45736
45769
|
showTooltip: showTooltip,
|
|
45737
45770
|
tooltip: tooltip,
|
|
45738
|
-
sizeBackground: sizeBackground
|
|
45771
|
+
sizeBackground: sizeBackground,
|
|
45772
|
+
disableTriggerEvent: disableTriggerEvent
|
|
45739
45773
|
} = this.attribute,
|
|
45740
45774
|
mainContainer = createGroup({
|
|
45741
45775
|
x: 0,
|
|
@@ -45768,7 +45802,8 @@
|
|
|
45768
45802
|
endText: endText,
|
|
45769
45803
|
handlerText: handlerText,
|
|
45770
45804
|
showTooltip: showTooltip,
|
|
45771
|
-
tooltip: tooltip
|
|
45805
|
+
tooltip: tooltip,
|
|
45806
|
+
disableTriggerEvent: disableTriggerEvent
|
|
45772
45807
|
});
|
|
45773
45808
|
mainContainer.add(slider);
|
|
45774
45809
|
let path,
|
|
@@ -45786,7 +45821,7 @@
|
|
|
45786
45821
|
mainContainer.translate(0 - mainContainer.AABBBounds.x1, titleSpace - mainContainer.AABBBounds.y1), this._slider = slider;
|
|
45787
45822
|
}
|
|
45788
45823
|
_bindEvents() {
|
|
45789
|
-
this._slider && this._slider.addEventListener("change", this._onSliderChange);
|
|
45824
|
+
this.attribute.disableTriggerEvent || this._slider && this._slider.addEventListener("change", this._onSliderChange);
|
|
45790
45825
|
}
|
|
45791
45826
|
}
|
|
45792
45827
|
SizeContinuousLegend.defaultAttributes = {
|
|
@@ -46083,13 +46118,13 @@
|
|
|
46083
46118
|
}, this._initForward = () => {
|
|
46084
46119
|
isNil$1(this._forwardController) && (this._forwardController = new PlayerIcon(Object.assign({}, this._forwardAttr.style)), this.add(this._forwardController));
|
|
46085
46120
|
}, this._initEvents = () => {
|
|
46086
|
-
this._playController.addEventListener("pointerdown", e => {
|
|
46121
|
+
this.attribute.disableTriggerEvent || (this._playController.addEventListener("pointerdown", e => {
|
|
46087
46122
|
e.stopPropagation(), !0 === this._isPaused ? this.play() : this.pause();
|
|
46088
46123
|
}), this._backwardController.addEventListener("pointerdown", e => {
|
|
46089
46124
|
e.stopPropagation(), this.backward();
|
|
46090
46125
|
}), this._forwardController.addEventListener("pointerdown", e => {
|
|
46091
46126
|
e.stopPropagation(), this.forward();
|
|
46092
|
-
});
|
|
46127
|
+
}));
|
|
46093
46128
|
}, this._createCustomEvent = eventType => {
|
|
46094
46129
|
var _a;
|
|
46095
46130
|
const customEvent = new CustomEvent(eventType, {
|
|
@@ -46265,7 +46300,8 @@
|
|
|
46265
46300
|
},
|
|
46266
46301
|
endText: {
|
|
46267
46302
|
visible: !1
|
|
46268
|
-
}
|
|
46303
|
+
},
|
|
46304
|
+
disableTriggerEvent: this.attribute.disableTriggerEvent
|
|
46269
46305
|
};
|
|
46270
46306
|
if (isHorizontal$1(this._orient)) {
|
|
46271
46307
|
const railWidth = Math.max(0, this._layoutInfo.slider.size),
|
|
@@ -46285,7 +46321,8 @@
|
|
|
46285
46321
|
start: this._start,
|
|
46286
46322
|
pause: this._pause,
|
|
46287
46323
|
forward: this._forward,
|
|
46288
|
-
backward: this._backward
|
|
46324
|
+
backward: this._backward,
|
|
46325
|
+
disableTriggerEvent: this.attribute.disableTriggerEvent
|
|
46289
46326
|
};
|
|
46290
46327
|
return isHorizontal$1(this._orient) ? (attrs.layout = "horizontal", attrs.start = Object.assign(Object.assign({}, attrs.start), {
|
|
46291
46328
|
style: Object.assign(Object.assign({}, attrs.start.style), {
|
|
@@ -46455,7 +46492,7 @@
|
|
|
46455
46492
|
var _a, _b, _c, _d;
|
|
46456
46493
|
super._initAttributes(), this._alternate = null !== (_a = this.attribute.alternate) && void 0 !== _a && _a, this._interval = null !== (_b = this.attribute.interval) && void 0 !== _b ? _b : 1e3, this._direction = null !== (_c = this.attribute.direction) && void 0 !== _c ? _c : DirectionEnum.Default, this._dataIndex = isNil$1(this.attribute.dataIndex) ? "default" === this._direction ? this._minIndex : this._maxIndex : null !== (_d = this.attribute.dataIndex) && void 0 !== _d ? _d : 0, this._slider.setAttribute("value", this._dataIndex);
|
|
46457
46494
|
}, this._initEvents = () => {
|
|
46458
|
-
this._controller.addEventListener(ControllerEventEnum.OnPlay, e => {
|
|
46495
|
+
this.attribute.disableTriggerEvent || (this._controller.addEventListener(ControllerEventEnum.OnPlay, e => {
|
|
46459
46496
|
e.stopPropagation(), this.play();
|
|
46460
46497
|
}), this._controller.addEventListener(ControllerEventEnum.OnPause, e => {
|
|
46461
46498
|
e.stopPropagation(), this.pause();
|
|
@@ -46466,7 +46503,7 @@
|
|
|
46466
46503
|
}), this._slider.addEventListener("change", e => {
|
|
46467
46504
|
const middle = Math.floor(e.detail.value) + .5;
|
|
46468
46505
|
this._dataIndex = e.detail.value >= middle ? Math.ceil(e.detail.value) : Math.floor(e.detail.value), this._slider.setValue(this._dataIndex), this.dispatchCustomEvent(PlayerEventEnum.change);
|
|
46469
|
-
});
|
|
46506
|
+
}));
|
|
46470
46507
|
}, this.play = () => {
|
|
46471
46508
|
this._isPlaying || 1 !== this._data.length && (this._controller.togglePause(), this._isPlaying = !0, (isReachEnd({
|
|
46472
46509
|
dataIndex: this._dataIndex,
|
|
@@ -46538,7 +46575,7 @@
|
|
|
46538
46575
|
const frames = this._data.length;
|
|
46539
46576
|
this.attribute.totalDuration && this._data.length ? (this._totalDuration = this.attribute.totalDuration, this._interval = this._totalDuration / (null != frames ? frames : 1)) : (this._totalDuration = this._interval * frames, this._interval = this.attribute.interval);
|
|
46540
46577
|
}, this._initEvents = () => {
|
|
46541
|
-
this._controller.addEventListener(ControllerEventEnum.OnPlay, e => {
|
|
46578
|
+
this.attribute.disableTriggerEvent || (this._controller.addEventListener(ControllerEventEnum.OnPlay, e => {
|
|
46542
46579
|
e.stopPropagation(), this.play();
|
|
46543
46580
|
}), this._controller.addEventListener(ControllerEventEnum.OnPause, e => {
|
|
46544
46581
|
e.stopPropagation(), this.pause();
|
|
@@ -46552,7 +46589,7 @@
|
|
|
46552
46589
|
const value = null === (_a = e.detail) || void 0 === _a ? void 0 : _a.value,
|
|
46553
46590
|
progress = value / this._maxIndex;
|
|
46554
46591
|
this._elapsed = progress * this._totalDuration, this._startTime = Date.now() - this._elapsed, this._dispatchChange(value);
|
|
46555
|
-
});
|
|
46592
|
+
}));
|
|
46556
46593
|
}, this._getSliderValue = () => {
|
|
46557
46594
|
const progress = this._elapsed / this._totalDuration;
|
|
46558
46595
|
return Math.min(progress * this._maxIndex, this._maxIndex);
|
|
@@ -46654,6 +46691,7 @@
|
|
|
46654
46691
|
};
|
|
46655
46692
|
}
|
|
46656
46693
|
bindBrushEvents() {
|
|
46694
|
+
if (this.attribute.disableTriggerEvent) return;
|
|
46657
46695
|
const {
|
|
46658
46696
|
delayType = "throttle",
|
|
46659
46697
|
delayTime = 0,
|
|
@@ -52471,7 +52509,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
52471
52509
|
(_a = this._view) === null || _a === void 0 ? void 0 : _a.release();
|
|
52472
52510
|
this._view = null;
|
|
52473
52511
|
this.isInited = false;
|
|
52474
|
-
this._rafId = null;
|
|
52475
52512
|
this.isReleased = true;
|
|
52476
52513
|
}
|
|
52477
52514
|
releaseGrammar() {
|
|
@@ -57784,12 +57821,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
57784
57821
|
Factory.registerMark(GroupMark.type, GroupMark);
|
|
57785
57822
|
View.useRegisters([registerFilterTransform, registerMapTransform]);
|
|
57786
57823
|
registerVGrammarAnimation();
|
|
57787
|
-
initAllEnv();
|
|
57788
57824
|
Logger.getInstance(LoggerLevel.Error);
|
|
57789
57825
|
};
|
|
57790
57826
|
registerVChartCore();
|
|
57791
57827
|
|
|
57792
|
-
const version = "1.5.1-alpha.
|
|
57828
|
+
const version = "1.5.1-alpha.4";
|
|
57793
57829
|
|
|
57794
57830
|
class ChartData {
|
|
57795
57831
|
get dataList() {
|
|
@@ -68054,16 +68090,22 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
68054
68090
|
}
|
|
68055
68091
|
}
|
|
68056
68092
|
_getAngleValueStartWithoutMask(datum) {
|
|
68057
|
-
|
|
68058
|
-
const
|
|
68093
|
+
const startAngle = this._getAngleValueStartWithoutPadAngle(datum);
|
|
68094
|
+
const endAngle = this._getAngleValueEndWithoutPadAngle(datum);
|
|
68095
|
+
return Math.min(startAngle + this._padAngle / 2, (startAngle + endAngle) / 2);
|
|
68096
|
+
}
|
|
68097
|
+
_getAngleValueEndWithoutMask(datum) {
|
|
68098
|
+
const startAngle = this._getAngleValueStartWithoutPadAngle(datum);
|
|
68099
|
+
const endAngle = this._getAngleValueEndWithoutPadAngle(datum);
|
|
68100
|
+
return Math.max(endAngle - this._padAngle / 2, (startAngle + endAngle) / 2);
|
|
68101
|
+
}
|
|
68102
|
+
_getAngleValueStartWithoutPadAngle(datum) {
|
|
68103
|
+
return isValid$1(datum[SEGMENT_FIELD_START])
|
|
68059
68104
|
? this.angleAxisHelper.dataToPosition([datum[SEGMENT_FIELD_START]])
|
|
68060
68105
|
: this._startAngle;
|
|
68061
|
-
return angle + ((_a = this._spec.padAngle) !== null && _a !== void 0 ? _a : 0) / 2;
|
|
68062
68106
|
}
|
|
68063
|
-
|
|
68064
|
-
|
|
68065
|
-
const angle = this.angleAxisHelper.dataToPosition([datum[SEGMENT_FIELD_END]]);
|
|
68066
|
-
return angle - ((_a = this._spec.padAngle) !== null && _a !== void 0 ? _a : 0) / 2;
|
|
68107
|
+
_getAngleValueEndWithoutPadAngle(datum) {
|
|
68108
|
+
return this.angleAxisHelper.dataToPosition([datum[SEGMENT_FIELD_END]]);
|
|
68067
68109
|
}
|
|
68068
68110
|
_preprocessLabelSpec() {
|
|
68069
68111
|
const labelSpec = mergeSpec({ animation: this._spec.animation }, this._spec.label);
|
|
@@ -76672,32 +76714,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
76672
76714
|
const allLinkElements = vGrammarMark.elements;
|
|
76673
76715
|
allLinkElements.forEach(linkEl => {
|
|
76674
76716
|
linkEl.clearStates();
|
|
76675
|
-
|
|
76676
|
-
|
|
76677
|
-
if (linkDatum.source === curLinkDatum.target ||
|
|
76678
|
-
(array(linkDatum[father]).includes(curLinkDatum.source) &&
|
|
76679
|
-
array(linkDatum[father]).includes(curLinkDatum.target))) {
|
|
76680
|
-
if (!highlightNodes.includes(linkDatum.source)) {
|
|
76681
|
-
highlightNodes.push(linkDatum.source);
|
|
76682
|
-
}
|
|
76683
|
-
if (!highlightNodes.includes(linkDatum.target)) {
|
|
76684
|
-
highlightNodes.push(linkDatum.target);
|
|
76685
|
-
}
|
|
76686
|
-
let ratio;
|
|
76687
|
-
if (father === 'parents') {
|
|
76688
|
-
const originalDatum = linkDatum.datum;
|
|
76689
|
-
const val = originalDatum
|
|
76690
|
-
? originalDatum
|
|
76691
|
-
.filter((entry) => entry.parents.some((par, index) => { var _a; return par.key === curLinkDatum.source && ((_a = entry.parents[index + 1]) === null || _a === void 0 ? void 0 : _a.key) === curLinkDatum.target; }))
|
|
76692
|
-
.reduce((sum, d) => {
|
|
76693
|
-
return (sum += d.value);
|
|
76694
|
-
}, 0)
|
|
76695
|
-
: 0;
|
|
76696
|
-
ratio = val / linkDatum.value;
|
|
76697
|
-
}
|
|
76698
|
-
linkEl.addState('selected', { ratio });
|
|
76717
|
+
if (linkEl === element) {
|
|
76718
|
+
linkEl.addState('selected', { ratio: 1 });
|
|
76699
76719
|
}
|
|
76700
|
-
else if (linkEl === element) ;
|
|
76701
76720
|
else {
|
|
76702
76721
|
linkEl.useStates(['blur']);
|
|
76703
76722
|
}
|
|
@@ -81208,6 +81227,41 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
81208
81227
|
}
|
|
81209
81228
|
return boundingClientRect.height / element.offsetHeight;
|
|
81210
81229
|
};
|
|
81230
|
+
const measureTooltipText = (text, style) => {
|
|
81231
|
+
var _a;
|
|
81232
|
+
text = (text !== null && text !== void 0 ? text : '').toString();
|
|
81233
|
+
const measure = initTextMeasure(style);
|
|
81234
|
+
if (!style.multiLine) {
|
|
81235
|
+
const { width, height } = measure.fullMeasure(text);
|
|
81236
|
+
return {
|
|
81237
|
+
width,
|
|
81238
|
+
height,
|
|
81239
|
+
text
|
|
81240
|
+
};
|
|
81241
|
+
}
|
|
81242
|
+
let textLines = text.split('\n');
|
|
81243
|
+
textLines = textLines.map((line, i) => (i < textLines.length - 1 ? line + '\n' : line));
|
|
81244
|
+
const { width, height } = measure.fullMeasure(textLines);
|
|
81245
|
+
if (style.maxWidth && style.maxWidth <= width) {
|
|
81246
|
+
const bound = getRichTextBounds({
|
|
81247
|
+
wordBreak: (_a = style.wordBreak) !== null && _a !== void 0 ? _a : 'break-word',
|
|
81248
|
+
maxWidth: style.maxWidth,
|
|
81249
|
+
width: 0,
|
|
81250
|
+
height: 0,
|
|
81251
|
+
textConfig: textLines.map((line, i) => (Object.assign(Object.assign({}, style), { text: line })))
|
|
81252
|
+
});
|
|
81253
|
+
return {
|
|
81254
|
+
width: bound.width(),
|
|
81255
|
+
height: bound.height(),
|
|
81256
|
+
text: textLines
|
|
81257
|
+
};
|
|
81258
|
+
}
|
|
81259
|
+
return {
|
|
81260
|
+
width,
|
|
81261
|
+
height,
|
|
81262
|
+
text: textLines
|
|
81263
|
+
};
|
|
81264
|
+
};
|
|
81211
81265
|
|
|
81212
81266
|
const TOOLTIP_EL_CLASS_NAME = 'vchart-tooltip-element';
|
|
81213
81267
|
const TOOLTIP_CONTAINER_EL_CLASS_NAME = 'vchart-tooltip-container';
|
|
@@ -81583,182 +81637,208 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
81583
81637
|
const getHorizontalPositionType = (position, defaultCase) => { var _a, _b; return (_b = (_a = positionType[position]) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : defaultCase; };
|
|
81584
81638
|
const getVerticalPositionType = (position, defaultCase) => { var _a, _b; return (_b = (_a = positionType[position]) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : defaultCase; };
|
|
81585
81639
|
|
|
81586
|
-
const
|
|
81640
|
+
const DEFAULT_TEXT_ATTRIBUTES = {
|
|
81587
81641
|
fontFamily: THEME_CONSTANTS.defaultFontFamily,
|
|
81588
81642
|
spacing: 10,
|
|
81589
|
-
multiLine: false,
|
|
81590
81643
|
wordBreak: 'break-word'
|
|
81591
81644
|
};
|
|
81592
81645
|
function getTextAttributes(style = {}, globalTheme, defaultAttributes) {
|
|
81593
81646
|
var _a, _b;
|
|
81594
|
-
const attrs = Object.assign(Object.assign({}, (defaultAttributes !== null && defaultAttributes !== void 0 ? defaultAttributes :
|
|
81647
|
+
const attrs = Object.assign(Object.assign({}, (defaultAttributes !== null && defaultAttributes !== void 0 ? defaultAttributes : DEFAULT_TEXT_ATTRIBUTES)), { fill: ((_a = style.fill) !== null && _a !== void 0 ? _a : style.fontColor), textAlign: style.textAlign, textBaseline: style.textBaseline, fontFamily: (_b = style.fontFamily) !== null && _b !== void 0 ? _b : globalTheme === null || globalTheme === void 0 ? void 0 : globalTheme.fontFamily, fontSize: style.fontSize, fontWeight: style.fontWeight, lineHeight: style.lineHeight, spacing: style.spacing, multiLine: style.multiLine, maxWidth: style.maxWidth, wordBreak: style.wordBreak, autoWidth: style.autoWidth });
|
|
81595
81648
|
return attrs;
|
|
81596
81649
|
}
|
|
81597
|
-
|
|
81598
|
-
|
|
81599
|
-
const {
|
|
81600
|
-
const
|
|
81650
|
+
const getPanelAttributes = (style) => {
|
|
81651
|
+
var _a;
|
|
81652
|
+
const { backgroundColor, border, shadow } = style;
|
|
81653
|
+
const panelAttrs = {
|
|
81654
|
+
lineWidth: (_a = border === null || border === void 0 ? void 0 : border.width) !== null && _a !== void 0 ? _a : 0,
|
|
81655
|
+
shadow: !!shadow
|
|
81656
|
+
};
|
|
81657
|
+
if (border === null || border === void 0 ? void 0 : border.color) {
|
|
81658
|
+
panelAttrs.stroke = border.color;
|
|
81659
|
+
}
|
|
81660
|
+
if (backgroundColor) {
|
|
81661
|
+
panelAttrs.fill = backgroundColor;
|
|
81662
|
+
}
|
|
81663
|
+
if (shadow) {
|
|
81664
|
+
panelAttrs.shadowColor = shadow.color;
|
|
81665
|
+
panelAttrs.shadowBlur = shadow.blur;
|
|
81666
|
+
panelAttrs.shadowOffsetX = shadow.x;
|
|
81667
|
+
panelAttrs.shadowOffsetY = shadow.y;
|
|
81668
|
+
panelAttrs.shadowSpread = shadow.spread;
|
|
81669
|
+
}
|
|
81670
|
+
const { radius } = border !== null && border !== void 0 ? border : {};
|
|
81671
|
+
if (isValid$1(radius)) {
|
|
81672
|
+
panelAttrs.cornerRadius = [radius, radius, radius, radius];
|
|
81673
|
+
}
|
|
81674
|
+
return panelAttrs;
|
|
81675
|
+
};
|
|
81676
|
+
const getTooltipAttributes = (actualTooltip, spec, globalTheme) => {
|
|
81677
|
+
var _a, _b, _c, _d, _e;
|
|
81678
|
+
const { style = {}, enterable, transitionDuration } = spec;
|
|
81679
|
+
const { panel = {}, titleLabel, shape, keyLabel, valueLabel, spaceRow: commonSpaceRow } = style;
|
|
81680
|
+
const padding = normalizePadding$1(panel.padding);
|
|
81681
|
+
const paddingSpec = normalizeLayoutPaddingSpec(panel.padding);
|
|
81682
|
+
const titleStyle = getTextAttributes(titleLabel, globalTheme);
|
|
81683
|
+
const keyStyle = getTextAttributes(keyLabel, globalTheme);
|
|
81684
|
+
const valueStyle = getTextAttributes(valueLabel, globalTheme);
|
|
81685
|
+
const shapeStyle = {
|
|
81686
|
+
fill: true,
|
|
81687
|
+
size: (_a = shape === null || shape === void 0 ? void 0 : shape.size) !== null && _a !== void 0 ? _a : 8,
|
|
81688
|
+
spacing: (_b = shape === null || shape === void 0 ? void 0 : shape.spacing) !== null && _b !== void 0 ? _b : 6
|
|
81689
|
+
};
|
|
81690
|
+
const attributes = {
|
|
81691
|
+
panel: getPanelAttributes(panel),
|
|
81692
|
+
padding,
|
|
81693
|
+
title: {},
|
|
81694
|
+
content: [],
|
|
81695
|
+
titleStyle: {
|
|
81601
81696
|
value: titleStyle,
|
|
81602
81697
|
spaceRow: commonSpaceRow
|
|
81603
|
-
},
|
|
81698
|
+
},
|
|
81699
|
+
contentStyle: {
|
|
81604
81700
|
shape: shapeStyle,
|
|
81605
81701
|
key: keyStyle,
|
|
81606
81702
|
value: valueStyle,
|
|
81607
81703
|
spaceRow: commonSpaceRow
|
|
81608
|
-
},
|
|
81609
|
-
|
|
81610
|
-
|
|
81611
|
-
|
|
81704
|
+
},
|
|
81705
|
+
hasContentShape: false,
|
|
81706
|
+
keyWidth: 0,
|
|
81707
|
+
valueWidth: 0,
|
|
81708
|
+
enterable,
|
|
81709
|
+
transitionDuration
|
|
81710
|
+
};
|
|
81612
81711
|
const { title = {}, content = [] } = actualTooltip;
|
|
81613
|
-
let
|
|
81614
|
-
let containerHeight =
|
|
81615
|
-
let
|
|
81616
|
-
const
|
|
81617
|
-
|
|
81618
|
-
|
|
81619
|
-
|
|
81620
|
-
|
|
81621
|
-
|
|
81622
|
-
|
|
81623
|
-
|
|
81624
|
-
|
|
81625
|
-
|
|
81626
|
-
|
|
81627
|
-
|
|
81628
|
-
|
|
81629
|
-
|
|
81630
|
-
|
|
81631
|
-
|
|
81632
|
-
}
|
|
81633
|
-
|
|
81634
|
-
|
|
81635
|
-
|
|
81636
|
-
|
|
81637
|
-
|
|
81638
|
-
|
|
81639
|
-
|
|
81640
|
-
attribute.title.width = maxWidth;
|
|
81641
|
-
attribute.title.height = titleMaxHeight;
|
|
81642
|
-
containerHeight += titleMaxHeight;
|
|
81643
|
-
}
|
|
81644
|
-
if (content.length) {
|
|
81645
|
-
const filteredContent = content.filter(item => {
|
|
81646
|
-
return (item.key || item.value) && item.visible !== false;
|
|
81647
|
-
});
|
|
81648
|
-
if (filteredContent.length) {
|
|
81649
|
-
if (titleVisible) {
|
|
81650
|
-
containerHeight += attribute.title.spaceRow;
|
|
81651
|
-
}
|
|
81652
|
-
const keyWidths = [];
|
|
81653
|
-
const adaptiveKeyWidths = [];
|
|
81654
|
-
const valueWidths = [];
|
|
81655
|
-
const shapeWidths = [];
|
|
81656
|
-
attribute.content = filteredContent.map((item, i) => {
|
|
81657
|
-
let itemHeight = 0;
|
|
81658
|
-
const { hasShape, key, shapeColor, shapeHollow, shapeType = '', shapeFill, shapeStroke, shapeLineWidth, shapeSize, value, isKeyAdaptive, spaceRow: lineSpaceRow } = item;
|
|
81659
|
-
const itemAttrs = { height: 0, spaceRow: lineSpaceRow !== null && lineSpaceRow !== void 0 ? lineSpaceRow : commonSpaceRow };
|
|
81660
|
-
if (isValid$1(key)) {
|
|
81661
|
-
const lineKeyStyle = mergeSpec({}, keyStyle, getTextAttributes(item.keyStyle, undefined, {}));
|
|
81662
|
-
const { width, height, text } = measureTooltipText(key, lineKeyStyle);
|
|
81663
|
-
itemAttrs.key = Object.assign(Object.assign({ width,
|
|
81664
|
-
height }, lineKeyStyle), { text });
|
|
81665
|
-
if (!isKeyAdaptive) {
|
|
81666
|
-
keyWidths.push(width);
|
|
81667
|
-
}
|
|
81668
|
-
else {
|
|
81669
|
-
adaptiveKeyWidths.push(width);
|
|
81670
|
-
}
|
|
81671
|
-
itemHeight = Math.max(itemHeight, height);
|
|
81712
|
+
let containerWidth = paddingSpec.left + paddingSpec.right;
|
|
81713
|
+
let containerHeight = paddingSpec.top + paddingSpec.bottom;
|
|
81714
|
+
let contentMaxWidth = 0;
|
|
81715
|
+
const filteredContent = content.filter(item => {
|
|
81716
|
+
return (item.key || item.value) && item.visible !== false;
|
|
81717
|
+
});
|
|
81718
|
+
const hasContent = !!filteredContent.length;
|
|
81719
|
+
let maxKeyWidth = 0;
|
|
81720
|
+
let maxAdaptiveKeyWidth = 0;
|
|
81721
|
+
let maxValueWidth = 0;
|
|
81722
|
+
let maxShapeWidth = 0;
|
|
81723
|
+
if (hasContent) {
|
|
81724
|
+
const keyWidths = [];
|
|
81725
|
+
const adaptiveKeyWidths = [];
|
|
81726
|
+
const valueWidths = [];
|
|
81727
|
+
const shapeWidths = [];
|
|
81728
|
+
attributes.content = filteredContent.map((item, i) => {
|
|
81729
|
+
let itemHeight = 0;
|
|
81730
|
+
const { hasShape: actualHasShape, key: actualKey, shapeType: actualShapeType = '', shapeFill: actualShapeFill, shapeStroke: actualShapeStroke, shapeLineWidth: actualShapeLineWidth, shapeSize: actualShapeSize, value: actualValue, isKeyAdaptive: actualIsKeyAdaptive, spaceRow: actualSpaceRow, keyStyle: actualKeyStyle, valueStyle: actualValueStyle, shapeColor: actualShapeColor, shapeHollow: actualShapeHollow } = item;
|
|
81731
|
+
const itemAttrs = { height: 0, spaceRow: actualSpaceRow !== null && actualSpaceRow !== void 0 ? actualSpaceRow : commonSpaceRow };
|
|
81732
|
+
if (isValid$1(actualKey)) {
|
|
81733
|
+
const itemKeyStyle = mergeSpec({}, keyStyle, getTextAttributes(actualKeyStyle, undefined, {}));
|
|
81734
|
+
const { width, height, text } = measureTooltipText(actualKey, itemKeyStyle);
|
|
81735
|
+
itemAttrs.key = Object.assign(Object.assign({ width,
|
|
81736
|
+
height }, itemKeyStyle), { text });
|
|
81737
|
+
if (!actualIsKeyAdaptive) {
|
|
81738
|
+
keyWidths.push(width);
|
|
81672
81739
|
}
|
|
81673
|
-
|
|
81674
|
-
|
|
81675
|
-
const { width, height, text } = measureTooltipText(value, lineValueStyle);
|
|
81676
|
-
itemAttrs.value = Object.assign(Object.assign({ width,
|
|
81677
|
-
height }, lineValueStyle), { text });
|
|
81678
|
-
valueWidths.push(width);
|
|
81679
|
-
itemHeight = Math.max(itemHeight, height);
|
|
81740
|
+
else {
|
|
81741
|
+
adaptiveKeyWidths.push(width);
|
|
81680
81742
|
}
|
|
81681
|
-
|
|
81682
|
-
|
|
81683
|
-
|
|
81684
|
-
|
|
81685
|
-
|
|
81686
|
-
|
|
81687
|
-
|
|
81688
|
-
|
|
81689
|
-
|
|
81690
|
-
|
|
81691
|
-
|
|
81692
|
-
|
|
81693
|
-
|
|
81694
|
-
|
|
81695
|
-
|
|
81696
|
-
|
|
81697
|
-
|
|
81698
|
-
|
|
81743
|
+
itemHeight = Math.max(itemHeight, height);
|
|
81744
|
+
}
|
|
81745
|
+
if (isValid$1(actualValue)) {
|
|
81746
|
+
const itemValueStyle = mergeSpec({}, valueStyle, getTextAttributes(actualValueStyle, undefined, {}));
|
|
81747
|
+
const { width, height, text } = measureTooltipText(actualValue, itemValueStyle);
|
|
81748
|
+
itemAttrs.value = Object.assign(Object.assign({ width,
|
|
81749
|
+
height }, itemValueStyle), { text });
|
|
81750
|
+
valueWidths.push(width);
|
|
81751
|
+
itemHeight = Math.max(itemHeight, height);
|
|
81752
|
+
}
|
|
81753
|
+
if (actualHasShape) {
|
|
81754
|
+
const shape = {
|
|
81755
|
+
visible: true,
|
|
81756
|
+
symbolType: actualShapeType
|
|
81757
|
+
};
|
|
81758
|
+
const adaptiveShapeFill = actualShapeFill !== null && actualShapeFill !== void 0 ? actualShapeFill : actualShapeColor;
|
|
81759
|
+
if (actualShapeHollow) {
|
|
81760
|
+
shape.stroke = adaptiveShapeFill;
|
|
81699
81761
|
}
|
|
81700
81762
|
else {
|
|
81701
|
-
|
|
81702
|
-
}
|
|
81703
|
-
itemAttrs.height = itemHeight;
|
|
81704
|
-
containerHeight += itemHeight;
|
|
81705
|
-
if (i < filteredContent.length - 1) {
|
|
81706
|
-
containerHeight += itemAttrs.spaceRow;
|
|
81763
|
+
shape.fill = adaptiveShapeFill;
|
|
81707
81764
|
}
|
|
81708
|
-
|
|
81709
|
-
|
|
81710
|
-
|
|
81711
|
-
|
|
81712
|
-
|
|
81713
|
-
|
|
81714
|
-
|
|
81715
|
-
|
|
81716
|
-
|
|
81717
|
-
|
|
81718
|
-
|
|
81719
|
-
|
|
81720
|
-
|
|
81721
|
-
|
|
81722
|
-
|
|
81723
|
-
|
|
81724
|
-
|
|
81725
|
-
|
|
81726
|
-
|
|
81727
|
-
|
|
81728
|
-
|
|
81729
|
-
|
|
81730
|
-
|
|
81731
|
-
|
|
81732
|
-
|
|
81733
|
-
|
|
81734
|
-
|
|
81735
|
-
|
|
81736
|
-
|
|
81737
|
-
|
|
81738
|
-
|
|
81765
|
+
shape.stroke = actualShapeStroke !== null && actualShapeStroke !== void 0 ? actualShapeStroke : adaptiveShapeFill;
|
|
81766
|
+
shape.lineWidth = actualShapeLineWidth;
|
|
81767
|
+
itemAttrs.shape = shape;
|
|
81768
|
+
const shapeWidth = actualShapeSize !== null && actualShapeSize !== void 0 ? actualShapeSize : shapeStyle.size;
|
|
81769
|
+
itemHeight = Math.max(shapeWidth, itemHeight);
|
|
81770
|
+
shapeWidths.push(shapeWidth);
|
|
81771
|
+
}
|
|
81772
|
+
else {
|
|
81773
|
+
itemAttrs.shape = { visible: false };
|
|
81774
|
+
}
|
|
81775
|
+
itemAttrs.height = itemHeight;
|
|
81776
|
+
containerHeight += itemHeight;
|
|
81777
|
+
if (i < filteredContent.length - 1) {
|
|
81778
|
+
containerHeight += itemAttrs.spaceRow;
|
|
81779
|
+
}
|
|
81780
|
+
return itemAttrs;
|
|
81781
|
+
});
|
|
81782
|
+
maxKeyWidth = keyWidths.length ? Math.max(...keyWidths) : 0;
|
|
81783
|
+
maxAdaptiveKeyWidth = adaptiveKeyWidths.length ? Math.max(...adaptiveKeyWidths) : 0;
|
|
81784
|
+
maxValueWidth = valueWidths.length ? Math.max(...valueWidths) : 0;
|
|
81785
|
+
maxShapeWidth = shapeWidths.length ? Math.max(...shapeWidths) + shapeStyle.spacing : 0;
|
|
81786
|
+
contentMaxWidth = Math.max(maxShapeWidth + maxKeyWidth + keyStyle.spacing + maxValueWidth + valueStyle.spacing, maxShapeWidth + maxAdaptiveKeyWidth, contentMaxWidth);
|
|
81787
|
+
attributes.hasContentShape = !!shapeWidths.length;
|
|
81788
|
+
attributes.keyWidth = maxKeyWidth;
|
|
81789
|
+
attributes.valueWidth = maxValueWidth;
|
|
81790
|
+
}
|
|
81791
|
+
let titleMaxWidth = 0;
|
|
81792
|
+
let titleMaxHeight = 0;
|
|
81793
|
+
const { visible: actualTitleVisible = true, value: actualTitleValue = '', valueStyle: actualTitleValueStyle, spaceRow: actualTitleSpaceRow } = title;
|
|
81794
|
+
attributes.title.visible = actualTitleVisible;
|
|
81795
|
+
attributes.title.spaceRow = actualTitleSpaceRow !== null && actualTitleSpaceRow !== void 0 ? actualTitleSpaceRow : commonSpaceRow;
|
|
81796
|
+
let titleValueStyle = {};
|
|
81797
|
+
const isAutoWidthMode = () => titleValueStyle.autoWidth && titleValueStyle.multiLine !== false;
|
|
81798
|
+
if (actualTitleVisible) {
|
|
81799
|
+
titleValueStyle = mergeSpec({}, titleStyle, getTextAttributes(actualTitleValueStyle, undefined, {}));
|
|
81800
|
+
if (isAutoWidthMode()) {
|
|
81801
|
+
titleValueStyle.multiLine = (_c = titleValueStyle.multiLine) !== null && _c !== void 0 ? _c : true;
|
|
81802
|
+
titleValueStyle.maxWidth = (_d = titleValueStyle.maxWidth) !== null && _d !== void 0 ? _d : (hasContent ? Math.ceil(contentMaxWidth) : undefined);
|
|
81803
|
+
}
|
|
81804
|
+
const { text, width, height } = measureTooltipText(actualTitleValue, titleValueStyle);
|
|
81805
|
+
attributes.title.value = Object.assign(Object.assign({ width: isAutoWidthMode() ? Math.min(width, (_e = titleValueStyle.maxWidth) !== null && _e !== void 0 ? _e : Number.MAX_VALUE) : width, height }, titleValueStyle), { text });
|
|
81806
|
+
titleMaxWidth = attributes.title.value.width;
|
|
81807
|
+
titleMaxHeight = attributes.title.value.height;
|
|
81808
|
+
containerHeight += titleMaxHeight + (hasContent ? attributes.title.spaceRow : 0);
|
|
81809
|
+
}
|
|
81810
|
+
attributes.title.width = titleMaxWidth;
|
|
81811
|
+
attributes.title.height = titleMaxHeight;
|
|
81812
|
+
if (isAutoWidthMode()) {
|
|
81813
|
+
containerWidth += contentMaxWidth ? contentMaxWidth : titleMaxWidth;
|
|
81739
81814
|
}
|
|
81740
|
-
|
|
81741
|
-
|
|
81742
|
-
|
|
81743
|
-
if (
|
|
81744
|
-
|
|
81745
|
-
|
|
81746
|
-
|
|
81747
|
-
|
|
81748
|
-
|
|
81749
|
-
|
|
81815
|
+
else {
|
|
81816
|
+
containerWidth += Math.max(titleMaxWidth, contentMaxWidth);
|
|
81817
|
+
}
|
|
81818
|
+
if (hasContent) {
|
|
81819
|
+
attributes.content.forEach(item => {
|
|
81820
|
+
var _a;
|
|
81821
|
+
const value = item.value;
|
|
81822
|
+
if (value && ((_a = value.autoWidth) !== null && _a !== void 0 ? _a : true)) {
|
|
81823
|
+
value.width =
|
|
81824
|
+
containerWidth -
|
|
81825
|
+
paddingSpec.left -
|
|
81826
|
+
paddingSpec.right -
|
|
81827
|
+
maxShapeWidth -
|
|
81828
|
+
maxKeyWidth -
|
|
81829
|
+
keyStyle.spacing -
|
|
81830
|
+
valueStyle.spacing;
|
|
81831
|
+
value.multiLine = true;
|
|
81832
|
+
if (!value.maxWidth) {
|
|
81833
|
+
value.maxWidth = Math.ceil(value.width);
|
|
81834
|
+
}
|
|
81835
|
+
attributes.valueWidth = Math.max(attributes.valueWidth, value.width);
|
|
81836
|
+
}
|
|
81750
81837
|
});
|
|
81751
|
-
return {
|
|
81752
|
-
width: bound.width(),
|
|
81753
|
-
height: bound.height(),
|
|
81754
|
-
text: textLines
|
|
81755
|
-
};
|
|
81756
81838
|
}
|
|
81757
|
-
|
|
81758
|
-
|
|
81759
|
-
|
|
81760
|
-
text: textLines
|
|
81761
|
-
};
|
|
81839
|
+
attributes.panel.width = containerWidth;
|
|
81840
|
+
attributes.panel.height = containerHeight;
|
|
81841
|
+
return attributes;
|
|
81762
81842
|
};
|
|
81763
81843
|
|
|
81764
81844
|
var TooltipResult;
|
|
@@ -81777,7 +81857,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
81777
81857
|
constructor(tooltipId, component) {
|
|
81778
81858
|
this._visible = true;
|
|
81779
81859
|
this._id = '';
|
|
81780
|
-
this.
|
|
81860
|
+
this._attributes = null;
|
|
81861
|
+
this._isReleased = false;
|
|
81781
81862
|
this.showTooltip = (activeType, data, params) => {
|
|
81782
81863
|
var _a;
|
|
81783
81864
|
let changePositionOnly = !!params.changePositionOnly;
|
|
@@ -81794,7 +81875,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
81794
81875
|
this._changeTooltip = (visible, params, changePositionOnly, activeType, data) => {
|
|
81795
81876
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
81796
81877
|
const tooltipSpec = this._component.getSpec();
|
|
81797
|
-
if (!tooltipSpec) {
|
|
81878
|
+
if (this._isReleased || !tooltipSpec) {
|
|
81798
81879
|
return TooltipResult.failed;
|
|
81799
81880
|
}
|
|
81800
81881
|
if (!visible) {
|
|
@@ -81844,6 +81925,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
81844
81925
|
};
|
|
81845
81926
|
this._changeTooltipPosition = (changePositionOnly, actualTooltip, spec, activeType, data, params) => {
|
|
81846
81927
|
var _a, _b, _c;
|
|
81928
|
+
if (this._isReleased) {
|
|
81929
|
+
return TooltipResult.failed;
|
|
81930
|
+
}
|
|
81847
81931
|
const event = params.event;
|
|
81848
81932
|
if (spec.handler) {
|
|
81849
81933
|
return (_c = (_b = (_a = spec.handler).showTooltip) === null || _b === void 0 ? void 0 : _b.call(_a, activeType, data, params)) !== null && _c !== void 0 ? _c : TooltipResult.success;
|
|
@@ -82168,6 +82252,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
82168
82252
|
return;
|
|
82169
82253
|
}
|
|
82170
82254
|
this._removeTooltip();
|
|
82255
|
+
this._isReleased = true;
|
|
82171
82256
|
}
|
|
82172
82257
|
_throttle(callback) {
|
|
82173
82258
|
const tooltipSpec = this._component.getSpec();
|
|
@@ -82191,57 +82276,14 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
82191
82276
|
return Object.assign(Object.assign({}, DEFAULT_OPTIONS), { offsetX: (_a = offset === null || offset === void 0 ? void 0 : offset.x) !== null && _a !== void 0 ? _a : DEFAULT_OPTIONS.offsetX, offsetY: (_b = offset === null || offset === void 0 ? void 0 : offset.y) !== null && _b !== void 0 ? _b : DEFAULT_OPTIONS.offsetY });
|
|
82192
82277
|
}
|
|
82193
82278
|
_getTooltipBoxSize(actualTooltip, changePositionOnly) {
|
|
82194
|
-
var _a, _b, _c, _d;
|
|
82195
|
-
if (!changePositionOnly || isNil$1(this.
|
|
82196
|
-
|
|
82197
|
-
|
|
82198
|
-
return {
|
|
82199
|
-
width: (_b = (_a = this._attributeCache) === null || _a === void 0 ? void 0 : _a.panel) === null || _b === void 0 ? void 0 : _b.width,
|
|
82200
|
-
height: (_d = (_c = this._attributeCache) === null || _c === void 0 ? void 0 : _c.panel) === null || _d === void 0 ? void 0 : _d.height
|
|
82201
|
-
};
|
|
82202
|
-
}
|
|
82203
|
-
_getStyle() {
|
|
82204
|
-
var _a, _b, _c, _d, _e;
|
|
82205
|
-
const tooltipSpec = this._component.getSpec();
|
|
82206
|
-
const { style = {}, enterable, transitionDuration } = tooltipSpec;
|
|
82207
|
-
const { panel = {}, titleLabel, shape, keyLabel, valueLabel, spaceRow } = style;
|
|
82208
|
-
const { backgroundColor, border, shadow, padding } = panel;
|
|
82209
|
-
const panelStyle = {
|
|
82210
|
-
lineWidth: (_a = border === null || border === void 0 ? void 0 : border.width) !== null && _a !== void 0 ? _a : 0,
|
|
82211
|
-
shadow: !!shadow
|
|
82212
|
-
};
|
|
82213
|
-
if (border === null || border === void 0 ? void 0 : border.color) {
|
|
82214
|
-
panelStyle.stroke = border.color;
|
|
82215
|
-
}
|
|
82216
|
-
if (backgroundColor) {
|
|
82217
|
-
panelStyle.fill = backgroundColor;
|
|
82218
|
-
}
|
|
82219
|
-
if (shadow) {
|
|
82220
|
-
panelStyle.shadowColor = shadow.color;
|
|
82221
|
-
panelStyle.shadowBlur = shadow.blur;
|
|
82222
|
-
panelStyle.shadowOffsetX = shadow.x;
|
|
82223
|
-
panelStyle.shadowOffsetY = shadow.y;
|
|
82224
|
-
panelStyle.shadowSpread = shadow.spread;
|
|
82225
|
-
}
|
|
82226
|
-
const { radius } = border !== null && border !== void 0 ? border : {};
|
|
82227
|
-
if (isValid$1(radius)) {
|
|
82228
|
-
panelStyle.cornerRadius = [radius, radius, radius, radius];
|
|
82279
|
+
var _a, _b, _c, _d, _e, _f;
|
|
82280
|
+
if (!changePositionOnly || isNil$1(this._attributes)) {
|
|
82281
|
+
const globalTheme = (_b = (_a = this._chartOption).getTheme) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
82282
|
+
this._attributes = getTooltipAttributes(actualTooltip, this._component.getSpec(), globalTheme);
|
|
82229
82283
|
}
|
|
82230
|
-
const globalTheme = (_c = (_b = this._chartOption).getTheme) === null || _c === void 0 ? void 0 : _c.call(_b);
|
|
82231
82284
|
return {
|
|
82232
|
-
panel:
|
|
82233
|
-
|
|
82234
|
-
shape: {
|
|
82235
|
-
fill: true,
|
|
82236
|
-
size: (_d = shape === null || shape === void 0 ? void 0 : shape.size) !== null && _d !== void 0 ? _d : 8,
|
|
82237
|
-
spacing: (_e = shape === null || shape === void 0 ? void 0 : shape.spacing) !== null && _e !== void 0 ? _e : 6
|
|
82238
|
-
},
|
|
82239
|
-
key: getTextAttributes(keyLabel, globalTheme),
|
|
82240
|
-
value: getTextAttributes(valueLabel, globalTheme),
|
|
82241
|
-
padding,
|
|
82242
|
-
spaceRow,
|
|
82243
|
-
enterable,
|
|
82244
|
-
transitionDuration
|
|
82285
|
+
width: (_d = (_c = this._attributes) === null || _c === void 0 ? void 0 : _c.panel) === null || _d === void 0 ? void 0 : _d.width,
|
|
82286
|
+
height: (_f = (_e = this._attributes) === null || _e === void 0 ? void 0 : _e.panel) === null || _f === void 0 ? void 0 : _f.height
|
|
82245
82287
|
};
|
|
82246
82288
|
}
|
|
82247
82289
|
_getParentElement(spec) {
|
|
@@ -82252,7 +82294,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
82252
82294
|
}
|
|
82253
82295
|
_initFromSpec() {
|
|
82254
82296
|
this._option = this._getDefaultOption();
|
|
82255
|
-
this._style = this._getStyle();
|
|
82256
82297
|
this.changeTooltip = this._throttle(this._changeTooltip);
|
|
82257
82298
|
this.changeTooltipPosition = this._throttle(this._changeTooltipPosition);
|
|
82258
82299
|
}
|
|
@@ -82286,22 +82327,24 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
82286
82327
|
}
|
|
82287
82328
|
return numArr;
|
|
82288
82329
|
};
|
|
82289
|
-
function getDomStyles(
|
|
82290
|
-
var _a, _b, _c, _d, _e
|
|
82291
|
-
const { panel
|
|
82292
|
-
const {
|
|
82293
|
-
const
|
|
82330
|
+
function getDomStyles(attributes) {
|
|
82331
|
+
var _a, _b, _c, _d, _e;
|
|
82332
|
+
const { panel = {}, title: titleAttribute, content: contentAttribute, titleStyle = {}, contentStyle = {}, padding, keyWidth, valueWidth, enterable, transitionDuration } = attributes !== null && attributes !== void 0 ? attributes : {};
|
|
82333
|
+
const { fill: backgroundColor, shadow, shadowBlur, shadowColor, shadowOffsetX, shadowOffsetY, shadowSpread, cornerRadius, stroke: strokeColor, lineWidth = 0, width = 0, height = 0 } = panel;
|
|
82334
|
+
const { value: title = {} } = titleStyle;
|
|
82335
|
+
const { shape = {}, key = {}, value = {} } = contentStyle;
|
|
82294
82336
|
const shapeStyle = getShapeStyle(shape);
|
|
82295
82337
|
const keyStyle = getLabelStyle(key);
|
|
82296
82338
|
const valueStyle = getLabelStyle(value);
|
|
82339
|
+
const { bottom, left, right, top } = normalizeLayoutPaddingSpec(padding);
|
|
82297
82340
|
const styles = {
|
|
82298
82341
|
panel: {
|
|
82299
|
-
width: getPixelPropertyStr(
|
|
82300
|
-
minHeight: getPixelPropertyStr(
|
|
82301
|
-
paddingBottom: getPixelPropertyStr(
|
|
82302
|
-
paddingLeft: getPixelPropertyStr(
|
|
82303
|
-
paddingRight: getPixelPropertyStr(
|
|
82304
|
-
paddingTop: getPixelPropertyStr(
|
|
82342
|
+
width: getPixelPropertyStr(width + lineWidth * 2),
|
|
82343
|
+
minHeight: getPixelPropertyStr(height + lineWidth * 2),
|
|
82344
|
+
paddingBottom: getPixelPropertyStr(bottom),
|
|
82345
|
+
paddingLeft: getPixelPropertyStr(left),
|
|
82346
|
+
paddingRight: getPixelPropertyStr(right),
|
|
82347
|
+
paddingTop: getPixelPropertyStr(top),
|
|
82305
82348
|
borderColor: strokeColor,
|
|
82306
82349
|
borderWidth: getPixelPropertyStr(lineWidth),
|
|
82307
82350
|
borderRadius: getPixelPropertyStr(cornerRadius),
|
|
@@ -82320,20 +82363,20 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
82320
82363
|
common: shapeStyle,
|
|
82321
82364
|
items: [],
|
|
82322
82365
|
width: getPixelPropertyStr(shape.size),
|
|
82323
|
-
marginRight: getPixelPropertyStr((
|
|
82324
|
-
marginBottom: getPixelPropertyStr(-((
|
|
82366
|
+
marginRight: getPixelPropertyStr((_a = shape.spacing) !== null && _a !== void 0 ? _a : DEFAULT_SHAPE_SPACING),
|
|
82367
|
+
marginBottom: getPixelPropertyStr(-((_c = (_b = contentAttribute === null || contentAttribute === void 0 ? void 0 : contentAttribute[(contentAttribute === null || contentAttribute === void 0 ? void 0 : contentAttribute.length) - 1]) === null || _b === void 0 ? void 0 : _b.spaceRow) !== null && _c !== void 0 ? _c : 0))
|
|
82325
82368
|
},
|
|
82326
82369
|
keyColumn: {
|
|
82327
82370
|
common: keyStyle,
|
|
82328
82371
|
items: contentAttribute === null || contentAttribute === void 0 ? void 0 : contentAttribute.map(({ key, spaceRow }, i) => (Object.assign(Object.assign(Object.assign({ marginTop: '0px', marginBottom: i < contentAttribute.length - 1 ? getPixelPropertyStr(spaceRow) : '0px' }, keyStyle), getLabelStyle(key)), ((key === null || key === void 0 ? void 0 : key.multiLine) ? { width: getPixelPropertyStr(Math.ceil(key.width)) } : undefined)))),
|
|
82329
82372
|
width: getPixelPropertyStr(keyWidth),
|
|
82330
|
-
marginRight: getPixelPropertyStr((
|
|
82373
|
+
marginRight: getPixelPropertyStr((_d = key.spacing) !== null && _d !== void 0 ? _d : DEFAULT_KEY_SPACING)
|
|
82331
82374
|
},
|
|
82332
82375
|
valueColumn: {
|
|
82333
82376
|
common: valueStyle,
|
|
82334
82377
|
items: contentAttribute === null || contentAttribute === void 0 ? void 0 : contentAttribute.map(({ value, spaceRow }, i) => (Object.assign(Object.assign(Object.assign({ marginTop: '0px', marginBottom: i < contentAttribute.length - 1 ? getPixelPropertyStr(spaceRow) : '0px' }, valueStyle), getLabelStyle(value)), ((value === null || value === void 0 ? void 0 : value.multiLine) ? { width: getPixelPropertyStr(Math.ceil(value.width)) } : undefined)))),
|
|
82335
82378
|
width: getPixelPropertyStr(valueWidth),
|
|
82336
|
-
marginRight: getPixelPropertyStr((
|
|
82379
|
+
marginRight: getPixelPropertyStr((_e = value.spacing) !== null && _e !== void 0 ? _e : DEFAULT_VALUE_SPACING)
|
|
82337
82380
|
}
|
|
82338
82381
|
};
|
|
82339
82382
|
return styles;
|
|
@@ -83038,7 +83081,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
83038
83081
|
valueToHtml: this._option.sanitize,
|
|
83039
83082
|
getTooltipStyle: () => this._domStyle,
|
|
83040
83083
|
getTooltipActual: () => this._tooltipActual,
|
|
83041
|
-
getTooltipAttributes: () => this.
|
|
83084
|
+
getTooltipAttributes: () => this._attributes
|
|
83042
83085
|
}, [tooltipSpec.className], this.id);
|
|
83043
83086
|
}
|
|
83044
83087
|
}
|
|
@@ -83069,7 +83112,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
83069
83112
|
}
|
|
83070
83113
|
}
|
|
83071
83114
|
_initStyle() {
|
|
83072
|
-
this._domStyle = getDomStyles(this.
|
|
83115
|
+
this._domStyle = getDomStyles(this._attributes);
|
|
83073
83116
|
}
|
|
83074
83117
|
_getParentElement(spec) {
|
|
83075
83118
|
var _a;
|
|
@@ -83115,7 +83158,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
83115
83158
|
if (this._layer) {
|
|
83116
83159
|
this._layer.removeAllChild();
|
|
83117
83160
|
}
|
|
83118
|
-
this.
|
|
83161
|
+
this._attributes = null;
|
|
83119
83162
|
}
|
|
83120
83163
|
_updateTooltip(visible, params, actualTooltip) {
|
|
83121
83164
|
this._visible = visible;
|
|
@@ -83137,7 +83180,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
83137
83180
|
}
|
|
83138
83181
|
const pos = actualTooltip === null || actualTooltip === void 0 ? void 0 : actualTooltip.position;
|
|
83139
83182
|
if (!params.changePositionOnly) {
|
|
83140
|
-
this._tooltipComponent.setAttributes(Object.assign(Object.assign({}, this.
|
|
83183
|
+
this._tooltipComponent.setAttributes(Object.assign(Object.assign({}, this._attributes), pos));
|
|
83141
83184
|
}
|
|
83142
83185
|
else if (isValid$1(pos)) {
|
|
83143
83186
|
this._tooltipComponent.setAttributes(pos);
|
|
@@ -88828,6 +88871,28 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
88828
88871
|
loadPoptip();
|
|
88829
88872
|
};
|
|
88830
88873
|
|
|
88874
|
+
const registerAllEnv = () => {
|
|
88875
|
+
initAllEnv();
|
|
88876
|
+
};
|
|
88877
|
+
const registerBrowserEnv = () => {
|
|
88878
|
+
loadBrowserEnv(container);
|
|
88879
|
+
};
|
|
88880
|
+
const registerLarkEnv = () => {
|
|
88881
|
+
loadFeishuEnv(container);
|
|
88882
|
+
};
|
|
88883
|
+
const registerLynxEnv = () => {
|
|
88884
|
+
loadLynxEnv(container);
|
|
88885
|
+
};
|
|
88886
|
+
const registerNodeEnv = () => {
|
|
88887
|
+
loadNodeEnv(container);
|
|
88888
|
+
};
|
|
88889
|
+
const registerTaroEnv = () => {
|
|
88890
|
+
loadTaroEnv(container);
|
|
88891
|
+
};
|
|
88892
|
+
const registerWXEnv = () => {
|
|
88893
|
+
loadWxEnv(container);
|
|
88894
|
+
};
|
|
88895
|
+
|
|
88831
88896
|
VChart.useRegisters([
|
|
88832
88897
|
registerLineChart,
|
|
88833
88898
|
registerAreaChart,
|
|
@@ -88889,6 +88954,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
88889
88954
|
registerGridLayout,
|
|
88890
88955
|
registerLayout3d
|
|
88891
88956
|
]);
|
|
88957
|
+
VChart.useRegisters([registerAllEnv]);
|
|
88892
88958
|
|
|
88893
88959
|
exports.Arc3dMark = Arc3dMark;
|
|
88894
88960
|
exports.ArcMark = ArcMark;
|
|
@@ -89015,6 +89081,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89015
89081
|
exports.WordCloudChart = WordCloudChart;
|
|
89016
89082
|
exports.WordCloudSeries = WordCloudSeries;
|
|
89017
89083
|
exports.default = VChart;
|
|
89084
|
+
exports.registerAllEnv = registerAllEnv;
|
|
89018
89085
|
exports.registerAreaChart = registerAreaChart;
|
|
89019
89086
|
exports.registerAreaSeries = registerAreaSeries;
|
|
89020
89087
|
exports.registerBar3dChart = registerBar3dChart;
|
|
@@ -89023,6 +89090,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89023
89090
|
exports.registerBarSeries = registerBarSeries;
|
|
89024
89091
|
exports.registerBoxplotChart = registerBoxplotChart;
|
|
89025
89092
|
exports.registerBoxplotSeries = registerBoxplotSeries;
|
|
89093
|
+
exports.registerBrowserEnv = registerBrowserEnv;
|
|
89026
89094
|
exports.registerBrush = registerBrush;
|
|
89027
89095
|
exports.registerCartesianBandAxis = registerCartesianBandAxis;
|
|
89028
89096
|
exports.registerCartesianCrossHair = registerCartesianCrossHair;
|
|
@@ -89055,18 +89123,21 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89055
89123
|
exports.registerHistogramChart = registerHistogramChart;
|
|
89056
89124
|
exports.registerIndicator = registerIndicator;
|
|
89057
89125
|
exports.registerLabel = registerLabel;
|
|
89126
|
+
exports.registerLarkEnv = registerLarkEnv;
|
|
89058
89127
|
exports.registerLayout3d = registerLayout3d;
|
|
89059
89128
|
exports.registerLineChart = registerLineChart;
|
|
89060
89129
|
exports.registerLineSeries = registerLineSeries;
|
|
89061
89130
|
exports.registerLinearProgressChart = registerLinearProgressChart;
|
|
89062
89131
|
exports.registerLinearProgressSeries = registerLinearProgressSeries;
|
|
89063
89132
|
exports.registerLinkSeries = registerLinkSeries;
|
|
89133
|
+
exports.registerLynxEnv = registerLynxEnv;
|
|
89064
89134
|
exports.registerMapChart = registerMapChart;
|
|
89065
89135
|
exports.registerMapLabel = registerMapLabel;
|
|
89066
89136
|
exports.registerMapSeries = registerMapSeries;
|
|
89067
89137
|
exports.registerMarkArea = registerMarkArea;
|
|
89068
89138
|
exports.registerMarkLine = registerMarkLine;
|
|
89069
89139
|
exports.registerMarkPoint = registerMarkPoint;
|
|
89140
|
+
exports.registerNodeEnv = registerNodeEnv;
|
|
89070
89141
|
exports.registerPie3dChart = registerPie3dChart;
|
|
89071
89142
|
exports.registerPie3dSeries = registerPie3dSeries;
|
|
89072
89143
|
exports.registerPieChart = registerPieChart;
|
|
@@ -89094,11 +89165,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89094
89165
|
exports.registerSequenceChart = registerSequenceChart;
|
|
89095
89166
|
exports.registerSunBurstSeries = registerSunBurstSeries;
|
|
89096
89167
|
exports.registerSunburstChart = registerSunburstChart;
|
|
89168
|
+
exports.registerTaroEnv = registerTaroEnv;
|
|
89097
89169
|
exports.registerTitle = registerTitle;
|
|
89098
89170
|
exports.registerTooltip = registerTooltip;
|
|
89099
89171
|
exports.registerTotalLabel = registerTotalLabel;
|
|
89100
89172
|
exports.registerTreemapChart = registerTreemapChart;
|
|
89101
89173
|
exports.registerTreemapSeries = registerTreemapSeries;
|
|
89174
|
+
exports.registerWXEnv = registerWXEnv;
|
|
89102
89175
|
exports.registerWaterfallChart = registerWaterfallChart;
|
|
89103
89176
|
exports.registerWaterfallSeries = registerWaterfallSeries;
|
|
89104
89177
|
exports.registerWordCloud3dChart = registerWordCloud3dChart;
|