@visactor/vchart 1.12.19-alpha.0 → 1.12.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/es5/index.js +1 -1
- package/build/index.js +60 -155
- package/build/index.min.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/compile/compilable-base.js +1 -2
- package/cjs/compile/util.js +2 -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/series/mixin/line-mixin.d.ts +1 -1
- package/cjs/series/mixin/line-mixin.js +3 -9
- package/cjs/series/mixin/line-mixin.js.map +1 -1
- package/esm/compile/compilable-base.js +1 -2
- package/esm/compile/util.js +2 -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/series/mixin/line-mixin.d.ts +1 -1
- package/esm/series/mixin/line-mixin.js +3 -9
- package/esm/series/mixin/line-mixin.js.map +1 -1
- package/package.json +16 -16
package/build/index.js
CHANGED
|
@@ -8577,7 +8577,7 @@
|
|
|
8577
8577
|
default:
|
|
8578
8578
|
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 {
|
|
8579
8579
|
const x1 = this._x * (1 - this._t) + x * this._t;
|
|
8580
|
-
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);
|
|
8580
|
+
.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);
|
|
8581
8581
|
}
|
|
8582
8582
|
}
|
|
8583
8583
|
this._lastDefined = p.defined, this._x = x, this._y = y, this.lastPoint = p;
|
|
@@ -17343,7 +17343,7 @@
|
|
|
17343
17343
|
this._draw(line, lineAttribute, !1, drawContext, params);
|
|
17344
17344
|
}
|
|
17345
17345
|
drawSegmentItem(context, cache, fill, stroke, fillOpacity, strokeOpacity, attribute, defaultAttribute, clipRange, clipRangeByDimension, offsetX, offsetY, line, fillCb, strokeCb) {
|
|
17346
|
-
var _a
|
|
17346
|
+
var _a;
|
|
17347
17347
|
if (!cache) return;
|
|
17348
17348
|
context.beginPath();
|
|
17349
17349
|
const z = null !== (_a = this.z) && void 0 !== _a ? _a : 0;
|
|
@@ -17356,27 +17356,7 @@
|
|
|
17356
17356
|
x: originX = 0,
|
|
17357
17357
|
x: originY = 0
|
|
17358
17358
|
} = attribute;
|
|
17359
|
-
!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()));
|
|
17360
|
-
let {
|
|
17361
|
-
connectedType: connectedType,
|
|
17362
|
-
connectedX: connectedX,
|
|
17363
|
-
connectedY: connectedY,
|
|
17364
|
-
connectedStyle: connectedStyle
|
|
17365
|
-
} = attribute;
|
|
17366
|
-
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) {
|
|
17367
|
-
context.beginPath(), drawSegments(context.camera ? context : context.nativeContext, cache, clipRange, clipRangeByDimension, {
|
|
17368
|
-
offsetX: offsetX,
|
|
17369
|
-
offsetY: offsetY,
|
|
17370
|
-
offsetZ: z,
|
|
17371
|
-
drawConnect: !0,
|
|
17372
|
-
mode: connectedType,
|
|
17373
|
-
zeroX: connectedX,
|
|
17374
|
-
zeroY: connectedY
|
|
17375
|
-
});
|
|
17376
|
-
const da = [];
|
|
17377
|
-
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()));
|
|
17378
|
-
}
|
|
17379
|
-
return !1;
|
|
17359
|
+
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;
|
|
17380
17360
|
}
|
|
17381
17361
|
drawLinearLineHighPerformance(line, context, fill, stroke, fillOpacity, strokeOpacity, offsetX, offsetY, lineAttribute, drawContext, params, fillCb, strokeCb) {
|
|
17382
17362
|
var _a;
|
|
@@ -17408,7 +17388,8 @@
|
|
|
17408
17388
|
segments: segments,
|
|
17409
17389
|
points: points,
|
|
17410
17390
|
closePath: closePath,
|
|
17411
|
-
curveTension = lineAttribute.curveTension
|
|
17391
|
+
curveTension = lineAttribute.curveTension,
|
|
17392
|
+
connectedType = lineAttribute.connectedType
|
|
17412
17393
|
} = line.attribute;
|
|
17413
17394
|
if (!this.valid(line, lineAttribute, fillCb, strokeCb)) return;
|
|
17414
17395
|
let {
|
|
@@ -17420,6 +17401,9 @@
|
|
|
17420
17401
|
clipRangeByDimension = lineAttribute.clipRangeByDimension
|
|
17421
17402
|
} = line.attribute;
|
|
17422
17403
|
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);
|
|
17404
|
+
function parsePoint(points, connectedType) {
|
|
17405
|
+
return "none" === connectedType ? points : points.filter(p => !1 !== p.defined);
|
|
17406
|
+
}
|
|
17423
17407
|
if (line.shouldUpdateShape()) {
|
|
17424
17408
|
const {
|
|
17425
17409
|
points: points,
|
|
@@ -17441,7 +17425,7 @@
|
|
|
17441
17425
|
y: lastSeg.endY,
|
|
17442
17426
|
defined: lastSeg.curves[lastSeg.curves.length - 1].defined
|
|
17443
17427
|
} : index > 1 && (startPoint.x = lastSeg.endX, startPoint.y = lastSeg.endY, startPoint.defined = lastSeg.curves[lastSeg.curves.length - 1].defined);
|
|
17444
|
-
const data = calcLineCache(seg.points, curveType, {
|
|
17428
|
+
const data = calcLineCache(parsePoint(seg.points, connectedType), curveType, {
|
|
17445
17429
|
startPoint: startPoint,
|
|
17446
17430
|
curveTension: curveTension
|
|
17447
17431
|
});
|
|
@@ -17460,7 +17444,7 @@
|
|
|
17460
17444
|
}
|
|
17461
17445
|
} else {
|
|
17462
17446
|
if (!points || !points.length) return line.cache = null, void line.clearUpdateShapeTag();
|
|
17463
|
-
line.cache = calcLineCache(_points, curveType, {
|
|
17447
|
+
line.cache = calcLineCache(parsePoint(_points, connectedType), curveType, {
|
|
17464
17448
|
curveTension: curveTension
|
|
17465
17449
|
});
|
|
17466
17450
|
}
|
|
@@ -17492,11 +17476,6 @@
|
|
|
17492
17476
|
|
|
17493
17477
|
function drawAreaSegments(path, segPath, percent, params) {
|
|
17494
17478
|
var _a;
|
|
17495
|
-
const {
|
|
17496
|
-
drawConnect = !1,
|
|
17497
|
-
mode = "none"
|
|
17498
|
-
} = params || {};
|
|
17499
|
-
if (drawConnect && "none" === mode) return;
|
|
17500
17479
|
const {
|
|
17501
17480
|
top: top,
|
|
17502
17481
|
bottom: bottom
|
|
@@ -17506,34 +17485,11 @@
|
|
|
17506
17485
|
const topList = [],
|
|
17507
17486
|
bottomList = [];
|
|
17508
17487
|
let lastDefined = !0;
|
|
17509
|
-
|
|
17510
|
-
|
|
17511
|
-
|
|
17512
|
-
defined0 = !0;
|
|
17513
|
-
const n = top.curves.length;
|
|
17514
|
-
top.curves.forEach((curve, i) => {
|
|
17515
|
-
const bototmCurve = bottom.curves[n - i - 1];
|
|
17516
|
-
let currentTopCurve = curve,
|
|
17517
|
-
currentBottomCurve = bototmCurve;
|
|
17518
|
-
if (curve.originP1 === curve.originP2) return lastCurve = curve, void (lastBottomCurve = bototmCurve);
|
|
17519
|
-
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 {
|
|
17520
|
-
const {
|
|
17521
|
-
originP1: originP1,
|
|
17522
|
-
originP2: originP2
|
|
17523
|
-
} = curve;
|
|
17524
|
-
let validTopCurve, validBottomCurve;
|
|
17525
|
-
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);
|
|
17526
|
-
}
|
|
17527
|
-
lastCurve = curve;
|
|
17528
|
-
}), drawAreaConnectBlock(path, topList, bottomList, params);
|
|
17529
|
-
} else {
|
|
17530
|
-
for (let i = 0, n = top.curves.length; i < n; i++) {
|
|
17531
|
-
const topCurve = top.curves[i];
|
|
17532
|
-
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]));
|
|
17533
|
-
}
|
|
17534
|
-
drawAreaBlock(path, topList, bottomList, params);
|
|
17488
|
+
for (let i = 0, n = top.curves.length; i < n; i++) {
|
|
17489
|
+
const topCurve = top.curves[i];
|
|
17490
|
+
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]));
|
|
17535
17491
|
}
|
|
17536
|
-
return;
|
|
17492
|
+
return void drawAreaBlock(path, topList, bottomList, params);
|
|
17537
17493
|
}
|
|
17538
17494
|
if (percent <= 0) return;
|
|
17539
17495
|
let {
|
|
@@ -17551,51 +17507,17 @@
|
|
|
17551
17507
|
lastDefined = !0;
|
|
17552
17508
|
const topList = [],
|
|
17553
17509
|
bottomList = [];
|
|
17554
|
-
let lastTopCurve,
|
|
17555
|
-
lastBottomCurve,
|
|
17556
|
-
defined0 = !0;
|
|
17557
17510
|
for (let i = 0, n = top.curves.length; i < n; i++) {
|
|
17558
17511
|
const topCurve = top.curves[i],
|
|
17559
17512
|
curCurveLength = topCurve.getLength(direction),
|
|
17560
17513
|
percent = (totalDrawLength - drawedLengthUntilLast) / curCurveLength;
|
|
17561
17514
|
if (percent < 0) break;
|
|
17562
|
-
|
|
17563
|
-
|
|
17564
|
-
|
|
17565
|
-
|
|
17566
|
-
if (topCurve.originP1 === topCurve.originP2) {
|
|
17567
|
-
lastTopCurve = topCurve, lastBottomCurve = bototmCurve;
|
|
17568
|
-
continue;
|
|
17569
|
-
}
|
|
17570
|
-
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 {
|
|
17571
|
-
const {
|
|
17572
|
-
originP1: originP1,
|
|
17573
|
-
originP2: originP2
|
|
17574
|
-
} = topCurve;
|
|
17575
|
-
let validTopCurve, validBottomCurve;
|
|
17576
|
-
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);
|
|
17577
|
-
}
|
|
17578
|
-
lastTopCurve = topCurve;
|
|
17579
|
-
} else {
|
|
17580
|
-
let tc = null,
|
|
17581
|
-
bc = null;
|
|
17582
|
-
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;
|
|
17583
|
-
}
|
|
17515
|
+
drawedLengthUntilLast += curCurveLength;
|
|
17516
|
+
let tc = null,
|
|
17517
|
+
bc = null;
|
|
17518
|
+
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;
|
|
17584
17519
|
}
|
|
17585
|
-
|
|
17586
|
-
}
|
|
17587
|
-
function drawAreaConnectBlock(path, topList, bottomList, params) {
|
|
17588
|
-
if (topList.length < 2) return;
|
|
17589
|
-
const {
|
|
17590
|
-
offsetX = 0,
|
|
17591
|
-
offsetY = 0,
|
|
17592
|
-
offsetZ = 0,
|
|
17593
|
-
mode: mode
|
|
17594
|
-
} = params || {};
|
|
17595
|
-
let curve = topList[0];
|
|
17596
|
-
path.moveTo(curve.p0.x + offsetX, curve.p0.y + offsetY, offsetZ), curve = topList[topList.length - 1];
|
|
17597
|
-
let end = curve.p3 || curve.p1;
|
|
17598
|
-
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();
|
|
17520
|
+
drawAreaBlock(path, topList, bottomList, params);
|
|
17599
17521
|
}
|
|
17600
17522
|
function drawAreaBlock(path, topList, bottomList, params) {
|
|
17601
17523
|
const {
|
|
@@ -17696,7 +17618,8 @@
|
|
|
17696
17618
|
fillOpacity = areaAttribute.fillOpacity,
|
|
17697
17619
|
z = areaAttribute.z,
|
|
17698
17620
|
strokeOpacity = areaAttribute.strokeOpacity,
|
|
17699
|
-
curveTension = areaAttribute.curveTension
|
|
17621
|
+
curveTension = areaAttribute.curveTension,
|
|
17622
|
+
connectedType = areaAttribute.connectedType
|
|
17700
17623
|
} = area.attribute,
|
|
17701
17624
|
data = this.valid(area, areaAttribute, fillCb, strokeCb);
|
|
17702
17625
|
if (!data) return;
|
|
@@ -17713,6 +17636,9 @@
|
|
|
17713
17636
|
let {
|
|
17714
17637
|
curveType = areaAttribute.curveType
|
|
17715
17638
|
} = area.attribute;
|
|
17639
|
+
function parsePoint(points, connectedType) {
|
|
17640
|
+
return "connect" !== connectedType ? points : points.filter(p => !1 !== p.defined);
|
|
17641
|
+
}
|
|
17716
17642
|
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);
|
|
17717
17643
|
if (area.shouldUpdateShape()) {
|
|
17718
17644
|
if (segments && segments.length) {
|
|
@@ -17726,7 +17652,7 @@
|
|
|
17726
17652
|
x: lastTopSeg.endX,
|
|
17727
17653
|
y: lastTopSeg.endY
|
|
17728
17654
|
} : index > 1 && (startPoint.x = lastTopSeg.endX, startPoint.y = lastTopSeg.endY);
|
|
17729
|
-
const data = calcLineCache(seg.points, curveType, {
|
|
17655
|
+
const data = calcLineCache(parsePoint(seg.points, connectedType), curveType, {
|
|
17730
17656
|
startPoint: startPoint,
|
|
17731
17657
|
curveTension: curveTension
|
|
17732
17658
|
});
|
|
@@ -17749,7 +17675,7 @@
|
|
|
17749
17675
|
y: null !== (_d = endPoint.y1) && void 0 !== _d ? _d : endPoint.y
|
|
17750
17676
|
});
|
|
17751
17677
|
}
|
|
17752
|
-
bottomPoints.length > 1 && (lastBottomSeg = calcLineCache(bottomPoints, "stepBefore" === curveType ? "stepAfter" : "stepAfter" === curveType ? "stepBefore" : curveType, {
|
|
17678
|
+
bottomPoints.length > 1 && (lastBottomSeg = calcLineCache(parsePoint(bottomPoints, connectedType), "stepBefore" === curveType ? "stepAfter" : "stepAfter" === curveType ? "stepBefore" : curveType, {
|
|
17753
17679
|
curveTension: curveTension
|
|
17754
17680
|
}), bottomCaches.unshift(lastBottomSeg));
|
|
17755
17681
|
}
|
|
@@ -17760,11 +17686,11 @@
|
|
|
17760
17686
|
} else {
|
|
17761
17687
|
if (!points || !points.length) return area.cacheArea = null, void area.clearUpdateShapeTag();
|
|
17762
17688
|
{
|
|
17763
|
-
const topPoints = points,
|
|
17689
|
+
const topPoints = parsePoint(points, connectedType),
|
|
17764
17690
|
bottomPoints = [];
|
|
17765
|
-
for (let i =
|
|
17766
|
-
x: null !== (_e = points[i].x1) && void 0 !== _e ? _e :
|
|
17767
|
-
y: null !== (_f = points[i].y1) && void 0 !== _f ? _f :
|
|
17691
|
+
for (let i = topPoints.length - 1; i >= 0; i--) bottomPoints.push({
|
|
17692
|
+
x: null !== (_e = points[i].x1) && void 0 !== _e ? _e : topPoints[i].x,
|
|
17693
|
+
y: null !== (_f = points[i].y1) && void 0 !== _f ? _f : topPoints[i].y
|
|
17768
17694
|
});
|
|
17769
17695
|
const topCache = calcLineCache(topPoints, curveType, {
|
|
17770
17696
|
curveTension: curveTension
|
|
@@ -17806,20 +17732,10 @@
|
|
|
17806
17732
|
this._draw(area, areaAttribute, !1, drawContext, params);
|
|
17807
17733
|
}
|
|
17808
17734
|
drawSegmentItem(context, cache, fill, fillOpacity, stroke, strokeOpacity, attribute, defaultAttribute, clipRange, offsetX, offsetY, offsetZ, area, drawContext, fillCb, strokeCb) {
|
|
17809
|
-
|
|
17810
|
-
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;
|
|
17735
|
+
return this._drawSegmentItem(context, cache, fill, fillOpacity, stroke, strokeOpacity, attribute, defaultAttribute, clipRange, offsetX, offsetY, offsetZ, area, drawContext, fillCb, strokeCb);
|
|
17811
17736
|
}
|
|
17812
|
-
_drawSegmentItem(context, cache, fill, fillOpacity, stroke, strokeOpacity, attribute, defaultAttribute, clipRange, offsetX, offsetY, offsetZ, area, drawContext,
|
|
17813
|
-
var _a, _b, _c, _d;
|
|
17737
|
+
_drawSegmentItem(context, cache, fill, fillOpacity, stroke, strokeOpacity, attribute, defaultAttribute, clipRange, offsetX, offsetY, offsetZ, area, drawContext, fillCb, strokeCb) {
|
|
17814
17738
|
if (!(cache && cache.top && cache.bottom && cache.top.curves && cache.top.curves.length && cache.bottom.curves && cache.bottom.curves.length)) return;
|
|
17815
|
-
let {
|
|
17816
|
-
connectedType: connectedType,
|
|
17817
|
-
connectedX: connectedX,
|
|
17818
|
-
connectedY: connectedY,
|
|
17819
|
-
connectedStyle: connectedStyle
|
|
17820
|
-
} = attribute;
|
|
17821
|
-
const da = [];
|
|
17822
|
-
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;
|
|
17823
17739
|
context.beginPath();
|
|
17824
17740
|
const {
|
|
17825
17741
|
points: points,
|
|
@@ -17838,11 +17754,7 @@
|
|
|
17838
17754
|
offsetX: offsetX,
|
|
17839
17755
|
offsetY: offsetY,
|
|
17840
17756
|
offsetZ: offsetZ,
|
|
17841
|
-
direction: direction
|
|
17842
|
-
drawConnect: connect,
|
|
17843
|
-
mode: connectedType,
|
|
17844
|
-
zeroX: connectedX,
|
|
17845
|
-
zeroY: connectedY
|
|
17757
|
+
direction: direction
|
|
17846
17758
|
}), this.beforeRenderStep(area, context, offsetX, offsetY, !!fillOpacity, !1, fill, !1, defaultAttribute, drawContext, fillCb, null, {
|
|
17847
17759
|
attribute: attribute
|
|
17848
17760
|
}), context.setShadowBlendStyle && context.setShadowBlendStyle(area, attribute, defaultAttribute);
|
|
@@ -17850,7 +17762,7 @@
|
|
|
17850
17762
|
x: originX = 0,
|
|
17851
17763
|
x: originY = 0
|
|
17852
17764
|
} = attribute;
|
|
17853
|
-
return !1 !== fill && (fillCb ? fillCb(context, attribute, defaultAttribute) : fillOpacity && (context.setCommonStyle(area,
|
|
17765
|
+
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, {
|
|
17854
17766
|
attribute: attribute
|
|
17855
17767
|
}), (() => {
|
|
17856
17768
|
if (!1 !== stroke) if (strokeCb) strokeCb(context, attribute, defaultAttribute);else {
|
|
@@ -17860,12 +17772,8 @@
|
|
|
17860
17772
|
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", {
|
|
17861
17773
|
offsetX: offsetX,
|
|
17862
17774
|
offsetY: offsetY,
|
|
17863
|
-
offsetZ: offsetZ
|
|
17864
|
-
|
|
17865
|
-
mode: connectedType,
|
|
17866
|
-
zeroX: connectedX,
|
|
17867
|
-
zeroY: connectedY
|
|
17868
|
-
})), context.setStrokeStyle(area, connect ? connectedStyle : attribute, originX - offsetX, originY - offsetY, connect ? da : defaultAttribute), context.stroke();
|
|
17775
|
+
offsetZ: offsetZ
|
|
17776
|
+
})), context.setStrokeStyle(area, attribute, originX - offsetX, originY - offsetY, defaultAttribute), context.stroke();
|
|
17869
17777
|
}
|
|
17870
17778
|
})(), !1;
|
|
17871
17779
|
}
|
|
@@ -20286,7 +20194,7 @@
|
|
|
20286
20194
|
} = attribute,
|
|
20287
20195
|
b = aabbBounds;
|
|
20288
20196
|
return points.forEach(p => {
|
|
20289
|
-
!1 === p.defined && "
|
|
20197
|
+
!1 === p.defined && "connect" !== connectedType || b.add(p.x, p.y);
|
|
20290
20198
|
}), b;
|
|
20291
20199
|
}
|
|
20292
20200
|
updateLineAABBBoundsBySegments(attribute, lineTheme, aabbBounds, graphic) {
|
|
@@ -20297,7 +20205,7 @@
|
|
|
20297
20205
|
b = aabbBounds;
|
|
20298
20206
|
return segments.forEach(s => {
|
|
20299
20207
|
s.points.forEach(p => {
|
|
20300
|
-
!1 === p.defined && "
|
|
20208
|
+
!1 === p.defined && "connect" !== connectedType || b.add(p.x, p.y);
|
|
20301
20209
|
});
|
|
20302
20210
|
}), b;
|
|
20303
20211
|
}
|
|
@@ -31799,11 +31707,11 @@
|
|
|
31799
31707
|
maxX = Math.max(x1, x2),
|
|
31800
31708
|
minY = Math.min(y1, y2),
|
|
31801
31709
|
maxY = Math.max(y1, y2),
|
|
31802
|
-
|
|
31803
|
-
|
|
31710
|
+
maxXWithPadding = width + right,
|
|
31711
|
+
maxYWithPadding = height + bottom;
|
|
31804
31712
|
let dx = 0,
|
|
31805
31713
|
dy = 0;
|
|
31806
|
-
return minX <
|
|
31714
|
+
return minX < 0 - left ? dx = -minX : maxX > maxXWithPadding && (dx = maxXWithPadding - maxX), minY < 0 - top ? dy = -minY : maxY > maxYWithPadding && (dy = maxYWithPadding - maxY), {
|
|
31807
31715
|
dx: dx,
|
|
31808
31716
|
dy: dy
|
|
31809
31717
|
};
|
|
@@ -32517,7 +32425,7 @@
|
|
|
32517
32425
|
range = boundToRange(bmpTool, bounds, !0);
|
|
32518
32426
|
if (canPlace(bmpTool, bitmap, bounds, clampForce, overlapPadding)) bitmap.setRange(range);else {
|
|
32519
32427
|
if (clampForce) {
|
|
32520
|
-
if (this._processClampForce(text, bmpTool, bitmap)) continue;
|
|
32428
|
+
if (this._processClampForce(text, bmpTool, bitmap, overlapPadding)) continue;
|
|
32521
32429
|
}
|
|
32522
32430
|
hideOnHit ? text.setAttributes({
|
|
32523
32431
|
visible: !1
|
|
@@ -32527,12 +32435,13 @@
|
|
|
32527
32435
|
return result;
|
|
32528
32436
|
}
|
|
32529
32437
|
_processClampForce(text, bmpTool, bitmap) {
|
|
32438
|
+
let overlapPadding = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
32530
32439
|
const {
|
|
32531
32440
|
dy = 0,
|
|
32532
32441
|
dx = 0
|
|
32533
32442
|
} = clampText(text, bmpTool.width, bmpTool.height, bmpTool.padding);
|
|
32534
32443
|
if (0 === dx && 0 === dy) {
|
|
32535
|
-
if (canPlace(bmpTool, bitmap, text.AABBBounds)) return bitmap.setRange(boundToRange(bmpTool, text.AABBBounds, !0)), !0;
|
|
32444
|
+
if (canPlace(bmpTool, bitmap, text.AABBBounds, !1, overlapPadding)) return bitmap.setRange(boundToRange(bmpTool, text.AABBBounds, !0)), !0;
|
|
32536
32445
|
} else if (canPlace(bmpTool, bitmap, {
|
|
32537
32446
|
x1: text.AABBBounds.x1 + dx,
|
|
32538
32447
|
x2: text.AABBBounds.x2 + dx,
|
|
@@ -32592,7 +32501,7 @@
|
|
|
32592
32501
|
break;
|
|
32593
32502
|
}
|
|
32594
32503
|
if (!hasPlace && clampForce) {
|
|
32595
|
-
if (this._processClampForce(text, bmpTool, bitmap)) {
|
|
32504
|
+
if (this._processClampForce(text, bmpTool, bitmap, overlapPadding)) {
|
|
32596
32505
|
result.push(text);
|
|
32597
32506
|
continue;
|
|
32598
32507
|
}
|
|
@@ -54719,7 +54628,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
54719
54628
|
animate(animationParameters, parameters) {
|
|
54720
54629
|
return this.isAnimating = !0, this.animateElement(animationParameters, parameters), 0 === this.runnings.length && this.animationEnd(), this;
|
|
54721
54630
|
}
|
|
54722
|
-
stop(
|
|
54631
|
+
stop() {
|
|
54632
|
+
let stopState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "end";
|
|
54723
54633
|
let invokeCallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
54724
54634
|
return this.runnings.forEach(running => running.stop(stopState)), this.animationEnd(invokeCallback), this;
|
|
54725
54635
|
}
|
|
@@ -54914,7 +54824,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
54914
54824
|
var _a;
|
|
54915
54825
|
element.isReserved && element.diffState !== DiffState.exit && (element.isReserved = !1);
|
|
54916
54826
|
const prevElementState = null === (_a = this.elementRecorder.get(element)) || void 0 === _a ? void 0 : _a.prevState;
|
|
54917
|
-
|
|
54827
|
+
this.configs.some(config => prevElementState !== element.diffState && config.state === prevElementState && config.timeline.controlOptions.stopWhenStateChange) && this.clearElementAnimation(element, !1);
|
|
54918
54828
|
}), this.configs.forEach(config => {
|
|
54919
54829
|
this.animateByTimeline(config, elements, parameters);
|
|
54920
54830
|
}), this.mark.cleanExitElements(), this;
|
|
@@ -55040,12 +54950,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
55040
54950
|
elementCount: animatedElements.length,
|
|
55041
54951
|
elementIndex: 0
|
|
55042
54952
|
};
|
|
55043
|
-
animatedElements.forEach(element => {
|
|
55044
|
-
var _a;
|
|
55045
|
-
(null !== (_a = this.animators.get(config.state)) && void 0 !== _a ? _a : []).filter(animator => animator.element === element && animator.animationOptions.id === config.id).forEach(animator => {
|
|
55046
|
-
animator.stop(null, !1), this.handleAnimatorEnd(animator, !1);
|
|
55047
|
-
});
|
|
55048
|
-
}), animatedElements.forEach((element, index) => {
|
|
54953
|
+
animatedElements.forEach((element, index) => {
|
|
55049
54954
|
animationParameters.elementIndex = index;
|
|
55050
54955
|
const mergedParameters = Object.assign({
|
|
55051
54956
|
[DefaultAnimationParameters]: animationParameters
|
|
@@ -61939,7 +61844,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61939
61844
|
};
|
|
61940
61845
|
registerVChartCore();
|
|
61941
61846
|
|
|
61942
|
-
const version = "1.12.19
|
|
61847
|
+
const version = "1.12.19";
|
|
61943
61848
|
|
|
61944
61849
|
const addVChartProperty = (data, op) => {
|
|
61945
61850
|
const context = op.beforeCall();
|
|
@@ -64816,17 +64721,17 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
64816
64721
|
this.setMarkStyle(symbolMark, {
|
|
64817
64722
|
fill: this.getColorAttribute()
|
|
64818
64723
|
}, 'normal', AttributeLevel.Series);
|
|
64819
|
-
if (this._invalidType !== 'zero') {
|
|
64820
|
-
this.setMarkStyle(symbolMark, {
|
|
64821
|
-
visible: this._getInvalidDefined.bind(this)
|
|
64822
|
-
}, 'normal', AttributeLevel.Series);
|
|
64823
|
-
}
|
|
64824
|
-
this.event.on(ChartEvent.viewDataStatisticsUpdate, { filter: param => param.model === this }, () => {
|
|
64825
|
-
this.encodeDefined(symbolMark, 'visible');
|
|
64826
|
-
});
|
|
64827
64724
|
this.setMarkStyle(symbolMark, {
|
|
64828
|
-
x:
|
|
64829
|
-
|
|
64725
|
+
x: (datum) => {
|
|
64726
|
+
return this._invalidType !== 'zero' && !this._getInvalidDefined(datum)
|
|
64727
|
+
? Number.NaN
|
|
64728
|
+
: this.dataToPositionX(datum);
|
|
64729
|
+
},
|
|
64730
|
+
y: (datum) => {
|
|
64731
|
+
return this._invalidType !== 'zero' && !this._getInvalidDefined(datum)
|
|
64732
|
+
? Number.NaN
|
|
64733
|
+
: this.dataToPositionY(datum);
|
|
64734
|
+
},
|
|
64830
64735
|
z: this._fieldZ ? this.dataToPositionZ.bind(this) : null
|
|
64831
64736
|
}, 'normal', AttributeLevel.Series);
|
|
64832
64737
|
}
|