@visactor/vchart 1.13.4-alpha.0 → 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 +119 -186
- package/build/index.js +119 -186
- 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/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/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/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/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;
|
|
@@ -59122,6 +59029,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
59122
59029
|
super.created();
|
|
59123
59030
|
const clip = (_a = this._spec.clip) !== null && _a !== void 0 ? _a : this._getClipDefaultValue();
|
|
59124
59031
|
this._groupMark = this._createGroupMark('regionGroup', this.userId, this.layoutZIndex);
|
|
59032
|
+
if (this._spec.roam) {
|
|
59033
|
+
this._groupMark.setMarkConfig({ interactive: true });
|
|
59034
|
+
}
|
|
59125
59035
|
this._interactionMark = this._createGroupMark('regionInteractionGroup', ((_b = this.userId) !== null && _b !== void 0 ? _b : this.type) + '_interaction', LayoutZIndex.Interaction);
|
|
59126
59036
|
if (!isEmpty(this._spec.style)) {
|
|
59127
59037
|
this._backgroundMark = this._createMark({ type: "rect", name: 'regionBackground' });
|
|
@@ -62588,7 +62498,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
62588
62498
|
};
|
|
62589
62499
|
registerVChartCore();
|
|
62590
62500
|
|
|
62591
|
-
const version = "1.13.4
|
|
62501
|
+
const version = "1.13.4";
|
|
62592
62502
|
|
|
62593
62503
|
const addVChartProperty = (data, op) => {
|
|
62594
62504
|
const context = op.beforeCall();
|
|
@@ -72719,7 +72629,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
72719
72629
|
return {
|
|
72720
72630
|
start: 'pointerdown',
|
|
72721
72631
|
move: 'pointermove',
|
|
72722
|
-
end: 'pointerup',
|
|
72632
|
+
end: ['pointerup', 'pointerupoutside'],
|
|
72723
72633
|
zoom: 'wheel',
|
|
72724
72634
|
zoomEnd: 'pointerup',
|
|
72725
72635
|
scroll: 'wheel',
|
|
@@ -72730,7 +72640,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
72730
72640
|
return {
|
|
72731
72641
|
start: 'pointerdown',
|
|
72732
72642
|
move: 'pointermove',
|
|
72733
|
-
end: 'pointerup',
|
|
72643
|
+
end: ['pointerup', 'pointerupoutside'],
|
|
72734
72644
|
zoom: 'pinch',
|
|
72735
72645
|
zoomEnd: 'pinchend',
|
|
72736
72646
|
scroll: 'pan',
|
|
@@ -73001,15 +72911,17 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
73001
72911
|
});
|
|
73002
72912
|
this._zoomableTrigger.pointerId = null;
|
|
73003
72913
|
this._eventObj.off(move, { level: Event_Bubble_Level.chart, source: Event_Source_Type.chart }, mousemove);
|
|
73004
|
-
|
|
73005
|
-
|
|
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
|
+
});
|
|
73006
72918
|
}, delayTime);
|
|
73007
72919
|
const mousemove = delayMap[delayType]((params) => {
|
|
73008
72920
|
if (!this._zoomableTrigger.parserDragEvent(params.event)) {
|
|
73009
72921
|
return;
|
|
73010
72922
|
}
|
|
73011
72923
|
this._clickEnable = false;
|
|
73012
|
-
this._eventObj.prevent(
|
|
72924
|
+
end.forEach(endEventType => this._eventObj.prevent(endEventType, mouseup));
|
|
73013
72925
|
const event = params.event;
|
|
73014
72926
|
const dx = event.canvasX - moveX;
|
|
73015
72927
|
const dy = event.canvasY - moveY;
|
|
@@ -73025,7 +72937,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
73025
72937
|
});
|
|
73026
72938
|
}, delayTime);
|
|
73027
72939
|
this._eventObj.on(move, { level: Event_Bubble_Level.chart, source: Event_Source_Type.chart }, mousemove);
|
|
73028
|
-
|
|
72940
|
+
end.forEach(endEventType => {
|
|
72941
|
+
this._eventObj.on(endEventType, { level: Event_Bubble_Level.chart, source: Event_Source_Type.chart }, mouseup);
|
|
72942
|
+
});
|
|
73029
72943
|
}
|
|
73030
72944
|
}
|
|
73031
72945
|
|
|
@@ -92557,7 +92471,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
92557
92471
|
}
|
|
92558
92472
|
};
|
|
92559
92473
|
this._getMouseOutHandler = (needPointerDetection) => (params) => {
|
|
92560
|
-
var _a, _b, _c, _d;
|
|
92474
|
+
var _a, _b, _c, _d, _e;
|
|
92561
92475
|
if (this._isReleased) {
|
|
92562
92476
|
return;
|
|
92563
92477
|
}
|
|
@@ -92575,14 +92489,14 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
92575
92489
|
if (this._enterable) {
|
|
92576
92490
|
this._outTimer = setTimeout(() => {
|
|
92577
92491
|
this._handleChartMouseOut(params);
|
|
92578
|
-
}, (_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);
|
|
92579
92493
|
}
|
|
92580
92494
|
else {
|
|
92581
92495
|
this._handleChartMouseOut(params);
|
|
92582
92496
|
}
|
|
92583
92497
|
};
|
|
92584
92498
|
this._handleChartMouseOut = (params) => {
|
|
92585
|
-
if (this._alwaysShow) {
|
|
92499
|
+
if (this._alwaysShow || this._isReleased) {
|
|
92586
92500
|
return;
|
|
92587
92501
|
}
|
|
92588
92502
|
if (this._spec.triggerOff !== 'none') {
|
|
@@ -92597,7 +92511,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
92597
92511
|
}
|
|
92598
92512
|
};
|
|
92599
92513
|
this._getMouseMoveHandler = (isClick) => (params) => {
|
|
92600
|
-
var _a, _b, _c;
|
|
92514
|
+
var _a, _b, _c, _d;
|
|
92601
92515
|
if (this._isReleased) {
|
|
92602
92516
|
return;
|
|
92603
92517
|
}
|
|
@@ -92627,13 +92541,16 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
92627
92541
|
}
|
|
92628
92542
|
this._showTimer = setTimeout(() => {
|
|
92629
92543
|
this._handleChartMouseMove(params, isClick);
|
|
92630
|
-
}, (_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);
|
|
92631
92545
|
}
|
|
92632
92546
|
else {
|
|
92633
92547
|
this._handleChartMouseMove(params, isClick);
|
|
92634
92548
|
}
|
|
92635
92549
|
};
|
|
92636
92550
|
this._handleChartMouseMove = (params, isClick) => {
|
|
92551
|
+
if (this._isReleased) {
|
|
92552
|
+
return;
|
|
92553
|
+
}
|
|
92637
92554
|
const mouseEventData = this._getMouseEventData(params);
|
|
92638
92555
|
const { tooltipInfo: { dimension: dimensionInfo }, ignore: { mark: ignoreMark } } = mouseEventData;
|
|
92639
92556
|
const success = {
|
|
@@ -92736,6 +92653,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
92736
92653
|
return 1;
|
|
92737
92654
|
};
|
|
92738
92655
|
this.hideTooltip = () => {
|
|
92656
|
+
if (this._isReleased) {
|
|
92657
|
+
return false;
|
|
92658
|
+
}
|
|
92739
92659
|
const params = {
|
|
92740
92660
|
changePositionOnly: false,
|
|
92741
92661
|
tooltip: this,
|
|
@@ -92848,7 +92768,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
92848
92768
|
}
|
|
92849
92769
|
});
|
|
92850
92770
|
element.addEventListener('pointerleave', () => {
|
|
92851
|
-
var _a, _b;
|
|
92771
|
+
var _a, _b, _c;
|
|
92852
92772
|
if (!this._enterable) {
|
|
92853
92773
|
return;
|
|
92854
92774
|
}
|
|
@@ -92857,7 +92777,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
92857
92777
|
if (newRect &&
|
|
92858
92778
|
Object.keys(this._cacheEnterableRect).every(k => this._cacheEnterableRect[k] === newRect[k])) {
|
|
92859
92779
|
this._cacheEnterableRect = null;
|
|
92860
|
-
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);
|
|
92861
92781
|
}
|
|
92862
92782
|
}
|
|
92863
92783
|
});
|
|
@@ -101082,8 +101002,14 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
101082
101002
|
this._isReleased = true;
|
|
101083
101003
|
}
|
|
101084
101004
|
_getDefaultOption() {
|
|
101005
|
+
var _a, _b;
|
|
101085
101006
|
const { offset } = this._component.getSpec();
|
|
101086
|
-
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;
|
|
101087
101013
|
}
|
|
101088
101014
|
_getParentElement(spec) {
|
|
101089
101015
|
return spec.parentElement;
|
|
@@ -101112,9 +101038,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
101112
101038
|
}
|
|
101113
101039
|
return defaultStr !== null && defaultStr !== void 0 ? defaultStr : 'initial';
|
|
101114
101040
|
};
|
|
101115
|
-
const getTextStyle = (style = {}) => {
|
|
101041
|
+
const getTextStyle = (style = {}, textStyle = {}) => {
|
|
101116
101042
|
var _a, _b;
|
|
101117
|
-
const textStyle = {};
|
|
101118
101043
|
if (isValid$1(style.fontFamily)) {
|
|
101119
101044
|
textStyle.fontFamily = style.fontFamily;
|
|
101120
101045
|
}
|
|
@@ -101144,8 +101069,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
101144
101069
|
}
|
|
101145
101070
|
return textStyle;
|
|
101146
101071
|
};
|
|
101072
|
+
const getLineHeight = (style = {}) => {
|
|
101073
|
+
const { lineHeight } = style;
|
|
101074
|
+
if (style.fontSize) {
|
|
101075
|
+
return calcLayoutNumber(lineHeight, style.fontSize);
|
|
101076
|
+
}
|
|
101077
|
+
return 0;
|
|
101078
|
+
};
|
|
101147
101079
|
const getDomStyle = (spec = {}) => {
|
|
101148
|
-
var _a, _b, _c, _d
|
|
101080
|
+
var _a, _b, _c, _d;
|
|
101149
101081
|
const { style = {}, enterable, transitionDuration } = spec;
|
|
101150
101082
|
const { panel = {}, titleLabel, shape, keyLabel, valueLabel, spaceRow: commonSpaceRow, align } = style;
|
|
101151
101083
|
const { panelStyle, panelPadding } = getPanelStyle(panel);
|
|
@@ -101183,10 +101115,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
101183
101115
|
shapeStyle[marginKey] = getPixelPropertyStr((_b = shape.spacing) !== null && _b !== void 0 ? _b : DEFAULT_SHAPE_SPACING);
|
|
101184
101116
|
keyStyle[marginKey] = getPixelPropertyStr((_c = keyLabel.spacing) !== null && _c !== void 0 ? _c : DEFAULT_KEY_SPACING);
|
|
101185
101117
|
valueStyle[marginKey] = getPixelPropertyStr((_d = valueLabel.spacing) !== null && _d !== void 0 ? _d : DEFAULT_VALUE_SPACING);
|
|
101186
|
-
const lineHeight = (
|
|
101187
|
-
|
|
101188
|
-
rowStyle.lineHeight = /^[0-9]*$/.test(`${lineHeight}`) ? `${lineHeight}px` : `${lineHeight}`;
|
|
101189
|
-
}
|
|
101118
|
+
const lineHeight = Math.max(getLineHeight(valueLabel), getLineHeight(keyLabel));
|
|
101119
|
+
rowStyle.lineHeight = lineHeight > 0 ? `${lineHeight}px` : '20px';
|
|
101190
101120
|
return {
|
|
101191
101121
|
panelPadding,
|
|
101192
101122
|
row: rowStyle,
|
|
@@ -101478,19 +101408,22 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
101478
101408
|
row.classList.add(`${TOOLTIP_PREFIX}-${colName}`);
|
|
101479
101409
|
colDiv.appendChild(row);
|
|
101480
101410
|
}
|
|
101481
|
-
|
|
101411
|
+
const styleByRow = Object.assign({}, rowStyle);
|
|
101412
|
+
if (index === content.length - 1) {
|
|
101413
|
+
styleByRow.marginBottom = '0px';
|
|
101414
|
+
}
|
|
101482
101415
|
styleByRow.display = entry.visible === false ? 'none' : 'block';
|
|
101483
101416
|
styleByRow.height = 'initial';
|
|
101484
101417
|
if (colName === 'key') {
|
|
101485
101418
|
row.innerHTML = formatContent(entry.key);
|
|
101486
101419
|
if (entry.keyStyle) {
|
|
101487
|
-
|
|
101420
|
+
getTextStyle(entry.keyStyle, styleByRow);
|
|
101488
101421
|
}
|
|
101489
101422
|
}
|
|
101490
101423
|
else if (colName === 'value') {
|
|
101491
101424
|
row.innerHTML = formatContent(entry.value);
|
|
101492
101425
|
if (entry.valueStyle) {
|
|
101493
|
-
|
|
101426
|
+
getTextStyle(entry.valueStyle, styleByRow);
|
|
101494
101427
|
}
|
|
101495
101428
|
}
|
|
101496
101429
|
else if (colName === 'shape') {
|