@visactor/vchart 1.13.3 → 1.13.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.es.js +134 -193
- package/build/index.js +134 -193
- package/build/index.min.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/animation/spec.d.ts +9 -7
- package/cjs/animation/spec.js.map +1 -1
- package/cjs/component/axis/cartesian/interface/spec.js.map +1 -1
- package/cjs/component/axis/interface/common.js.map +1 -1
- package/cjs/component/axis/interface/spec.js.map +1 -1
- package/cjs/component/axis/mixin/util/break-data.js +3 -3
- package/cjs/component/axis/mixin/util/break-data.js.map +1 -1
- package/cjs/component/common/trigger/config.d.ts +2 -2
- package/cjs/component/common/trigger/config.js +2 -2
- package/cjs/component/common/trigger/config.js.map +1 -1
- package/cjs/component/crosshair/interface/spec.js.map +1 -1
- package/cjs/component/data-zoom/data-zoom/interface.js.map +1 -1
- package/cjs/component/label/interface.js.map +1 -1
- package/cjs/component/legend/continuous/interface.js.map +1 -1
- package/cjs/component/legend/interface.js.map +1 -1
- package/cjs/component/marker/interface.js.map +1 -1
- package/cjs/component/marker/mark-area/interface/spec.js.map +1 -1
- package/cjs/component/marker/mark-area/interface/theme.js.map +1 -1
- package/cjs/component/title/interface/spec.js.map +1 -1
- package/cjs/component/tooltip/interface/spec.js.map +1 -1
- package/cjs/component/tooltip/interface/theme.js.map +1 -1
- package/cjs/component/tooltip/tooltip.js +9 -7
- package/cjs/component/tooltip/tooltip.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/interaction/interface.js.map +1 -1
- package/cjs/interaction/zoom/zoomable.js +13 -9
- package/cjs/interaction/zoom/zoomable.js.map +1 -1
- package/cjs/layout/interface.js.map +1 -1
- package/cjs/mark/interface/common.js.map +1 -1
- package/cjs/plugin/components/tooltip-handler/base.js +5 -1
- package/cjs/plugin/components/tooltip-handler/base.js.map +1 -1
- package/cjs/plugin/components/tooltip-handler/dom-tooltip-handler.js +5 -6
- package/cjs/plugin/components/tooltip-handler/dom-tooltip-handler.js.map +1 -1
- package/cjs/plugin/components/tooltip-handler/utils/style.d.ts +2 -1
- package/cjs/plugin/components/tooltip-handler/utils/style.js +13 -8
- package/cjs/plugin/components/tooltip-handler/utils/style.js.map +1 -1
- package/cjs/region/interface.js.map +1 -1
- package/cjs/region/region.js +3 -1
- package/cjs/region/region.js.map +1 -1
- package/cjs/series/area/interface.d.ts +3 -1
- package/cjs/series/area/interface.js.map +1 -1
- package/cjs/series/box-plot/interface.d.ts +1 -1
- package/cjs/series/box-plot/interface.js.map +1 -1
- package/cjs/series/circle-packing/interface.js.map +1 -1
- package/cjs/series/interface/common.js.map +1 -1
- package/cjs/series/map/interface.js.map +1 -1
- package/cjs/series/mixin/interface.js.map +1 -1
- package/cjs/series/polar/interface.js.map +1 -1
- package/cjs/series/progress/linear/interface.d.ts +1 -1
- package/cjs/series/progress/linear/interface.js.map +1 -1
- package/cjs/series/radar/interface.js.map +1 -1
- package/cjs/series/scatter/interface.js.map +1 -1
- package/cjs/series/word-cloud/base.js +4 -3
- package/cjs/series/word-cloud/base.js.map +1 -1
- package/cjs/series/word-cloud/interface.d.ts +1 -1
- package/cjs/series/word-cloud/interface.js.map +1 -1
- package/cjs/typings/layout.js.map +1 -1
- package/cjs/typings/spec/common.d.ts +18 -9
- package/cjs/typings/spec/common.js.map +1 -1
- package/cjs/typings/tooltip/line.js.map +1 -1
- package/cjs/typings/tooltip/shape.js.map +1 -1
- package/cjs/typings/tooltip/tooltip.js.map +1 -1
- package/cjs/typings/visual.js.map +1 -1
- package/esm/animation/spec.d.ts +9 -7
- package/esm/animation/spec.js.map +1 -1
- package/esm/component/axis/cartesian/interface/spec.js.map +1 -1
- package/esm/component/axis/interface/common.js.map +1 -1
- package/esm/component/axis/interface/spec.js.map +1 -1
- package/esm/component/axis/mixin/util/break-data.js +3 -3
- package/esm/component/axis/mixin/util/break-data.js.map +1 -1
- package/esm/component/common/trigger/config.d.ts +2 -2
- package/esm/component/common/trigger/config.js +2 -2
- package/esm/component/common/trigger/config.js.map +1 -1
- package/esm/component/crosshair/interface/spec.js.map +1 -1
- package/esm/component/data-zoom/data-zoom/interface.js.map +1 -1
- package/esm/component/label/interface.js.map +1 -1
- package/esm/component/legend/continuous/interface.js.map +1 -1
- package/esm/component/legend/interface.js.map +1 -1
- package/esm/component/marker/interface.js.map +1 -1
- package/esm/component/marker/mark-area/interface/spec.js.map +1 -1
- package/esm/component/marker/mark-area/interface/theme.js.map +1 -1
- package/esm/component/title/interface/spec.js.map +1 -1
- package/esm/component/tooltip/interface/spec.js.map +1 -1
- package/esm/component/tooltip/interface/theme.js.map +1 -1
- package/esm/component/tooltip/tooltip.js +9 -7
- package/esm/component/tooltip/tooltip.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/interaction/interface.js.map +1 -1
- package/esm/interaction/zoom/zoomable.js +13 -9
- package/esm/interaction/zoom/zoomable.js.map +1 -1
- package/esm/layout/interface.js.map +1 -1
- package/esm/mark/interface/common.js.map +1 -1
- package/esm/plugin/components/tooltip-handler/base.js +5 -1
- package/esm/plugin/components/tooltip-handler/base.js.map +1 -1
- package/esm/plugin/components/tooltip-handler/dom-tooltip-handler.js +5 -4
- package/esm/plugin/components/tooltip-handler/dom-tooltip-handler.js.map +1 -1
- package/esm/plugin/components/tooltip-handler/utils/style.d.ts +2 -1
- package/esm/plugin/components/tooltip-handler/utils/style.js +11 -6
- package/esm/plugin/components/tooltip-handler/utils/style.js.map +1 -1
- package/esm/region/interface.js.map +1 -1
- package/esm/region/region.js +3 -1
- package/esm/region/region.js.map +1 -1
- package/esm/series/area/interface.d.ts +3 -1
- package/esm/series/area/interface.js.map +1 -1
- package/esm/series/box-plot/interface.d.ts +1 -1
- package/esm/series/box-plot/interface.js.map +1 -1
- package/esm/series/circle-packing/interface.js.map +1 -1
- package/esm/series/interface/common.js.map +1 -1
- package/esm/series/map/interface.js.map +1 -1
- package/esm/series/mixin/interface.js.map +1 -1
- package/esm/series/polar/interface.js.map +1 -1
- package/esm/series/progress/linear/interface.d.ts +1 -1
- package/esm/series/progress/linear/interface.js.map +1 -1
- package/esm/series/radar/interface.js.map +1 -1
- package/esm/series/scatter/interface.js.map +1 -1
- package/esm/series/word-cloud/base.js +4 -3
- package/esm/series/word-cloud/base.js.map +1 -1
- package/esm/series/word-cloud/interface.d.ts +1 -1
- package/esm/series/word-cloud/interface.js.map +1 -1
- package/esm/typings/layout.js.map +1 -1
- package/esm/typings/spec/common.d.ts +18 -9
- package/esm/typings/spec/common.js.map +1 -1
- package/esm/typings/tooltip/line.js.map +1 -1
- package/esm/typings/tooltip/shape.js.map +1 -1
- package/esm/typings/tooltip/tooltip.js.map +1 -1
- package/esm/typings/visual.js.map +1 -1
- package/package.json +15 -15
package/build/index.js
CHANGED
|
@@ -8791,7 +8791,7 @@
|
|
|
8791
8791
|
default:
|
|
8792
8792
|
if (this._t <= 0) this.context.lineTo(this._x, y, !1 !== this._lastDefined && !1 !== p.defined, this.lastPoint), this.context.lineTo(x, y, !1 !== this._lastDefined && !1 !== p.defined, p);else {
|
|
8793
8793
|
const x1 = this._x * (1 - this._t) + x * this._t;
|
|
8794
|
-
this.context.lineTo(x1, this._y, !1 !== this._lastDefined && !1 !== p.defined, this.lastPoint), this.context.lineTo(x1, y, !1 !== this._lastDefined && !1 !== p.defined, p);
|
|
8794
|
+
.5 === this._t ? this.context.lineTo(x1, this._y, !1 !== this._lastDefined, this.lastPoint) : this.context.lineTo(x1, this._y, !1 !== this._lastDefined && !1 !== p.defined, this.lastPoint), this.context.lineTo(x1, y, !1 !== this._lastDefined && !1 !== p.defined, p);
|
|
8795
8795
|
}
|
|
8796
8796
|
}
|
|
8797
8797
|
this._lastDefined = p.defined, this._x = x, this._y = y, this.lastPoint = p;
|
|
@@ -12521,7 +12521,7 @@
|
|
|
12521
12521
|
let id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Generator.GenAutoIncrementId();
|
|
12522
12522
|
let timeline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultTimeline;
|
|
12523
12523
|
let slience = arguments.length > 2 ? arguments[2] : undefined;
|
|
12524
|
-
this.id = id, this.timeline = timeline, this.status = AnimateStatus.INITIAL, this.tailAnimate = new SubAnimate(this), this.subAnimates = [this.tailAnimate], this.timeScale = 1, this.rawPosition = -1, this._startTime = 0, this._duringTime = 0, this.timeline.addAnimate(this), this.slience = slience;
|
|
12524
|
+
this.id = id, this.timeline = timeline || defaultTimeline, this.status = AnimateStatus.INITIAL, this.tailAnimate = new SubAnimate(this), this.subAnimates = [this.tailAnimate], this.timeScale = 1, this.rawPosition = -1, this._startTime = 0, this._duringTime = 0, this.timeline.addAnimate(this), this.slience = slience;
|
|
12525
12525
|
}
|
|
12526
12526
|
setTimeline(timeline) {
|
|
12527
12527
|
timeline !== this.timeline && (this.timeline.removeAnimate(this, !1), timeline.addAnimate(this));
|
|
@@ -14383,7 +14383,7 @@
|
|
|
14383
14383
|
}
|
|
14384
14384
|
static GetFile(url, type) {
|
|
14385
14385
|
let data = ResourceLoader.cache.get(url);
|
|
14386
|
-
return data ? "
|
|
14386
|
+
return data ? "fail" === data.loadState ? Promise.reject() : "init" === data.loadState || "loading" === data.loadState ? data.dataPromise.then(data => data.data) : Promise.resolve(data.data) : (data = {
|
|
14387
14387
|
type: type,
|
|
14388
14388
|
loadState: "init"
|
|
14389
14389
|
}, ResourceLoader.cache.set(url, data), "arrayBuffer" === type ? data.dataPromise = application.global.loadArrayBuffer(url) : "blob" === type ? data.dataPromise = application.global.loadBlob(url) : "json" === type && (data.dataPromise = application.global.loadJson(url)), data.dataPromise.then(data => data.data));
|
|
@@ -17184,8 +17184,8 @@
|
|
|
17184
17184
|
constructor() {
|
|
17185
17185
|
super(...arguments), this.time = BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 0;
|
|
17186
17186
|
}
|
|
17187
|
-
drawShape(
|
|
17188
|
-
return super.drawShape(
|
|
17187
|
+
drawShape(image, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb) {
|
|
17188
|
+
return super.drawShape(image, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb);
|
|
17189
17189
|
}
|
|
17190
17190
|
}
|
|
17191
17191
|
const defaultImageRenderContribution = new DefaultImageRenderContribution();
|
|
@@ -17620,7 +17620,7 @@
|
|
|
17620
17620
|
this._draw(line, lineAttribute, !1, drawContext, params);
|
|
17621
17621
|
}
|
|
17622
17622
|
drawSegmentItem(context, cache, fill, stroke, fillOpacity, strokeOpacity, attribute, defaultAttribute, clipRange, clipRangeByDimension, offsetX, offsetY, line, fillCb, strokeCb) {
|
|
17623
|
-
var _a
|
|
17623
|
+
var _a;
|
|
17624
17624
|
if (!cache) return;
|
|
17625
17625
|
context.beginPath();
|
|
17626
17626
|
const z = null !== (_a = this.z) && void 0 !== _a ? _a : 0;
|
|
@@ -17633,27 +17633,7 @@
|
|
|
17633
17633
|
x: originX = 0,
|
|
17634
17634
|
x: originY = 0
|
|
17635
17635
|
} = attribute;
|
|
17636
|
-
!1 !== fill && (fillCb ? fillCb(context, attribute, defaultAttribute) : fillOpacity && (context.setCommonStyle(line, attribute, originX - offsetX, originY - offsetY, defaultAttribute), context.fill())), !1 !== stroke && (strokeCb ? strokeCb(context, attribute, defaultAttribute) : strokeOpacity && (context.setStrokeStyle(line, attribute, originX - offsetX, originY - offsetY, defaultAttribute), context.stroke()));
|
|
17637
|
-
let {
|
|
17638
|
-
connectedType: connectedType,
|
|
17639
|
-
connectedX: connectedX,
|
|
17640
|
-
connectedY: connectedY,
|
|
17641
|
-
connectedStyle: connectedStyle
|
|
17642
|
-
} = attribute;
|
|
17643
|
-
if (isArray$1(defaultAttribute) ? (connectedType = null !== (_b = null != connectedType ? connectedType : defaultAttribute[0].connectedType) && void 0 !== _b ? _b : defaultAttribute[1].connectedType, connectedX = null !== (_c = null != connectedX ? connectedX : defaultAttribute[0].connectedX) && void 0 !== _c ? _c : defaultAttribute[1].connectedX, connectedY = null !== (_d = null != connectedY ? connectedY : defaultAttribute[0].connectedY) && void 0 !== _d ? _d : defaultAttribute[1].connectedY, connectedStyle = null !== (_e = null != connectedStyle ? connectedStyle : defaultAttribute[0].connectedStyle) && void 0 !== _e ? _e : defaultAttribute[1].connectedStyle) : (connectedType = null != connectedType ? connectedType : defaultAttribute.connectedType, connectedX = null != connectedX ? connectedX : defaultAttribute.connectedX, connectedY = null != connectedY ? connectedY : defaultAttribute.connectedY, connectedStyle = null != connectedStyle ? connectedStyle : defaultAttribute.connectedStyle), "connect" !== connectedType && "zero" !== connectedType && (connectedType = "none"), "none" !== connectedType) {
|
|
17644
|
-
context.beginPath(), drawSegments(context.camera ? context : context.nativeContext, cache, clipRange, clipRangeByDimension, {
|
|
17645
|
-
offsetX: offsetX,
|
|
17646
|
-
offsetY: offsetY,
|
|
17647
|
-
offsetZ: z,
|
|
17648
|
-
drawConnect: !0,
|
|
17649
|
-
mode: connectedType,
|
|
17650
|
-
zeroX: connectedX,
|
|
17651
|
-
zeroY: connectedY
|
|
17652
|
-
});
|
|
17653
|
-
const da = [];
|
|
17654
|
-
isArray$1(defaultAttribute) ? defaultAttribute.forEach(i => da.push(i)) : da.push(defaultAttribute), da.push(attribute), !1 !== fill && (fillCb ? fillCb(context, attribute, defaultAttribute) : fillOpacity && (context.setCommonStyle(line, connectedStyle, originX - offsetX, originY - offsetY, da), context.fill())), !1 !== stroke && (strokeCb ? strokeCb(context, attribute, defaultAttribute) : strokeOpacity && (context.setStrokeStyle(line, connectedStyle, originX - offsetX, originY - offsetY, da), context.stroke()));
|
|
17655
|
-
}
|
|
17656
|
-
return !1;
|
|
17636
|
+
return !1 !== fill && (fillCb ? fillCb(context, attribute, defaultAttribute) : fillOpacity && (context.setCommonStyle(line, attribute, originX - offsetX, originY - offsetY, defaultAttribute), context.fill())), !1 !== stroke && (strokeCb ? strokeCb(context, attribute, defaultAttribute) : strokeOpacity && (context.setStrokeStyle(line, attribute, originX - offsetX, originY - offsetY, defaultAttribute), context.stroke())), !1;
|
|
17657
17637
|
}
|
|
17658
17638
|
drawLinearLineHighPerformance(line, context, fill, stroke, fillOpacity, strokeOpacity, offsetX, offsetY, lineAttribute, drawContext, params, fillCb, strokeCb) {
|
|
17659
17639
|
var _a;
|
|
@@ -17685,7 +17665,8 @@
|
|
|
17685
17665
|
segments: segments,
|
|
17686
17666
|
points: points,
|
|
17687
17667
|
closePath: closePath,
|
|
17688
|
-
curveTension = lineAttribute.curveTension
|
|
17668
|
+
curveTension = lineAttribute.curveTension,
|
|
17669
|
+
connectedType = lineAttribute.connectedType
|
|
17689
17670
|
} = line.attribute;
|
|
17690
17671
|
if (!this.valid(line, lineAttribute, fillCb, strokeCb)) return;
|
|
17691
17672
|
let {
|
|
@@ -17697,6 +17678,9 @@
|
|
|
17697
17678
|
clipRangeByDimension = lineAttribute.clipRangeByDimension
|
|
17698
17679
|
} = line.attribute;
|
|
17699
17680
|
if (1 === clipRange && !segments && !points.some(p => !1 === p.defined) && "linear" === curveType) return this.drawLinearLineHighPerformance(line, context, !!fill, !!stroke, fillOpacity, strokeOpacity, x, y, lineAttribute, drawContext, params, fillCb, strokeCb);
|
|
17681
|
+
function parsePoint(points, connectedType) {
|
|
17682
|
+
return "none" === connectedType ? points : points.filter(p => !1 !== p.defined);
|
|
17683
|
+
}
|
|
17700
17684
|
if (line.shouldUpdateShape()) {
|
|
17701
17685
|
const {
|
|
17702
17686
|
points: points,
|
|
@@ -17718,7 +17702,7 @@
|
|
|
17718
17702
|
y: lastSeg.endY,
|
|
17719
17703
|
defined: lastSeg.curves[lastSeg.curves.length - 1].defined
|
|
17720
17704
|
} : index > 1 && (startPoint.x = lastSeg.endX, startPoint.y = lastSeg.endY, startPoint.defined = lastSeg.curves[lastSeg.curves.length - 1].defined);
|
|
17721
|
-
const data = calcLineCache(seg.points, curveType, {
|
|
17705
|
+
const data = calcLineCache(parsePoint(seg.points, connectedType), curveType, {
|
|
17722
17706
|
startPoint: startPoint,
|
|
17723
17707
|
curveTension: curveTension
|
|
17724
17708
|
});
|
|
@@ -17737,7 +17721,7 @@
|
|
|
17737
17721
|
}
|
|
17738
17722
|
} else {
|
|
17739
17723
|
if (!points || !points.length) return line.cache = null, void line.clearUpdateShapeTag();
|
|
17740
|
-
line.cache = calcLineCache(_points, curveType, {
|
|
17724
|
+
line.cache = calcLineCache(parsePoint(_points, connectedType), curveType, {
|
|
17741
17725
|
curveTension: curveTension
|
|
17742
17726
|
});
|
|
17743
17727
|
}
|
|
@@ -17769,11 +17753,6 @@
|
|
|
17769
17753
|
|
|
17770
17754
|
function drawAreaSegments(path, segPath, percent, params) {
|
|
17771
17755
|
var _a;
|
|
17772
|
-
const {
|
|
17773
|
-
drawConnect = !1,
|
|
17774
|
-
mode = "none"
|
|
17775
|
-
} = params || {};
|
|
17776
|
-
if (drawConnect && "none" === mode) return;
|
|
17777
17756
|
const {
|
|
17778
17757
|
top: top,
|
|
17779
17758
|
bottom: bottom
|
|
@@ -17783,34 +17762,11 @@
|
|
|
17783
17762
|
const topList = [],
|
|
17784
17763
|
bottomList = [];
|
|
17785
17764
|
let lastDefined = !0;
|
|
17786
|
-
|
|
17787
|
-
|
|
17788
|
-
|
|
17789
|
-
defined0 = !0;
|
|
17790
|
-
const n = top.curves.length;
|
|
17791
|
-
top.curves.forEach((curve, i) => {
|
|
17792
|
-
const bototmCurve = bottom.curves[n - i - 1];
|
|
17793
|
-
let currentTopCurve = curve,
|
|
17794
|
-
currentBottomCurve = bototmCurve;
|
|
17795
|
-
if (curve.originP1 === curve.originP2) return lastCurve = curve, void (lastBottomCurve = bototmCurve);
|
|
17796
|
-
if (lastCurve && lastCurve.originP1 === lastCurve.originP2 && (currentTopCurve = lastCurve, currentBottomCurve = lastBottomCurve), curve.defined) defined0 || (topList.push(currentTopCurve), bottomList.push(currentBottomCurve), drawAreaConnectBlock(path, topList, bottomList, params), topList.length = 0, bottomList.length = 0, defined0 = !defined0);else {
|
|
17797
|
-
const {
|
|
17798
|
-
originP1: originP1,
|
|
17799
|
-
originP2: originP2
|
|
17800
|
-
} = curve;
|
|
17801
|
-
let validTopCurve, validBottomCurve;
|
|
17802
|
-
originP1 && !1 !== originP1.defined ? (validTopCurve = currentTopCurve, validBottomCurve = currentBottomCurve) : originP1 && !1 !== originP2.defined && (validTopCurve = curve, validBottomCurve = bototmCurve), defined0 ? (defined0 = !defined0, topList.push(validTopCurve || curve), bottomList.push(validBottomCurve || bototmCurve)) : validTopCurve && (defined0 = !defined0, topList.push(validTopCurve || curve), bottomList.push(validBottomCurve || bototmCurve), drawAreaConnectBlock(path, topList, bottomList, params), topList.length = 0, bottomList.length = 0);
|
|
17803
|
-
}
|
|
17804
|
-
lastCurve = curve;
|
|
17805
|
-
}), drawAreaConnectBlock(path, topList, bottomList, params);
|
|
17806
|
-
} else {
|
|
17807
|
-
for (let i = 0, n = top.curves.length; i < n; i++) {
|
|
17808
|
-
const topCurve = top.curves[i];
|
|
17809
|
-
lastDefined !== topCurve.defined ? (lastDefined ? (drawAreaBlock(path, topList, bottomList, params), topList.length = 0, bottomList.length = 0) : (topList.push(topCurve), bottomList.push(bottom.curves[n - i - 1])), lastDefined = !lastDefined) : lastDefined && (topList.push(topCurve), bottomList.push(bottom.curves[n - i - 1]));
|
|
17810
|
-
}
|
|
17811
|
-
drawAreaBlock(path, topList, bottomList, params);
|
|
17765
|
+
for (let i = 0, n = top.curves.length; i < n; i++) {
|
|
17766
|
+
const topCurve = top.curves[i];
|
|
17767
|
+
lastDefined !== topCurve.defined ? (lastDefined ? (drawAreaBlock(path, topList, bottomList, params), topList.length = 0, bottomList.length = 0) : (topList.push(topCurve), bottomList.push(bottom.curves[n - i - 1])), lastDefined = !lastDefined) : lastDefined && (topList.push(topCurve), bottomList.push(bottom.curves[n - i - 1]));
|
|
17812
17768
|
}
|
|
17813
|
-
return;
|
|
17769
|
+
return void drawAreaBlock(path, topList, bottomList, params);
|
|
17814
17770
|
}
|
|
17815
17771
|
if (percent <= 0) return;
|
|
17816
17772
|
let {
|
|
@@ -17828,51 +17784,17 @@
|
|
|
17828
17784
|
lastDefined = !0;
|
|
17829
17785
|
const topList = [],
|
|
17830
17786
|
bottomList = [];
|
|
17831
|
-
let lastTopCurve,
|
|
17832
|
-
lastBottomCurve,
|
|
17833
|
-
defined0 = !0;
|
|
17834
17787
|
for (let i = 0, n = top.curves.length; i < n; i++) {
|
|
17835
17788
|
const topCurve = top.curves[i],
|
|
17836
17789
|
curCurveLength = topCurve.getLength(direction),
|
|
17837
17790
|
percent = (totalDrawLength - drawedLengthUntilLast) / curCurveLength;
|
|
17838
17791
|
if (percent < 0) break;
|
|
17839
|
-
|
|
17840
|
-
|
|
17841
|
-
|
|
17842
|
-
|
|
17843
|
-
if (topCurve.originP1 === topCurve.originP2) {
|
|
17844
|
-
lastTopCurve = topCurve, lastBottomCurve = bototmCurve;
|
|
17845
|
-
continue;
|
|
17846
|
-
}
|
|
17847
|
-
if (lastTopCurve && lastTopCurve.originP1 === lastTopCurve.originP2 && (currentTopCurve = lastTopCurve, currentBottomCurve = lastBottomCurve), topCurve.defined) defined0 || (topList.push(currentTopCurve), bottomList.push(currentBottomCurve), drawAreaConnectBlock(path, topList, bottomList, params), topList.length = 0, bottomList.length = 0, defined0 = !defined0);else {
|
|
17848
|
-
const {
|
|
17849
|
-
originP1: originP1,
|
|
17850
|
-
originP2: originP2
|
|
17851
|
-
} = topCurve;
|
|
17852
|
-
let validTopCurve, validBottomCurve;
|
|
17853
|
-
originP1 && !1 !== originP1.defined ? (validTopCurve = currentTopCurve, validBottomCurve = currentBottomCurve) : originP1 && !1 !== originP2.defined && (validTopCurve = topCurve, validBottomCurve = bototmCurve), defined0 ? (defined0 = !defined0, topList.push(validTopCurve || topCurve), bottomList.push(validBottomCurve || bototmCurve)) : validTopCurve && (defined0 = !defined0, topList.push(validTopCurve || topCurve), bottomList.push(validBottomCurve || bototmCurve), drawAreaConnectBlock(path, topList, bottomList, params), topList.length = 0, bottomList.length = 0);
|
|
17854
|
-
}
|
|
17855
|
-
lastTopCurve = topCurve;
|
|
17856
|
-
} else {
|
|
17857
|
-
let tc = null,
|
|
17858
|
-
bc = null;
|
|
17859
|
-
lastDefined !== topCurve.defined ? (lastDefined ? (drawAreaBlock(path, topList, bottomList, params), topList.length = 0, bottomList.length = 0) : (tc = topCurve, bc = bottom.curves[n - i - 1]), lastDefined = !lastDefined) : lastDefined && (tc = topCurve, bc = bottom.curves[n - i - 1]), tc && bc && (percent < 1 && (tc = tc.p2 && tc.p3 ? divideCubic(tc, percent)[0] : divideLinear(tc, percent)[0], bc = bc.p2 && bc.p3 ? divideCubic(bc, 1 - percent)[1] : divideLinear(bc, 1 - percent)[1]), tc.defined = lastDefined, bc.defined = lastDefined, topList.push(tc), bottomList.push(bc)), tc = null, bc = null;
|
|
17860
|
-
}
|
|
17792
|
+
drawedLengthUntilLast += curCurveLength;
|
|
17793
|
+
let tc = null,
|
|
17794
|
+
bc = null;
|
|
17795
|
+
lastDefined !== topCurve.defined ? (lastDefined ? (drawAreaBlock(path, topList, bottomList, params), topList.length = 0, bottomList.length = 0) : (tc = topCurve, bc = bottom.curves[n - i - 1]), lastDefined = !lastDefined) : lastDefined && (tc = topCurve, bc = bottom.curves[n - i - 1]), tc && bc && (percent < 1 && (tc = tc.p2 && tc.p3 ? divideCubic(tc, percent)[0] : divideLinear(tc, percent)[0], bc = bc.p2 && bc.p3 ? divideCubic(bc, 1 - percent)[1] : divideLinear(bc, 1 - percent)[1]), tc.defined = lastDefined, bc.defined = lastDefined, topList.push(tc), bottomList.push(bc)), tc = null, bc = null;
|
|
17861
17796
|
}
|
|
17862
|
-
|
|
17863
|
-
}
|
|
17864
|
-
function drawAreaConnectBlock(path, topList, bottomList, params) {
|
|
17865
|
-
if (topList.length < 2) return;
|
|
17866
|
-
const {
|
|
17867
|
-
offsetX = 0,
|
|
17868
|
-
offsetY = 0,
|
|
17869
|
-
offsetZ = 0,
|
|
17870
|
-
mode: mode
|
|
17871
|
-
} = params || {};
|
|
17872
|
-
let curve = topList[0];
|
|
17873
|
-
path.moveTo(curve.p0.x + offsetX, curve.p0.y + offsetY, offsetZ), curve = topList[topList.length - 1];
|
|
17874
|
-
let end = curve.p3 || curve.p1;
|
|
17875
|
-
path.lineTo(end.x + offsetX, end.y + offsetY, offsetZ), curve = bottomList[bottomList.length - 1], path.lineTo(curve.p0.x + offsetX, curve.p0.y + offsetY, offsetZ), curve = bottomList[0], end = curve.p3 || curve.p1, path.lineTo(end.x + offsetX, end.y + offsetY, offsetZ), path.closePath();
|
|
17797
|
+
drawAreaBlock(path, topList, bottomList, params);
|
|
17876
17798
|
}
|
|
17877
17799
|
function drawAreaBlock(path, topList, bottomList, params) {
|
|
17878
17800
|
const {
|
|
@@ -17973,7 +17895,8 @@
|
|
|
17973
17895
|
fillOpacity = areaAttribute.fillOpacity,
|
|
17974
17896
|
z = areaAttribute.z,
|
|
17975
17897
|
strokeOpacity = areaAttribute.strokeOpacity,
|
|
17976
|
-
curveTension = areaAttribute.curveTension
|
|
17898
|
+
curveTension = areaAttribute.curveTension,
|
|
17899
|
+
connectedType = areaAttribute.connectedType
|
|
17977
17900
|
} = area.attribute,
|
|
17978
17901
|
data = this.valid(area, areaAttribute, fillCb, strokeCb);
|
|
17979
17902
|
if (!data) return;
|
|
@@ -17990,6 +17913,9 @@
|
|
|
17990
17913
|
let {
|
|
17991
17914
|
curveType = areaAttribute.curveType
|
|
17992
17915
|
} = area.attribute;
|
|
17916
|
+
function parsePoint(points, connectedType) {
|
|
17917
|
+
return "connect" !== connectedType ? points : points.filter(p => !1 !== p.defined);
|
|
17918
|
+
}
|
|
17993
17919
|
if (closePath && "linear" === curveType && (curveType = "linearClosed"), 1 === clipRange && !segments && !points.some(p => !1 === p.defined) && "linear" === curveType) return this.drawLinearAreaHighPerformance(area, context, !!fill, doStroke, fillOpacity, strokeOpacity, x, y, areaAttribute, drawContext, params, fillCb, strokeCb);
|
|
17994
17920
|
if (area.shouldUpdateShape()) {
|
|
17995
17921
|
if (segments && segments.length) {
|
|
@@ -18003,7 +17929,7 @@
|
|
|
18003
17929
|
x: lastTopSeg.endX,
|
|
18004
17930
|
y: lastTopSeg.endY
|
|
18005
17931
|
} : index > 1 && (startPoint.x = lastTopSeg.endX, startPoint.y = lastTopSeg.endY);
|
|
18006
|
-
const data = calcLineCache(seg.points, curveType, {
|
|
17932
|
+
const data = calcLineCache(parsePoint(seg.points, connectedType), curveType, {
|
|
18007
17933
|
startPoint: startPoint,
|
|
18008
17934
|
curveTension: curveTension
|
|
18009
17935
|
});
|
|
@@ -18026,7 +17952,7 @@
|
|
|
18026
17952
|
y: null !== (_d = endPoint.y1) && void 0 !== _d ? _d : endPoint.y
|
|
18027
17953
|
});
|
|
18028
17954
|
}
|
|
18029
|
-
bottomPoints.length > 1 && (lastBottomSeg = calcLineCache(bottomPoints, "stepBefore" === curveType ? "stepAfter" : "stepAfter" === curveType ? "stepBefore" : curveType, {
|
|
17955
|
+
bottomPoints.length > 1 && (lastBottomSeg = calcLineCache(parsePoint(bottomPoints, connectedType), "stepBefore" === curveType ? "stepAfter" : "stepAfter" === curveType ? "stepBefore" : curveType, {
|
|
18030
17956
|
curveTension: curveTension
|
|
18031
17957
|
}), bottomCaches.unshift(lastBottomSeg));
|
|
18032
17958
|
}
|
|
@@ -18037,11 +17963,11 @@
|
|
|
18037
17963
|
} else {
|
|
18038
17964
|
if (!points || !points.length) return area.cacheArea = null, void area.clearUpdateShapeTag();
|
|
18039
17965
|
{
|
|
18040
|
-
const topPoints = points,
|
|
17966
|
+
const topPoints = parsePoint(points, connectedType),
|
|
18041
17967
|
bottomPoints = [];
|
|
18042
|
-
for (let i =
|
|
18043
|
-
x: null !== (_e =
|
|
18044
|
-
y: null !== (_f =
|
|
17968
|
+
for (let i = topPoints.length - 1; i >= 0; i--) bottomPoints.push({
|
|
17969
|
+
x: null !== (_e = topPoints[i].x1) && void 0 !== _e ? _e : topPoints[i].x,
|
|
17970
|
+
y: null !== (_f = topPoints[i].y1) && void 0 !== _f ? _f : topPoints[i].y
|
|
18045
17971
|
});
|
|
18046
17972
|
const topCache = calcLineCache(topPoints, curveType, {
|
|
18047
17973
|
curveTension: curveTension
|
|
@@ -18083,20 +18009,10 @@
|
|
|
18083
18009
|
this._draw(area, areaAttribute, !1, drawContext, params);
|
|
18084
18010
|
}
|
|
18085
18011
|
drawSegmentItem(context, cache, fill, fillOpacity, stroke, strokeOpacity, attribute, defaultAttribute, clipRange, offsetX, offsetY, offsetZ, area, drawContext, fillCb, strokeCb) {
|
|
18086
|
-
|
|
18087
|
-
return ret = ret || this._drawSegmentItem(context, cache, fill, fillOpacity, stroke, strokeOpacity, attribute, defaultAttribute, clipRange, offsetX, offsetY, offsetZ, area, drawContext, !1, fillCb, strokeCb), ret = ret || this._drawSegmentItem(context, cache, fill, fillOpacity, stroke, strokeOpacity, attribute, defaultAttribute, clipRange, offsetX, offsetY, offsetZ, area, drawContext, !0, fillCb, strokeCb), ret;
|
|
18012
|
+
return this._drawSegmentItem(context, cache, fill, fillOpacity, stroke, strokeOpacity, attribute, defaultAttribute, clipRange, offsetX, offsetY, offsetZ, area, drawContext, fillCb, strokeCb);
|
|
18088
18013
|
}
|
|
18089
|
-
_drawSegmentItem(context, cache, fill, fillOpacity, stroke, strokeOpacity, attribute, defaultAttribute, clipRange, offsetX, offsetY, offsetZ, area, drawContext,
|
|
18090
|
-
var _a, _b, _c, _d;
|
|
18014
|
+
_drawSegmentItem(context, cache, fill, fillOpacity, stroke, strokeOpacity, attribute, defaultAttribute, clipRange, offsetX, offsetY, offsetZ, area, drawContext, fillCb, strokeCb) {
|
|
18091
18015
|
if (!(cache && cache.top && cache.bottom && cache.top.curves && cache.top.curves.length && cache.bottom.curves && cache.bottom.curves.length)) return;
|
|
18092
|
-
let {
|
|
18093
|
-
connectedType: connectedType,
|
|
18094
|
-
connectedX: connectedX,
|
|
18095
|
-
connectedY: connectedY,
|
|
18096
|
-
connectedStyle: connectedStyle
|
|
18097
|
-
} = attribute;
|
|
18098
|
-
const da = [];
|
|
18099
|
-
if (connect && (isArray$1(defaultAttribute) ? (connectedType = null !== (_a = null != connectedType ? connectedType : defaultAttribute[0].connectedType) && void 0 !== _a ? _a : defaultAttribute[1].connectedType, connectedX = null !== (_b = null != connectedX ? connectedX : defaultAttribute[0].connectedX) && void 0 !== _b ? _b : defaultAttribute[1].connectedX, connectedY = null !== (_c = null != connectedY ? connectedY : defaultAttribute[0].connectedY) && void 0 !== _c ? _c : defaultAttribute[1].connectedY, connectedStyle = null !== (_d = null != connectedStyle ? connectedStyle : defaultAttribute[0].connectedStyle) && void 0 !== _d ? _d : defaultAttribute[1].connectedStyle) : (connectedType = null != connectedType ? connectedType : defaultAttribute.connectedType, connectedX = null != connectedX ? connectedX : defaultAttribute.connectedX, connectedY = null != connectedY ? connectedY : defaultAttribute.connectedY, connectedStyle = null != connectedStyle ? connectedStyle : defaultAttribute.connectedStyle), "connect" !== connectedType && "zero" !== connectedType && (connectedType = "none"), isArray$1(defaultAttribute) ? defaultAttribute.forEach(i => da.push(i)) : da.push(defaultAttribute), da.push(attribute)), connect && "none" === connectedType) return !1;
|
|
18100
18016
|
context.beginPath();
|
|
18101
18017
|
const {
|
|
18102
18018
|
points: points,
|
|
@@ -18115,11 +18031,7 @@
|
|
|
18115
18031
|
offsetX: offsetX,
|
|
18116
18032
|
offsetY: offsetY,
|
|
18117
18033
|
offsetZ: offsetZ,
|
|
18118
|
-
direction: direction
|
|
18119
|
-
drawConnect: connect,
|
|
18120
|
-
mode: connectedType,
|
|
18121
|
-
zeroX: connectedX,
|
|
18122
|
-
zeroY: connectedY
|
|
18034
|
+
direction: direction
|
|
18123
18035
|
}), this.beforeRenderStep(area, context, offsetX, offsetY, !!fillOpacity, !1, fill, !1, defaultAttribute, drawContext, fillCb, null, {
|
|
18124
18036
|
attribute: attribute
|
|
18125
18037
|
}), context.setShadowBlendStyle && context.setShadowBlendStyle(area, attribute, defaultAttribute);
|
|
@@ -18127,7 +18039,7 @@
|
|
|
18127
18039
|
x: originX = 0,
|
|
18128
18040
|
x: originY = 0
|
|
18129
18041
|
} = attribute;
|
|
18130
|
-
return !1 !== fill && (fillCb ? fillCb(context, attribute, defaultAttribute) : fillOpacity && (context.setCommonStyle(area,
|
|
18042
|
+
return !1 !== fill && (fillCb ? fillCb(context, attribute, defaultAttribute) : fillOpacity && (context.setCommonStyle(area, attribute, originX - offsetX, originY - offsetY, defaultAttribute), context.fill())), this.afterRenderStep(area, context, offsetX, offsetY, !!fillOpacity, !1, fill, !1, defaultAttribute, drawContext, fillCb, null, {
|
|
18131
18043
|
attribute: attribute
|
|
18132
18044
|
}), (() => {
|
|
18133
18045
|
if (!1 !== stroke) if (strokeCb) strokeCb(context, attribute, defaultAttribute);else {
|
|
@@ -18137,12 +18049,8 @@
|
|
|
18137
18049
|
isArray$1(stroke) && (stroke[0] || stroke[2]) && !1 === stroke[1] && (context.beginPath(), drawSegments(context.camera ? context : context.nativeContext, stroke[0] ? cache.top : cache.bottom, clipRange, direction === Direction$1.ROW ? "x" : "y", {
|
|
18138
18050
|
offsetX: offsetX,
|
|
18139
18051
|
offsetY: offsetY,
|
|
18140
|
-
offsetZ: offsetZ
|
|
18141
|
-
|
|
18142
|
-
mode: connectedType,
|
|
18143
|
-
zeroX: connectedX,
|
|
18144
|
-
zeroY: connectedY
|
|
18145
|
-
})), context.setStrokeStyle(area, connect ? connectedStyle : attribute, originX - offsetX, originY - offsetY, connect ? da : defaultAttribute), context.stroke();
|
|
18052
|
+
offsetZ: offsetZ
|
|
18053
|
+
})), context.setStrokeStyle(area, attribute, originX - offsetX, originY - offsetY, defaultAttribute), context.stroke();
|
|
18146
18054
|
}
|
|
18147
18055
|
})(), !1;
|
|
18148
18056
|
}
|
|
@@ -20442,7 +20350,7 @@
|
|
|
20442
20350
|
} = attribute,
|
|
20443
20351
|
b = aabbBounds;
|
|
20444
20352
|
return points.forEach(p => {
|
|
20445
|
-
!1 === p.defined && "
|
|
20353
|
+
!1 === p.defined && "connect" !== connectedType || b.add(p.x, p.y);
|
|
20446
20354
|
}), b;
|
|
20447
20355
|
}
|
|
20448
20356
|
updateLineAABBBoundsBySegments(attribute, lineTheme, aabbBounds, graphic) {
|
|
@@ -20453,7 +20361,7 @@
|
|
|
20453
20361
|
b = aabbBounds;
|
|
20454
20362
|
return segments.forEach(s => {
|
|
20455
20363
|
s.points.forEach(p => {
|
|
20456
|
-
!1 === p.defined && "
|
|
20364
|
+
!1 === p.defined && "connect" !== connectedType || b.add(p.x, p.y);
|
|
20457
20365
|
});
|
|
20458
20366
|
}), b;
|
|
20459
20367
|
}
|
|
@@ -27744,6 +27652,7 @@
|
|
|
27744
27652
|
function makeUpCanvas$4(domref, canvasIdLists, canvasMap, freeCanvasIdx, freeCanvasList, pixelRatio) {
|
|
27745
27653
|
const dpr = null != pixelRatio ? pixelRatio : tt.getSystemInfoSync().pixelRatio;
|
|
27746
27654
|
canvasIdLists.forEach((id, i) => {
|
|
27655
|
+
if (canvasMap.has(id)) return;
|
|
27747
27656
|
const ctx = tt.createCanvasContext(id),
|
|
27748
27657
|
canvas = new CanvasWrapDisableWH(ctx.canvas || {}, ctx, dpr, domref.width, domref.height, id);
|
|
27749
27658
|
ctx.canvas = canvas, canvasMap.set(id, canvas), i >= freeCanvasIdx && freeCanvasList.push(canvas);
|
|
@@ -27878,7 +27787,13 @@
|
|
|
27878
27787
|
measureText(text) {
|
|
27879
27788
|
let method = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : application.global.measureTextMethod;
|
|
27880
27789
|
this.setTransform(1, 0, 0, 1, 0, 0, !0, application.global.devicePixelRatio);
|
|
27881
|
-
return
|
|
27790
|
+
return {
|
|
27791
|
+
width: super.measureText(text, method).width,
|
|
27792
|
+
fontBoundingBoxDescent: void 0,
|
|
27793
|
+
fontBoundingBoxAscent: void 0,
|
|
27794
|
+
actualBoundingBoxAscent: void 0,
|
|
27795
|
+
actualBoundingBoxDescent: void 0
|
|
27796
|
+
};
|
|
27882
27797
|
}
|
|
27883
27798
|
createPattern(image, repetition) {
|
|
27884
27799
|
return null;
|
|
@@ -29072,7 +28987,7 @@
|
|
|
29072
28987
|
const dpr = wx.getSystemInfoSync().pixelRatio;
|
|
29073
28988
|
for (let i = 0; i < canvasIdLists.length; i++) {
|
|
29074
28989
|
const id = canvasIdLists[i];
|
|
29075
|
-
yield new Promise(resolve => {
|
|
28990
|
+
canvasMap.has(id) || (yield new Promise(resolve => {
|
|
29076
28991
|
let data = wx.createSelectorQuery();
|
|
29077
28992
|
component && (data = data.in(component)), data.select(`#${id}`).fields({
|
|
29078
28993
|
node: !0,
|
|
@@ -29084,7 +28999,7 @@
|
|
|
29084
28999
|
height = res[0].height;
|
|
29085
29000
|
canvas.width = width * dpr, canvas.height = height * dpr, canvasMap.set(id, canvas), i >= freeCanvasIdx && freeCanvasList.push(canvas), resolve(null);
|
|
29086
29001
|
});
|
|
29087
|
-
});
|
|
29002
|
+
}));
|
|
29088
29003
|
}
|
|
29089
29004
|
});
|
|
29090
29005
|
}
|
|
@@ -29402,7 +29317,7 @@
|
|
|
29402
29317
|
const dpr = tt.getSystemInfoSync().pixelRatio;
|
|
29403
29318
|
for (let i = 0; i < canvasIdLists.length; i++) {
|
|
29404
29319
|
const id = canvasIdLists[i];
|
|
29405
|
-
yield new Promise(resolve => {
|
|
29320
|
+
canvasMap.has(id) || (yield new Promise(resolve => {
|
|
29406
29321
|
let data = tt.createSelectorQuery();
|
|
29407
29322
|
component && (data = data.in(component)), data.select(`#${id}`).node().exec(res => {
|
|
29408
29323
|
const canvas = res[0].node,
|
|
@@ -29410,7 +29325,7 @@
|
|
|
29410
29325
|
height = canvas.height;
|
|
29411
29326
|
canvas.width = width * dpr, canvas.height = height * dpr, canvasMap.set(id, canvas), i >= freeCanvasIdx && freeCanvasList.push(canvas), resolve(null);
|
|
29412
29327
|
});
|
|
29413
|
-
});
|
|
29328
|
+
}));
|
|
29414
29329
|
}
|
|
29415
29330
|
});
|
|
29416
29331
|
}
|
|
@@ -36064,7 +35979,10 @@
|
|
|
36064
35979
|
customOverlapFunc: customOverlapFunc
|
|
36065
35980
|
} = this.attribute;
|
|
36066
35981
|
let data = this.attribute.data;
|
|
36067
|
-
isFunction$1(dataFilter) && (data = dataFilter(data))
|
|
35982
|
+
if (isFunction$1(dataFilter) && (data = dataFilter(data)), data && data.length) {
|
|
35983
|
+
const seenIds = new Set();
|
|
35984
|
+
data = data.filter(d => !seenIds.has(d.id) && seenIds.add(d.id));
|
|
35985
|
+
}
|
|
36068
35986
|
let labels = this._initText(data);
|
|
36069
35987
|
labels = isFunction$1(customLayoutFunc) ? customLayoutFunc(data, labels, this.getRelatedGraphic.bind(this), this._isCollectionBase ? d => this._idToPoint.get(d.id) : null) : this._layout(labels), isFunction$1(customOverlapFunc) ? labels = customOverlapFunc(labels, this.getRelatedGraphic.bind(this), this._isCollectionBase ? d => this._idToPoint.get(d.id) : null) : !1 !== overlap && (labels = this._overlapping(labels)), isFunction$1(this.attribute.onAfterOverlapping) && this.attribute.onAfterOverlapping(labels, this.getRelatedGraphic.bind(this), this._isCollectionBase ? d => this._idToPoint.get(d.id) : null), labels && labels.length && labels.forEach(label => {
|
|
36070
35988
|
this._bindEvent(label), this._setStatesOfText(label);
|
|
@@ -39673,27 +39591,16 @@
|
|
|
39673
39591
|
}
|
|
39674
39592
|
getPointAttrByPosition(position) {
|
|
39675
39593
|
const {
|
|
39676
|
-
|
|
39677
|
-
|
|
39678
|
-
|
|
39679
|
-
|
|
39680
|
-
|
|
39681
|
-
|
|
39682
|
-
|
|
39683
|
-
|
|
39684
|
-
|
|
39685
|
-
|
|
39686
|
-
y: (y1 + y2) / 2
|
|
39687
|
-
} : position.includes("top") || position.includes("Top") ? {
|
|
39688
|
-
x: (x1 + x2) / 2,
|
|
39689
|
-
y: y1
|
|
39690
|
-
} : position.includes("bottom") || position.includes("Bottom") ? {
|
|
39691
|
-
x: (x1 + x2) / 2,
|
|
39692
|
-
y: y2
|
|
39693
|
-
} : {
|
|
39694
|
-
x: (x1 + x2) / 2,
|
|
39695
|
-
y: (y1 + y2) / 2
|
|
39696
|
-
};
|
|
39594
|
+
x1: x1,
|
|
39595
|
+
x2: x2,
|
|
39596
|
+
y1: y1,
|
|
39597
|
+
y2: y2
|
|
39598
|
+
} = this._area.AABBBounds,
|
|
39599
|
+
result = {
|
|
39600
|
+
x: (x1 + x2) / 2,
|
|
39601
|
+
y: (y1 + y2) / 2
|
|
39602
|
+
};
|
|
39603
|
+
return (position.includes("left") || position.includes("Left")) && (result.x = x1), (position.includes("right") || position.includes("Right")) && (result.x = x2), (position.includes("top") || position.includes("Top")) && (result.y = y1), (position.includes("bottom") || position.includes("Bottom")) && (result.y = y2), result;
|
|
39697
39604
|
}
|
|
39698
39605
|
setLabelPos() {
|
|
39699
39606
|
var _a;
|
|
@@ -55305,8 +55212,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
55305
55212
|
animate(animationParameters, parameters) {
|
|
55306
55213
|
return this.isAnimating = !0, this.animateElement(animationParameters, parameters), 0 === this.runnings.length && this.animationEnd(), this;
|
|
55307
55214
|
}
|
|
55308
|
-
stop() {
|
|
55309
|
-
let stopState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "end";
|
|
55215
|
+
stop(stopState) {
|
|
55310
55216
|
let invokeCallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
55311
55217
|
return this.runnings.forEach(running => running.stop(stopState)), this.animationEnd(invokeCallback), this;
|
|
55312
55218
|
}
|
|
@@ -55501,7 +55407,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
55501
55407
|
var _a;
|
|
55502
55408
|
element.isReserved && element.diffState !== DiffState.exit && (element.isReserved = !1);
|
|
55503
55409
|
const prevElementState = null === (_a = this.elementRecorder.get(element)) || void 0 === _a ? void 0 : _a.prevState;
|
|
55504
|
-
this.configs.some(config => prevElementState !== element.diffState && config.state === prevElementState && config.timeline.controlOptions.stopWhenStateChange) && this.clearElementAnimation(element, !1);
|
|
55410
|
+
(this.configs.some(config => prevElementState !== element.diffState && config.state === prevElementState && config.timeline.controlOptions.stopWhenStateChange) || element.diffState === DiffState.exit) && this.clearElementAnimation(element, !1);
|
|
55505
55411
|
}), this.configs.forEach(config => {
|
|
55506
55412
|
this.animateByTimeline(config, elements, parameters);
|
|
55507
55413
|
}), this.mark.cleanExitElements(), this;
|
|
@@ -55627,7 +55533,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
55627
55533
|
elementCount: animatedElements.length,
|
|
55628
55534
|
elementIndex: 0
|
|
55629
55535
|
};
|
|
55630
|
-
animatedElements.forEach(
|
|
55536
|
+
animatedElements.forEach(element => {
|
|
55537
|
+
var _a;
|
|
55538
|
+
(null !== (_a = this.animators.get(config.state)) && void 0 !== _a ? _a : []).filter(animator => animator.element === element && animator.animationOptions.id === config.id).forEach(animator => {
|
|
55539
|
+
animator.stop(null, !1), this.handleAnimatorEnd(animator, !1);
|
|
55540
|
+
});
|
|
55541
|
+
}), animatedElements.forEach((element, index) => {
|
|
55631
55542
|
animationParameters.elementIndex = index;
|
|
55632
55543
|
const mergedParameters = Object.assign({
|
|
55633
55544
|
[DefaultAnimationParameters]: animationParameters
|
|
@@ -59118,6 +59029,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
59118
59029
|
super.created();
|
|
59119
59030
|
const clip = (_a = this._spec.clip) !== null && _a !== void 0 ? _a : this._getClipDefaultValue();
|
|
59120
59031
|
this._groupMark = this._createGroupMark('regionGroup', this.userId, this.layoutZIndex);
|
|
59032
|
+
if (this._spec.roam) {
|
|
59033
|
+
this._groupMark.setMarkConfig({ interactive: true });
|
|
59034
|
+
}
|
|
59121
59035
|
this._interactionMark = this._createGroupMark('regionInteractionGroup', ((_b = this.userId) !== null && _b !== void 0 ? _b : this.type) + '_interaction', LayoutZIndex.Interaction);
|
|
59122
59036
|
if (!isEmpty(this._spec.style)) {
|
|
59123
59037
|
this._backgroundMark = this._createMark({ type: "rect", name: 'regionBackground' });
|
|
@@ -62584,7 +62498,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
62584
62498
|
};
|
|
62585
62499
|
registerVChartCore();
|
|
62586
62500
|
|
|
62587
|
-
const version = "1.13.
|
|
62501
|
+
const version = "1.13.4";
|
|
62588
62502
|
|
|
62589
62503
|
const addVChartProperty = (data, op) => {
|
|
62590
62504
|
const context = op.beforeCall();
|
|
@@ -67771,16 +67685,18 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
67771
67685
|
}, 0);
|
|
67772
67686
|
const res = [];
|
|
67773
67687
|
let acc = 0;
|
|
67688
|
+
let resIndex = 0;
|
|
67774
67689
|
bins.forEach((bin, i) => {
|
|
67775
67690
|
if (totalLength === 0) {
|
|
67776
67691
|
res.push([0, i / bins.length - 1]);
|
|
67777
67692
|
}
|
|
67778
67693
|
else {
|
|
67779
67694
|
const length = scopeType === 'count' ? bin.count : bin.max - bin.min;
|
|
67780
|
-
const b0 = res[
|
|
67695
|
+
const b0 = res[resIndex - 1] ? res[resIndex - 1][1] : 0;
|
|
67781
67696
|
const b1 = i === bins.length - 1 ? 1 : Math.min((acc + length) / totalLength, 1);
|
|
67782
67697
|
if (b0 === b1 && (b0 === 0 || b0 === 1)) ;
|
|
67783
67698
|
else {
|
|
67699
|
+
resIndex += 1;
|
|
67784
67700
|
res.push([b0, b1]);
|
|
67785
67701
|
acc += length;
|
|
67786
67702
|
}
|
|
@@ -72713,7 +72629,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
72713
72629
|
return {
|
|
72714
72630
|
start: 'pointerdown',
|
|
72715
72631
|
move: 'pointermove',
|
|
72716
|
-
end: 'pointerup',
|
|
72632
|
+
end: ['pointerup', 'pointerupoutside'],
|
|
72717
72633
|
zoom: 'wheel',
|
|
72718
72634
|
zoomEnd: 'pointerup',
|
|
72719
72635
|
scroll: 'wheel',
|
|
@@ -72724,7 +72640,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
72724
72640
|
return {
|
|
72725
72641
|
start: 'pointerdown',
|
|
72726
72642
|
move: 'pointermove',
|
|
72727
|
-
end: 'pointerup',
|
|
72643
|
+
end: ['pointerup', 'pointerupoutside'],
|
|
72728
72644
|
zoom: 'pinch',
|
|
72729
72645
|
zoomEnd: 'pinchend',
|
|
72730
72646
|
scroll: 'pan',
|
|
@@ -72995,15 +72911,17 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
72995
72911
|
});
|
|
72996
72912
|
this._zoomableTrigger.pointerId = null;
|
|
72997
72913
|
this._eventObj.off(move, { level: Event_Bubble_Level.chart, source: Event_Source_Type.chart }, mousemove);
|
|
72998
|
-
|
|
72999
|
-
|
|
72914
|
+
end.forEach(endEventType => {
|
|
72915
|
+
this._eventObj.off(endEventType, { level: Event_Bubble_Level.chart, source: Event_Source_Type.chart }, mouseup);
|
|
72916
|
+
this._eventObj.allow(endEventType);
|
|
72917
|
+
});
|
|
73000
72918
|
}, delayTime);
|
|
73001
72919
|
const mousemove = delayMap[delayType]((params) => {
|
|
73002
72920
|
if (!this._zoomableTrigger.parserDragEvent(params.event)) {
|
|
73003
72921
|
return;
|
|
73004
72922
|
}
|
|
73005
72923
|
this._clickEnable = false;
|
|
73006
|
-
this._eventObj.prevent(
|
|
72924
|
+
end.forEach(endEventType => this._eventObj.prevent(endEventType, mouseup));
|
|
73007
72925
|
const event = params.event;
|
|
73008
72926
|
const dx = event.canvasX - moveX;
|
|
73009
72927
|
const dy = event.canvasY - moveY;
|
|
@@ -73019,7 +72937,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
73019
72937
|
});
|
|
73020
72938
|
}, delayTime);
|
|
73021
72939
|
this._eventObj.on(move, { level: Event_Bubble_Level.chart, source: Event_Source_Type.chart }, mousemove);
|
|
73022
|
-
|
|
72940
|
+
end.forEach(endEventType => {
|
|
72941
|
+
this._eventObj.on(endEventType, { level: Event_Bubble_Level.chart, source: Event_Source_Type.chart }, mouseup);
|
|
72942
|
+
});
|
|
73023
72943
|
}
|
|
73024
72944
|
}
|
|
73025
72945
|
|
|
@@ -79346,8 +79266,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
79346
79266
|
};
|
|
79347
79267
|
}
|
|
79348
79268
|
_wordCloudTransformOption() {
|
|
79349
|
-
var _a;
|
|
79350
|
-
|
|
79269
|
+
var _a, _b;
|
|
79270
|
+
const wordCloudConfig = (_a = this._wordCloudConfig) !== null && _a !== void 0 ? _a : {};
|
|
79271
|
+
return Object.assign(Object.assign(Object.assign({}, wordCloudConfig), this._getCommonTransformOptions()), { layoutType: this._wordCloudConfig.layoutMode, rotate: this._rotateAngles, randomVisible: (_b = this._spec.random) !== null && _b !== void 0 ? _b : DEFAULT_RANDOM, clip: this._wordCloudConfig.drawOutOfBound === 'clip', shrink: this._wordCloudConfig.zoomToFit.shrink, enlarge: this._wordCloudConfig.zoomToFit.enlarge, minFontSize: this._wordCloudConfig.zoomToFit.fontSizeLimitMin, progressiveTime: this._wordCloudConfig.progressiveTime, progressiveStep: this._wordCloudConfig.progressiveStep, repeatFill: this._wordCloudConfig.zoomToFit.repeat });
|
|
79351
79272
|
}
|
|
79352
79273
|
_wordCloudShapeTransformOption() {
|
|
79353
79274
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -79727,6 +79648,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
79727
79648
|
this.insertZerosToArray(board, 0, heightArr.length + diffWidth / 2), this._size = [w + (diffWidth << 5), h + diffHeight], bounds && (bounds[0].x += (diffWidth << 5) / 2, bounds[0].y += diffHeight / 2, bounds[1].x += (diffWidth << 5) / 2, bounds[1].y += diffHeight / 2);
|
|
79728
79649
|
}
|
|
79729
79650
|
insertZerosToArray(array, index, length) {
|
|
79651
|
+
if (this.options.customInsertZerosToArray) return this.options.customInsertZerosToArray(array, index, length);
|
|
79730
79652
|
const len = Math.floor(length / 6e4),
|
|
79731
79653
|
restLen = length % 6e4;
|
|
79732
79654
|
for (let i = 0; i < len; i++) array.splice(index + 6e4 * i, 0, ...new Array(6e4).fill(0));
|
|
@@ -92549,7 +92471,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
92549
92471
|
}
|
|
92550
92472
|
};
|
|
92551
92473
|
this._getMouseOutHandler = (needPointerDetection) => (params) => {
|
|
92552
|
-
var _a, _b, _c, _d;
|
|
92474
|
+
var _a, _b, _c, _d, _e;
|
|
92553
92475
|
if (this._isReleased) {
|
|
92554
92476
|
return;
|
|
92555
92477
|
}
|
|
@@ -92567,14 +92489,14 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
92567
92489
|
if (this._enterable) {
|
|
92568
92490
|
this._outTimer = setTimeout(() => {
|
|
92569
92491
|
this._handleChartMouseOut(params);
|
|
92570
|
-
}, (_d = this._spec.showDelay) !== null &&
|
|
92492
|
+
}, (_e = (_d = this._spec) === null || _d === void 0 ? void 0 : _d.showDelay) !== null && _e !== void 0 ? _e : DEFAULT_SHOW_DELAY);
|
|
92571
92493
|
}
|
|
92572
92494
|
else {
|
|
92573
92495
|
this._handleChartMouseOut(params);
|
|
92574
92496
|
}
|
|
92575
92497
|
};
|
|
92576
92498
|
this._handleChartMouseOut = (params) => {
|
|
92577
|
-
if (this._alwaysShow) {
|
|
92499
|
+
if (this._alwaysShow || this._isReleased) {
|
|
92578
92500
|
return;
|
|
92579
92501
|
}
|
|
92580
92502
|
if (this._spec.triggerOff !== 'none') {
|
|
@@ -92589,7 +92511,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
92589
92511
|
}
|
|
92590
92512
|
};
|
|
92591
92513
|
this._getMouseMoveHandler = (isClick) => (params) => {
|
|
92592
|
-
var _a, _b, _c;
|
|
92514
|
+
var _a, _b, _c, _d;
|
|
92593
92515
|
if (this._isReleased) {
|
|
92594
92516
|
return;
|
|
92595
92517
|
}
|
|
@@ -92619,13 +92541,16 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
92619
92541
|
}
|
|
92620
92542
|
this._showTimer = setTimeout(() => {
|
|
92621
92543
|
this._handleChartMouseMove(params, isClick);
|
|
92622
|
-
}, (_c = this._spec.showDelay) !== null &&
|
|
92544
|
+
}, (_d = (_c = this._spec) === null || _c === void 0 ? void 0 : _c.showDelay) !== null && _d !== void 0 ? _d : DEFAULT_SHOW_DELAY);
|
|
92623
92545
|
}
|
|
92624
92546
|
else {
|
|
92625
92547
|
this._handleChartMouseMove(params, isClick);
|
|
92626
92548
|
}
|
|
92627
92549
|
};
|
|
92628
92550
|
this._handleChartMouseMove = (params, isClick) => {
|
|
92551
|
+
if (this._isReleased) {
|
|
92552
|
+
return;
|
|
92553
|
+
}
|
|
92629
92554
|
const mouseEventData = this._getMouseEventData(params);
|
|
92630
92555
|
const { tooltipInfo: { dimension: dimensionInfo }, ignore: { mark: ignoreMark } } = mouseEventData;
|
|
92631
92556
|
const success = {
|
|
@@ -92728,6 +92653,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
92728
92653
|
return 1;
|
|
92729
92654
|
};
|
|
92730
92655
|
this.hideTooltip = () => {
|
|
92656
|
+
if (this._isReleased) {
|
|
92657
|
+
return false;
|
|
92658
|
+
}
|
|
92731
92659
|
const params = {
|
|
92732
92660
|
changePositionOnly: false,
|
|
92733
92661
|
tooltip: this,
|
|
@@ -92840,7 +92768,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
92840
92768
|
}
|
|
92841
92769
|
});
|
|
92842
92770
|
element.addEventListener('pointerleave', () => {
|
|
92843
|
-
var _a, _b;
|
|
92771
|
+
var _a, _b, _c;
|
|
92844
92772
|
if (!this._enterable) {
|
|
92845
92773
|
return;
|
|
92846
92774
|
}
|
|
@@ -92849,7 +92777,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
92849
92777
|
if (newRect &&
|
|
92850
92778
|
Object.keys(this._cacheEnterableRect).every(k => this._cacheEnterableRect[k] === newRect[k])) {
|
|
92851
92779
|
this._cacheEnterableRect = null;
|
|
92852
|
-
this._outTimer = setTimeout(this.hideTooltip, (_b = this._spec.showDelay) !== null &&
|
|
92780
|
+
this._outTimer = setTimeout(this.hideTooltip, (_c = (_b = this._spec) === null || _b === void 0 ? void 0 : _b.showDelay) !== null && _c !== void 0 ? _c : DEFAULT_SHOW_DELAY);
|
|
92853
92781
|
}
|
|
92854
92782
|
}
|
|
92855
92783
|
});
|
|
@@ -101074,8 +101002,14 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
101074
101002
|
this._isReleased = true;
|
|
101075
101003
|
}
|
|
101076
101004
|
_getDefaultOption() {
|
|
101005
|
+
var _a, _b;
|
|
101077
101006
|
const { offset } = this._component.getSpec();
|
|
101078
|
-
return offset
|
|
101007
|
+
return offset
|
|
101008
|
+
? {
|
|
101009
|
+
offsetX: (_a = offset.x) !== null && _a !== void 0 ? _a : DEFAULT_OPTIONS.offsetX,
|
|
101010
|
+
offsetY: (_b = offset.y) !== null && _b !== void 0 ? _b : DEFAULT_OPTIONS.offsetY
|
|
101011
|
+
}
|
|
101012
|
+
: DEFAULT_OPTIONS;
|
|
101079
101013
|
}
|
|
101080
101014
|
_getParentElement(spec) {
|
|
101081
101015
|
return spec.parentElement;
|
|
@@ -101104,9 +101038,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
101104
101038
|
}
|
|
101105
101039
|
return defaultStr !== null && defaultStr !== void 0 ? defaultStr : 'initial';
|
|
101106
101040
|
};
|
|
101107
|
-
const getTextStyle = (style = {}) => {
|
|
101041
|
+
const getTextStyle = (style = {}, textStyle = {}) => {
|
|
101108
101042
|
var _a, _b;
|
|
101109
|
-
const textStyle = {};
|
|
101110
101043
|
if (isValid$1(style.fontFamily)) {
|
|
101111
101044
|
textStyle.fontFamily = style.fontFamily;
|
|
101112
101045
|
}
|
|
@@ -101136,8 +101069,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
101136
101069
|
}
|
|
101137
101070
|
return textStyle;
|
|
101138
101071
|
};
|
|
101072
|
+
const getLineHeight = (style = {}) => {
|
|
101073
|
+
const { lineHeight } = style;
|
|
101074
|
+
if (style.fontSize) {
|
|
101075
|
+
return calcLayoutNumber(lineHeight, style.fontSize);
|
|
101076
|
+
}
|
|
101077
|
+
return 0;
|
|
101078
|
+
};
|
|
101139
101079
|
const getDomStyle = (spec = {}) => {
|
|
101140
|
-
var _a, _b, _c, _d
|
|
101080
|
+
var _a, _b, _c, _d;
|
|
101141
101081
|
const { style = {}, enterable, transitionDuration } = spec;
|
|
101142
101082
|
const { panel = {}, titleLabel, shape, keyLabel, valueLabel, spaceRow: commonSpaceRow, align } = style;
|
|
101143
101083
|
const { panelStyle, panelPadding } = getPanelStyle(panel);
|
|
@@ -101175,10 +101115,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
101175
101115
|
shapeStyle[marginKey] = getPixelPropertyStr((_b = shape.spacing) !== null && _b !== void 0 ? _b : DEFAULT_SHAPE_SPACING);
|
|
101176
101116
|
keyStyle[marginKey] = getPixelPropertyStr((_c = keyLabel.spacing) !== null && _c !== void 0 ? _c : DEFAULT_KEY_SPACING);
|
|
101177
101117
|
valueStyle[marginKey] = getPixelPropertyStr((_d = valueLabel.spacing) !== null && _d !== void 0 ? _d : DEFAULT_VALUE_SPACING);
|
|
101178
|
-
const lineHeight = (
|
|
101179
|
-
|
|
101180
|
-
rowStyle.lineHeight = /^[0-9]*$/.test(`${lineHeight}`) ? `${lineHeight}px` : `${lineHeight}`;
|
|
101181
|
-
}
|
|
101118
|
+
const lineHeight = Math.max(getLineHeight(valueLabel), getLineHeight(keyLabel));
|
|
101119
|
+
rowStyle.lineHeight = lineHeight > 0 ? `${lineHeight}px` : '20px';
|
|
101182
101120
|
return {
|
|
101183
101121
|
panelPadding,
|
|
101184
101122
|
row: rowStyle,
|
|
@@ -101470,19 +101408,22 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
101470
101408
|
row.classList.add(`${TOOLTIP_PREFIX}-${colName}`);
|
|
101471
101409
|
colDiv.appendChild(row);
|
|
101472
101410
|
}
|
|
101473
|
-
|
|
101411
|
+
const styleByRow = Object.assign({}, rowStyle);
|
|
101412
|
+
if (index === content.length - 1) {
|
|
101413
|
+
styleByRow.marginBottom = '0px';
|
|
101414
|
+
}
|
|
101474
101415
|
styleByRow.display = entry.visible === false ? 'none' : 'block';
|
|
101475
101416
|
styleByRow.height = 'initial';
|
|
101476
101417
|
if (colName === 'key') {
|
|
101477
101418
|
row.innerHTML = formatContent(entry.key);
|
|
101478
101419
|
if (entry.keyStyle) {
|
|
101479
|
-
|
|
101420
|
+
getTextStyle(entry.keyStyle, styleByRow);
|
|
101480
101421
|
}
|
|
101481
101422
|
}
|
|
101482
101423
|
else if (colName === 'value') {
|
|
101483
101424
|
row.innerHTML = formatContent(entry.value);
|
|
101484
101425
|
if (entry.valueStyle) {
|
|
101485
|
-
|
|
101426
|
+
getTextStyle(entry.valueStyle, styleByRow);
|
|
101486
101427
|
}
|
|
101487
101428
|
}
|
|
101488
101429
|
else if (colName === 'shape') {
|