@@ -33985,6 +33985,52 @@ const DEFAULT_AXIS_BREAK_SYMBOL_STYLE = {
3398533985 zIndex: 1
3398633986};
3398733987
33988+ function genNormalBounds(item) {
33989+ const bounds = item.AABBBounds;
33990+ return {
33991+ x1: bounds.x1,
33992+ x2: bounds.x2,
33993+ y1: bounds.y1,
33994+ y2: bounds.y2,
33995+ centerX: item.attribute.x,
33996+ centerY: item.attribute.y,
33997+ angle: item.attribute.angle
33998+ };
33999+ }
34000+ function genRotateBounds(items) {
34001+ items.forEach(item => {
34002+ if (item.rotatedBounds || !item.attribute.angle) return;
34003+ const bounds = genNormalBounds(item),
34004+ rotatedCenter = rotatePoint({
34005+ x: item.attribute.x,
34006+ y: item.attribute.y
34007+ }, bounds.angle, {
34008+ x: bounds.centerX,
34009+ y: bounds.centerY
34010+ }),
34011+ deltaX = rotatedCenter.x - bounds.centerX,
34012+ deltaY = rotatedCenter.y - bounds.centerY;
34013+ bounds.x1 += deltaX, bounds.x2 += deltaX, bounds.y1 += deltaY, bounds.y2 += deltaY, bounds.centerX += deltaX, bounds.centerY += deltaY, item.rotatedBounds = bounds;
34014+ });
34015+ }
34016+ function itemIntersect(item1, item2) {
34017+ var _a, _b;
34018+ return (null === (_a = item1.OBBBounds) || void 0 === _a ? void 0 : _a.empty()) || (null === (_b = item2.OBBBounds) || void 0 === _b ? void 0 : _b.empty()) ? isRectIntersect(item1.AABBBounds, item2.AABBBounds, !1) && (!item1.rotatedBounds || !item2.rotatedBounds || isRotateAABBIntersect(item1.rotatedBounds, item2.rotatedBounds, !0)) : item1.OBBBounds.intersects(item2.OBBBounds);
34019+ }
34020+ const DELTA_ANGLE = Math.sin(Math.PI / 10);
34021+ function isAngleVertical(angle) {
34022+ let delta = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DELTA_ANGLE;
34023+ const hasAngle = !isNil$1(angle) && 0 !== angle,
34024+ cos = hasAngle ? Math.cos(angle) : 1;
34025+ return hasAngle && Math.abs(cos) <= delta;
34026+ }
34027+ function isAngleHorizontal(angle) {
34028+ let delta = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DELTA_ANGLE;
34029+ const hasAngle = !isNil$1(angle) && 0 !== angle,
34030+ sin = hasAngle ? Math.sin(angle) : 0;
34031+ return !hasAngle || Math.abs(sin) <= delta;
34032+ }
34033+
3398834034function getCircleLabelPosition(tickPosition, tickVector) {
3398934035 return {
3399034036 x: tickPosition.x + tickVector[0],
@@ -34055,9 +34101,11 @@ function getPolygonPath(points, closed) {
3405534101 }), closed && (path += "Z")), path;
3405634102}
3405734103function textIntersect(textA, textB, sep) {
34058- let a = textA.OBBBounds,
34059- b = textB.OBBBounds;
34060- return a && b && !a.empty() && !b.empty() ? a.intersects(b) : (a = textA.AABBBounds, b = textB.AABBBounds, sep > Math.max(b.x1 - a.x2, a.x1 - b.x2, b.y1 - a.y2, a.y1 - b.y2));
34104+ var _a;
34105+ let a, b;
34106+ const angle = null === (_a = textA.attribute) || void 0 === _a ? void 0 : _a.angle,
34107+ isAABBIntersects = (textA, textB, sep) => (a = textA.AABBBounds, b = textB.AABBBounds, sep > Math.max(b.x1 - a.x2, a.x1 - b.x2, b.y1 - a.y2, a.y1 - b.y2));
34108+ return isAngleHorizontal(angle, Number.EPSILON) ? isAABBIntersects(textA, textB, sep) : (a = textA.OBBBounds, b = textB.OBBBounds, !a || !b || a.empty() || b.empty() ? isAABBIntersects(textA, textB, sep) : a.intersects(b));
3406134109}
3406234110function hasOverlap$1(items, pad) {
3406334111 for (let b, i = 1, n = items.length, a = items[0]; i < n; a = b, ++i) if (b = items[i], textIntersect(a, b, pad)) return !0;
@@ -34441,50 +34489,6 @@ function autoHide(labels, config) {
3444134489 });
3444234490}
3444334491
34444- function genNormalBounds(item) {
34445- const bounds = item.AABBBounds;
34446- return {
34447- x1: bounds.x1,
34448- x2: bounds.x2,
34449- y1: bounds.y1,
34450- y2: bounds.y2,
34451- centerX: item.attribute.x,
34452- centerY: item.attribute.y,
34453- angle: item.attribute.angle
34454- };
34455- }
34456- function genRotateBounds(items) {
34457- items.forEach(item => {
34458- if (item.rotatedBounds || !item.attribute.angle) return;
34459- const bounds = genNormalBounds(item),
34460- rotatedCenter = rotatePoint({
34461- x: item.attribute.x,
34462- y: item.attribute.y
34463- }, bounds.angle, {
34464- x: bounds.centerX,
34465- y: bounds.centerY
34466- }),
34467- deltaX = rotatedCenter.x - bounds.centerX,
34468- deltaY = rotatedCenter.y - bounds.centerY;
34469- bounds.x1 += deltaX, bounds.x2 += deltaX, bounds.y1 += deltaY, bounds.y2 += deltaY, bounds.centerX += deltaX, bounds.centerY += deltaY, item.rotatedBounds = bounds;
34470- });
34471- }
34472- function itemIntersect(item1, item2) {
34473- var _a, _b;
34474- return (null === (_a = item1.OBBBounds) || void 0 === _a ? void 0 : _a.empty()) || (null === (_b = item2.OBBBounds) || void 0 === _b ? void 0 : _b.empty()) ? isRectIntersect(item1.AABBBounds, item2.AABBBounds, !1) && (!item1.rotatedBounds || !item2.rotatedBounds || isRotateAABBIntersect(item1.rotatedBounds, item2.rotatedBounds, !0)) : item1.OBBBounds.intersects(item2.OBBBounds);
34475- }
34476- const DELTA_ANGLE = Math.sin(Math.PI / 10);
34477- function isAngleVertical(angle) {
34478- const hasAngle = !isNil$1(angle) && 0 !== angle,
34479- cos = hasAngle ? Math.cos(angle) : 1;
34480- return hasAngle && Math.abs(cos) <= DELTA_ANGLE;
34481- }
34482- function isAngleHorizontal(angle) {
34483- const hasAngle = !isNil$1(angle) && 0 !== angle,
34484- sin = hasAngle ? Math.sin(angle) : 0;
34485- return !hasAngle || Math.abs(sin) <= DELTA_ANGLE;
34486- }
34487-
3448834492function autoRotate(items, rotateConfig) {
3448934493 if (isEmpty(items)) return;
3449034494 const {
@@ -61925,7 +61929,7 @@ const registerVChartCore = () => {
6192561929};
6192661930registerVChartCore();
6192761931
61928- const version = "1.12.17 ";
61932+ const version = "1.12.18 ";
6192961933
6193061934const addVChartProperty = (data, op) => {
6193161935 const context = op.beforeCall();
0 commit comments