@visactor/vchart 1.12.10-alpha.0 → 1.12.10
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 +95 -98
- package/build/index.min.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/chart/index.js +1 -2
- package/cjs/compile/compilable-base.js +2 -1
- package/cjs/compile/util.js +1 -2
- package/cjs/component/axis/base-axis.d.ts +1 -0
- package/cjs/component/axis/base-axis.js +17 -18
- package/cjs/component/axis/base-axis.js.map +1 -1
- package/cjs/component/axis/cartesian/axis.d.ts +1 -0
- package/cjs/component/axis/cartesian/axis.js +3 -0
- package/cjs/component/axis/cartesian/axis.js.map +1 -1
- package/cjs/component/axis/polar/axis.d.ts +1 -0
- package/cjs/component/axis/polar/axis.js +5 -1
- package/cjs/component/axis/polar/axis.js.map +1 -1
- package/cjs/component/tooltip/interface/spec.d.ts +2 -12
- package/cjs/component/tooltip/interface/spec.js.map +1 -1
- package/cjs/component/tooltip/tooltip.js +15 -29
- package/cjs/component/tooltip/tooltip.js.map +1 -1
- package/cjs/constant/layout.js +2 -1
- package/cjs/constant/scatter.js +1 -2
- 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/data/register.js +2 -1
- package/cjs/series/pie/interface.d.ts +3 -3
- package/cjs/series/pie/interface.js.map +1 -1
- package/cjs/series/pie/pie.js +5 -5
- package/cjs/series/pie/pie.js.map +1 -1
- package/esm/chart/index.js +1 -2
- package/esm/compile/compilable-base.js +2 -1
- package/esm/compile/util.js +1 -2
- package/esm/component/axis/base-axis.d.ts +1 -0
- package/esm/component/axis/base-axis.js +13 -14
- package/esm/component/axis/base-axis.js.map +1 -1
- package/esm/component/axis/cartesian/axis.d.ts +1 -0
- package/esm/component/axis/cartesian/axis.js +3 -0
- package/esm/component/axis/cartesian/axis.js.map +1 -1
- package/esm/component/axis/polar/axis.d.ts +1 -0
- package/esm/component/axis/polar/axis.js +5 -1
- package/esm/component/axis/polar/axis.js.map +1 -1
- package/esm/component/tooltip/interface/spec.d.ts +2 -12
- package/esm/component/tooltip/interface/spec.js.map +1 -1
- package/esm/component/tooltip/tooltip.js +16 -29
- package/esm/component/tooltip/tooltip.js.map +1 -1
- package/esm/constant/layout.js +2 -1
- package/esm/constant/scatter.js +1 -2
- 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/data/register.js +2 -1
- package/esm/series/pie/interface.d.ts +3 -3
- package/esm/series/pie/interface.js.map +1 -1
- package/esm/series/pie/pie.js +6 -4
- package/esm/series/pie/pie.js.map +1 -1
- package/package.json +18 -18
package/build/index.js
CHANGED
|
@@ -1251,7 +1251,7 @@
|
|
|
1251
1251
|
return steps.forEach(step => {
|
|
1252
1252
|
const sin = Math.sin(step),
|
|
1253
1253
|
cos = Math.cos(step);
|
|
1254
|
-
1 === sin ? radiusList.push(height - y) : -1 === sin ? radiusList.push(y) : 1 === cos ? radiusList.push(width - x) : -1 === cos ? radiusList.push(x) : (sin > 0 ? radiusList.push(Math.abs((height - y) /
|
|
1254
|
+
1 === sin ? radiusList.push(height - y) : -1 === sin ? radiusList.push(y) : 1 === cos ? radiusList.push(width - x) : -1 === cos ? radiusList.push(x) : (sin > 0 ? radiusList.push(Math.abs((height - y) / sin)) : radiusList.push(Math.abs(y / sin)), cos > 0 ? radiusList.push(Math.abs((width - x) / cos)) : radiusList.push(Math.abs(x / cos)));
|
|
1255
1255
|
}), Math.min.apply(null, radiusList);
|
|
1256
1256
|
}
|
|
1257
1257
|
function computeQuadrant(angle) {
|
|
@@ -18490,7 +18490,9 @@
|
|
|
18490
18490
|
path = groupAttribute.path,
|
|
18491
18491
|
lineWidth = groupAttribute.lineWidth,
|
|
18492
18492
|
visible = groupAttribute.visible,
|
|
18493
|
-
fillStrokeOrder = groupAttribute.fillStrokeOrder
|
|
18493
|
+
fillStrokeOrder = groupAttribute.fillStrokeOrder,
|
|
18494
|
+
x: originX = groupAttribute.x,
|
|
18495
|
+
y: originY = groupAttribute.y
|
|
18494
18496
|
} = group.attribute,
|
|
18495
18497
|
fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill),
|
|
18496
18498
|
sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height),
|
|
@@ -18518,10 +18520,10 @@
|
|
|
18518
18520
|
c.time === BaseRenderContributionTime.beforeFillStroke && c.drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb, doFillOrStroke);
|
|
18519
18521
|
}), clip && context.clip(), context.setShadowBlendStyle && context.setShadowBlendStyle(group, group.attribute, groupAttribute);
|
|
18520
18522
|
const _runFill = () => {
|
|
18521
|
-
doFillOrStroke.doFill && (fillCb ? fillCb(context, group.attribute, groupAttribute) : fVisible && (context.setCommonStyle(group, group.attribute, x, y, groupAttribute), context.fill()));
|
|
18523
|
+
doFillOrStroke.doFill && (fillCb ? fillCb(context, group.attribute, groupAttribute) : fVisible && (context.setCommonStyle(group, group.attribute, originX - x, originY - y, groupAttribute), context.fill()));
|
|
18522
18524
|
},
|
|
18523
18525
|
_runStroke = () => {
|
|
18524
|
-
doFillOrStroke.doStroke && (strokeCb ? strokeCb(context, group.attribute, groupAttribute) : sVisible && (context.setStrokeStyle(group, group.attribute, x, y, groupAttribute), context.stroke()));
|
|
18526
|
+
doFillOrStroke.doStroke && (strokeCb ? strokeCb(context, group.attribute, groupAttribute) : sVisible && (context.setStrokeStyle(group, group.attribute, originX - x, originY - y, groupAttribute), context.stroke()));
|
|
18525
18527
|
};
|
|
18526
18528
|
fillStrokeOrder ? (_runStroke(), _runFill()) : (_runFill(), _runStroke()), this._groupRenderContribitions.forEach(c => {
|
|
18527
18529
|
c.time === BaseRenderContributionTime.afterFillStroke && c.drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb);
|
|
@@ -24005,27 +24007,9 @@
|
|
|
24005
24007
|
for (let i = 1, len = points.length; i < len; i++) deltaX = points[i].x - lastX, deltaY = points[i].y - lastY, deltaX * deltaX + deltaY * deltaY > sqTolerance && (lastX = points[i].x, lastY = points[i].y, newPoints.push(points[i]));
|
|
24006
24008
|
return points[points.length - 1].x === lastX && points[points.length - 1].y === lastY || newPoints.push(points[points.length - 1]), newPoints;
|
|
24007
24009
|
}
|
|
24008
|
-
function simplifyDPStep(points, startIdx, endIdx, sqTolerance, simplified) {
|
|
24009
|
-
let maxSqDist = sqTolerance,
|
|
24010
|
-
nextIdx = startIdx;
|
|
24011
|
-
const startX = points[startIdx].x,
|
|
24012
|
-
startY = points[startIdx].y,
|
|
24013
|
-
vecX2 = points[endIdx].x - startX,
|
|
24014
|
-
vecY2 = points[endIdx].y - startY,
|
|
24015
|
-
sqLength = vecX2 * vecX2 + vecY2 * vecY2;
|
|
24016
|
-
let area, sqArea, sqDistance, vecX1, vecY1;
|
|
24017
|
-
for (let i = startIdx + 1, len = endIdx - 1; i < len; i++) vecX1 = points[i].x - startX, vecY1 = points[i].y - startY, area = vecX1 * vecY2 - vecX2 * vecY1, sqArea = area * area, sqDistance = sqArea / sqLength, sqDistance > maxSqDist && (maxSqDist = sqDistance, nextIdx = i);
|
|
24018
|
-
maxSqDist > sqTolerance && (nextIdx - startIdx > 2 && simplifyDPStep(points, startIdx, nextIdx, sqTolerance, simplified), simplified.push(points[nextIdx], points[nextIdx + 1]), endIdx - nextIdx > 2 && simplifyDPStep(points, nextIdx, endIdx, sqTolerance, simplified));
|
|
24019
|
-
}
|
|
24020
|
-
function simplifyDouglasPeucker(points, sqTolerance) {
|
|
24021
|
-
const lastIdx = points.length - 1,
|
|
24022
|
-
simplified = [points[0]];
|
|
24023
|
-
return simplifyDPStep(points, 0, lastIdx, sqTolerance, simplified), simplified.push(points[lastIdx]), simplified;
|
|
24024
|
-
}
|
|
24025
24010
|
function flatten_simplify(points, tolerance, highestQuality) {
|
|
24026
24011
|
if (points.length <= 10) return points;
|
|
24027
|
-
|
|
24028
|
-
return points = simplifyDouglasPeucker(points = highestQuality ? points : simplifyRadialDist(points, sqTolerance), sqTolerance);
|
|
24012
|
+
return points = highestQuality ? points : simplifyRadialDist(points, void 0 !== tolerance ? tolerance * tolerance : 1);
|
|
24029
24013
|
}
|
|
24030
24014
|
|
|
24031
24015
|
let loadArcModule = !1;
|
|
@@ -34383,21 +34367,23 @@
|
|
|
34383
34367
|
axisLength: axisLength
|
|
34384
34368
|
} = config;
|
|
34385
34369
|
if (isEmpty(labels) || !isValidNumber$1(limitLength)) return;
|
|
34386
|
-
const overflowLimitLength = normalizeOverflowLimitLength(config.overflowLimitLength)
|
|
34370
|
+
const overflowLimitLength = normalizeOverflowLimitLength(config.overflowLimitLength),
|
|
34371
|
+
firstLabel = labels[0],
|
|
34372
|
+
angle = firstLabel.attribute.angle,
|
|
34373
|
+
hasAngle = !isNil$1(angle),
|
|
34374
|
+
cos = hasAngle ? Math.cos(angle) : 1,
|
|
34375
|
+
sin = hasAngle ? Math.sin(angle) : 0,
|
|
34376
|
+
isHorizontal = isAngleHorizontal(angle),
|
|
34377
|
+
isVertical = isAngleVertical(angle),
|
|
34378
|
+
isX = "top" === orient || "bottom" === orient,
|
|
34379
|
+
direction = firstLabel.attribute.direction,
|
|
34380
|
+
checkBox = !isHorizontal && !isVertical && isX && (labels.length < 2 || labels.some(label => Math.abs(label.AABBBounds.width() - firstLabel.AABBBounds.width()) >= 2)) && firstLabel.AABBBounds.width() > Math.abs(limitLength / sin);
|
|
34387
34381
|
labels.forEach(label => {
|
|
34388
34382
|
var _a;
|
|
34389
|
-
const angle = label.attribute.angle,
|
|
34390
|
-
hasAngle = !isNil$1(angle),
|
|
34391
|
-
cos = hasAngle ? Math.cos(angle) : 1,
|
|
34392
|
-
sin = hasAngle ? Math.sin(angle) : 0,
|
|
34393
|
-
isHorizontal = isAngleHorizontal(angle),
|
|
34394
|
-
isVertical = isAngleVertical(angle),
|
|
34395
|
-
isX = "top" === orient || "bottom" === orient;
|
|
34396
34383
|
if (isX) {
|
|
34397
34384
|
if (isVertical && Math.floor(label.AABBBounds.height()) <= limitLength) return;
|
|
34398
34385
|
if (isHorizontal && Math.floor(label.AABBBounds.width()) <= verticalLimitLength) return;
|
|
34399
34386
|
}
|
|
34400
|
-
const direction = label.attribute.direction;
|
|
34401
34387
|
if (!isX) {
|
|
34402
34388
|
if ("vertical" === direction && Math.floor(label.AABBBounds.height()) <= verticalLimitLength) return;
|
|
34403
34389
|
if ("vertical" !== direction) {
|
|
@@ -34413,11 +34399,11 @@
|
|
|
34413
34399
|
} = label.AABBBounds,
|
|
34414
34400
|
tan = sin / cos,
|
|
34415
34401
|
verticalSizeLimit = Math.abs(limitLength / sin);
|
|
34416
|
-
if (tan > 0 && x1 <= axisLength && limitLength / tan + x1 > axisLength) {
|
|
34417
|
-
const lengthLimit = (axisLength - x1) / Math.abs(cos)
|
|
34402
|
+
if (checkBox && tan > 0 && x1 <= axisLength + overflowLimitLength.right && limitLength / tan + x1 > axisLength + overflowLimitLength.right) {
|
|
34403
|
+
const lengthLimit = (axisLength - x1 + overflowLimitLength.right) / Math.abs(cos);
|
|
34418
34404
|
limitLabelLength = Math.min(lengthLimit, verticalSizeLimit);
|
|
34419
|
-
} else if (tan < 0 && x2 >=
|
|
34420
|
-
const lengthLimit = x2 / Math.abs(cos)
|
|
34405
|
+
} else if (checkBox && tan < 0 && x2 >= -overflowLimitLength.left && limitLength / tan + x2 < -overflowLimitLength.left) {
|
|
34406
|
+
const lengthLimit = (x2 + overflowLimitLength.left) / Math.abs(cos);
|
|
34421
34407
|
limitLabelLength = Math.min(lengthLimit, verticalSizeLimit);
|
|
34422
34408
|
} else limitLabelLength = verticalSizeLimit;
|
|
34423
34409
|
} else limitLabelLength = Math.abs(limitLength / cos);
|
|
@@ -34436,30 +34422,40 @@
|
|
|
34436
34422
|
orient: orient
|
|
34437
34423
|
} = config;
|
|
34438
34424
|
if (isEmpty(labels) || !isValidNumber$1(limitLength)) return;
|
|
34439
|
-
const
|
|
34440
|
-
|
|
34441
|
-
|
|
34442
|
-
|
|
34443
|
-
|
|
34444
|
-
|
|
34445
|
-
|
|
34425
|
+
const angle = labels[0].attribute.angle,
|
|
34426
|
+
isHorizontal = isAngleHorizontal(angle),
|
|
34427
|
+
isVertical = isAngleVertical(angle),
|
|
34428
|
+
isX = "top" === orient || "bottom" === orient;
|
|
34429
|
+
let verticalLimitLength = axisLength / labels.length;
|
|
34430
|
+
labels.forEach((label, index) => {
|
|
34431
|
+
var _a, _b, _c, _d, _e;
|
|
34446
34432
|
if (isX) {
|
|
34447
34433
|
if (isVertical && Math.floor(label.AABBBounds.height()) <= limitLength) return;
|
|
34448
|
-
if (isHorizontal
|
|
34434
|
+
if (isHorizontal) {
|
|
34435
|
+
const minGap = getLabelMinGap(label.attribute.x, null === (_a = labels[index + 1]) || void 0 === _a ? void 0 : _a.attribute.x, null === (_b = labels[index - 1]) || void 0 === _b ? void 0 : _b.attribute.x);
|
|
34436
|
+
isValidNumber$1(minGap) && (verticalLimitLength = min$1(verticalLimitLength, minGap));
|
|
34437
|
+
}
|
|
34449
34438
|
} else {
|
|
34450
|
-
if (isVertical
|
|
34439
|
+
if (isVertical) {
|
|
34440
|
+
const minGap = getLabelMinGap(label.attribute.y, null === (_c = labels[index + 1]) || void 0 === _c ? void 0 : _c.attribute.y, null === (_d = labels[index - 1]) || void 0 === _d ? void 0 : _d.attribute.y);
|
|
34441
|
+
isValidNumber$1(minGap) && (verticalLimitLength = min$1(verticalLimitLength, minGap));
|
|
34442
|
+
}
|
|
34451
34443
|
if (isHorizontal && Math.floor(label.AABBBounds.width()) <= limitLength) return;
|
|
34452
34444
|
}
|
|
34453
34445
|
let limitLabelLength = null,
|
|
34454
34446
|
heightLimit = null;
|
|
34455
34447
|
isX ? isVertical ? (limitLabelLength = limitLength, heightLimit = verticalLimitLength) : (limitLabelLength = verticalLimitLength, heightLimit = limitLength) : isVertical ? (limitLabelLength = verticalLimitLength, heightLimit = limitLength) : (limitLabelLength = limitLength, heightLimit = verticalLimitLength), label.setAttributes({
|
|
34456
34448
|
maxLineWidth: limitLabelLength,
|
|
34457
|
-
ellipsis: null !== (
|
|
34449
|
+
ellipsis: null !== (_e = label.attribute.ellipsis) && void 0 !== _e ? _e : ellipsis,
|
|
34458
34450
|
whiteSpace: "normal",
|
|
34459
34451
|
heightLimit: heightLimit
|
|
34460
34452
|
});
|
|
34461
34453
|
});
|
|
34462
34454
|
}
|
|
34455
|
+
function getLabelMinGap(current, next, prev) {
|
|
34456
|
+
let minGap;
|
|
34457
|
+
return isValidNumber$1(next) && (minGap = Math.abs(next - current)), isValidNumber$1(prev) && (minGap = isValidNumber$1(minGap) ? Math.min(Math.abs(current - prev), minGap) : Math.abs(current - prev)), minGap;
|
|
34458
|
+
}
|
|
34463
34459
|
|
|
34464
34460
|
function alignAxisLabels(labels, start, containerSize, orient, align) {
|
|
34465
34461
|
"left" === orient || "right" === orient ? "left" === align ? labels.forEach(label => {
|
|
@@ -35188,16 +35184,15 @@
|
|
|
35188
35184
|
inside: inside,
|
|
35189
35185
|
radius: radius,
|
|
35190
35186
|
center: center,
|
|
35191
|
-
|
|
35192
|
-
height: height,
|
|
35187
|
+
size: size,
|
|
35193
35188
|
label: label,
|
|
35194
35189
|
orient: orient
|
|
35195
35190
|
} = this.attribute,
|
|
35196
|
-
bounds =
|
|
35191
|
+
bounds = size ? {
|
|
35197
35192
|
x1: 0,
|
|
35198
35193
|
y1: 0,
|
|
35199
|
-
x2: width,
|
|
35200
|
-
y2: height
|
|
35194
|
+
x2: size.width,
|
|
35195
|
+
y2: size.height
|
|
35201
35196
|
} : {
|
|
35202
35197
|
x1: center.x - radius,
|
|
35203
35198
|
y1: center.y - radius,
|
|
@@ -40474,12 +40469,22 @@
|
|
|
40474
40469
|
pages = 1;
|
|
40475
40470
|
if (isHorizontal) compSize = maxWidth, contentWidth = maxWidth, contentHeight = this._itemHeight, comp = this._createScrollbar(compStyle, compSize), this._pagerComponent = comp, this._innerView.add(comp), this._updatePositionOfScrollbar(contentWidth, contentHeight, renderStartY);else {
|
|
40476
40471
|
if (compSize = maxHeight, comp = this._createScrollbar(compStyle, compSize), this._pagerComponent = comp, this._innerView.add(comp), contentHeight = maxHeight - renderStartY, contentWidth = this._itemMaxWidth, contentHeight <= 0) return this._innerView.removeChild(comp), !1;
|
|
40477
|
-
itemsContainer.getChildren()
|
|
40472
|
+
const items = itemsContainer.getChildren(),
|
|
40473
|
+
itemsHeightArr = items.map(item => item.attribute.height);
|
|
40474
|
+
if (1 === itemsHeightArr.length || itemsHeightArr.every(entry => entry === itemsHeightArr[0])) {
|
|
40475
|
+
const itemHeight = itemsHeightArr[0],
|
|
40476
|
+
maxContentHeight = contentHeight,
|
|
40477
|
+
pageItemsCount = Math.floor(maxContentHeight / (spaceRow + itemHeight));
|
|
40478
|
+
contentHeight = pageItemsCount * (spaceRow + itemHeight), pages = Math.ceil(items.length / pageItemsCount);
|
|
40479
|
+
} else items.forEach((item, index) => {
|
|
40478
40480
|
const {
|
|
40479
|
-
|
|
40480
|
-
|
|
40481
|
-
|
|
40482
|
-
|
|
40481
|
+
height: height
|
|
40482
|
+
} = item.attribute,
|
|
40483
|
+
prePages = pages,
|
|
40484
|
+
preStartY = startY;
|
|
40485
|
+
pages = Math.floor((startY + height) / contentHeight) + 1, startY += spaceRow + height, prePages !== pages && index === itemsContainer.getChildren().length - 1 && startY - contentHeight >= 1 / 3 * height && (contentHeight = preStartY + height, pages -= 1);
|
|
40486
|
+
});
|
|
40487
|
+
this._itemContext.totalPage = pages, this._itemContext.pages = pages, this._updatePositionOfScrollbar(contentWidth, contentHeight, renderStartY);
|
|
40483
40488
|
}
|
|
40484
40489
|
defaultCurrent > 1 && (isHorizontal ? itemsContainer.setAttribute("x", -(defaultCurrent - 1) * (contentWidth + spaceCol)) : itemsContainer.setAttribute("y", -(defaultCurrent - 1) * (contentHeight + spaceRow)));
|
|
40485
40490
|
const clipGroup = graphicCreator.group({
|
|
@@ -61574,7 +61579,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61574
61579
|
};
|
|
61575
61580
|
registerVChartCore();
|
|
61576
61581
|
|
|
61577
|
-
const version = "1.12.10
|
|
61582
|
+
const version = "1.12.10";
|
|
61578
61583
|
|
|
61579
61584
|
const addVChartProperty = (data, op) => {
|
|
61580
61585
|
const context = op.beforeCall();
|
|
@@ -65424,7 +65429,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65424
65429
|
].filter(isValid$1);
|
|
65425
65430
|
}
|
|
65426
65431
|
created() {
|
|
65427
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
65432
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
65428
65433
|
super.created();
|
|
65429
65434
|
this.setSeriesAndRegionsFromSpec();
|
|
65430
65435
|
this.initEvent();
|
|
@@ -65444,8 +65449,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65444
65449
|
if (isValid$1(this._spec.id)) {
|
|
65445
65450
|
axisMark.setUserId(this._spec.id);
|
|
65446
65451
|
}
|
|
65452
|
+
axisMark.setMarkConfig({ interactive: (_a = this._spec.interactive) !== null && _a !== void 0 ? _a : this.getDefaultInteractive() });
|
|
65447
65453
|
this._marks.addMark(axisMark);
|
|
65448
|
-
if ((
|
|
65454
|
+
if ((_b = this._spec.grid) === null || _b === void 0 ? void 0 : _b.visible) {
|
|
65449
65455
|
const gridMark = this._createMark({ type: 'component', name: `axis-${this.getOrient()}-grid` }, {
|
|
65450
65456
|
componentType: this.getOrient() === 'angle' ? GridEnum.circleAxisGrid : GridEnum.lineAxisGrid,
|
|
65451
65457
|
mode: this._spec.mode,
|
|
@@ -65454,24 +65460,21 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65454
65460
|
skipTheme: true
|
|
65455
65461
|
});
|
|
65456
65462
|
gridMark.setMarkConfig({
|
|
65457
|
-
zIndex: (
|
|
65463
|
+
zIndex: (_g = (_e = (_d = (_c = this._spec.grid) === null || _c === void 0 ? void 0 : _c.style) === null || _d === void 0 ? void 0 : _d.zIndex) !== null && _e !== void 0 ? _e : (_f = this._spec.grid) === null || _f === void 0 ? void 0 : _f.zIndex) !== null && _g !== void 0 ? _g : LayoutZIndex.Axis_Grid,
|
|
65458
65464
|
interactive: false
|
|
65459
65465
|
});
|
|
65460
65466
|
this._marks.addMark(gridMark);
|
|
65461
65467
|
this._gridMark = gridMark;
|
|
65462
65468
|
}
|
|
65463
|
-
if (isBoolean$1(this._spec.interactive)) {
|
|
65464
|
-
this._marks.forEach(m => m.setMarkConfig({ interactive: this._spec.interactive }));
|
|
65465
|
-
}
|
|
65466
65469
|
if (this._option.animation !== false &&
|
|
65467
65470
|
get$1(this._option.getChart().getSpec(), 'animation') !== false &&
|
|
65468
65471
|
this._spec.animation === true) {
|
|
65469
|
-
const axisAnimateConfig = animationConfig((
|
|
65470
|
-
appear: (
|
|
65471
|
-
disappear: (
|
|
65472
|
-
enter: (
|
|
65473
|
-
exit: (
|
|
65474
|
-
update: (
|
|
65472
|
+
const axisAnimateConfig = animationConfig((_h = Factory$1.getAnimationInKey('axis')) === null || _h === void 0 ? void 0 : _h(), {
|
|
65473
|
+
appear: (_k = (_j = this._spec.animationAppear) !== null && _j !== void 0 ? _j : get$1(this._option.getChart().getSpec(), 'animationAppear.axis')) !== null && _k !== void 0 ? _k : get$1(this._option.getChart().getSpec(), 'animationAppear'),
|
|
65474
|
+
disappear: (_m = (_l = this._spec.animationDisappear) !== null && _l !== void 0 ? _l : get$1(this._option.getChart().getSpec(), 'animationDisappear.axis')) !== null && _m !== void 0 ? _m : get$1(this._option.getChart().getSpec(), 'animationDisappear'),
|
|
65475
|
+
enter: (_p = (_o = this._spec.animationEnter) !== null && _o !== void 0 ? _o : get$1(this._option.getChart().getSpec(), 'animationEnter.axis')) !== null && _p !== void 0 ? _p : get$1(this._option.getChart().getSpec(), 'animationEnter'),
|
|
65476
|
+
exit: (_r = (_q = this._spec.animationExit) !== null && _q !== void 0 ? _q : get$1(this._option.getChart().getSpec(), 'animationExit.axis')) !== null && _r !== void 0 ? _r : get$1(this._option.getChart().getSpec(), 'animationExit'),
|
|
65477
|
+
update: (_t = (_s = this._spec.animationUpdate) !== null && _s !== void 0 ? _s : get$1(this._option.getChart().getSpec(), 'animationUpdate.axis')) !== null && _t !== void 0 ? _t : get$1(this._option.getChart().getSpec(), 'animationUpdate')
|
|
65475
65478
|
});
|
|
65476
65479
|
if (axisAnimateConfig.enter) {
|
|
65477
65480
|
axisAnimateConfig.update[0].customParameters = {
|
|
@@ -65880,6 +65883,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65880
65883
|
getOrient() {
|
|
65881
65884
|
return this._orient;
|
|
65882
65885
|
}
|
|
65886
|
+
getDefaultInteractive() {
|
|
65887
|
+
return true;
|
|
65888
|
+
}
|
|
65883
65889
|
set autoIndentOnce(v) {
|
|
65884
65890
|
this._autoIndentOnce = v;
|
|
65885
65891
|
}
|
|
@@ -75062,11 +75068,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
75062
75068
|
this._pieMarkName = "pie";
|
|
75063
75069
|
this._pieMarkType = "arc";
|
|
75064
75070
|
this.getCenter = () => {
|
|
75065
|
-
var _a, _b
|
|
75066
|
-
const
|
|
75071
|
+
var _a, _b;
|
|
75072
|
+
const layoutRect = this._region.getLayoutRect();
|
|
75067
75073
|
return {
|
|
75068
|
-
x: (
|
|
75069
|
-
y: (
|
|
75074
|
+
x: calcLayoutNumber((_a = this._spec) === null || _a === void 0 ? void 0 : _a.centerX, layoutRect.width, layoutRect, layoutRect.width / 2),
|
|
75075
|
+
y: calcLayoutNumber((_b = this._spec) === null || _b === void 0 ? void 0 : _b.centerY, layoutRect.height, layoutRect, layoutRect.height / 2)
|
|
75070
75076
|
};
|
|
75071
75077
|
};
|
|
75072
75078
|
this._startAngle = POLAR_START_RADIAN;
|
|
@@ -75620,6 +75626,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
75620
75626
|
getOrient() {
|
|
75621
75627
|
return this._orient;
|
|
75622
75628
|
}
|
|
75629
|
+
getDefaultInteractive() {
|
|
75630
|
+
return this._orient !== 'angle';
|
|
75631
|
+
}
|
|
75623
75632
|
getGroupScales() {
|
|
75624
75633
|
return this._groupScales;
|
|
75625
75634
|
}
|
|
@@ -75893,7 +75902,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
75893
75902
|
innerRadius, startAngle: this._startAngle, endAngle: this._endAngle, sides: ((_c = (_b = (_a = this._getRelatedAxis(this._option.radiusAxisIndex)) === null || _a === void 0 ? void 0 : _a.getSpec()) === null || _b === void 0 ? void 0 : _b.grid) === null || _c === void 0 ? void 0 : _c.smooth)
|
|
75894
75903
|
? undefined
|
|
75895
75904
|
: this.getScale().domain().length });
|
|
75896
|
-
const attrs = Object.assign(Object.assign(
|
|
75905
|
+
const attrs = Object.assign(Object.assign({}, commonAttrs), { size: this.getRefLayoutRect(), title: {
|
|
75897
75906
|
text: this._spec.title.text || this._dataFieldText
|
|
75898
75907
|
}, items, orient: 'angle' });
|
|
75899
75908
|
if (this._spec.grid.visible) {
|
|
@@ -90970,33 +90979,21 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
90970
90979
|
return;
|
|
90971
90980
|
}
|
|
90972
90981
|
const trigger = array((_a = this._spec.trigger) !== null && _a !== void 0 ? _a : 'hover');
|
|
90973
|
-
const triggerOff = array(this._spec.triggerOff);
|
|
90974
90982
|
const mode = this._option.mode;
|
|
90975
|
-
trigger.
|
|
90976
|
-
|
|
90977
|
-
|
|
90978
|
-
|
|
90979
|
-
this._mountEvent('
|
|
90980
|
-
if (isMobileLikeMode(mode) || isMiniAppLikeMode(mode)) {
|
|
90981
|
-
this._mountEvent('pointerdown', { source: 'chart' }, this._getMouseMoveHandler(false));
|
|
90982
|
-
this._mountEvent('pointerup', { source: 'window' }, this._getMouseOutHandler(true));
|
|
90983
|
-
}
|
|
90984
|
-
this._mountEvent('pointerleave', { source: 'chart' }, this._getMouseOutHandler(false));
|
|
90985
|
-
}
|
|
90986
|
-
else if (triggerType === 'click') {
|
|
90987
|
-
this._mountEvent('pointertap', { source: 'chart' }, this._getMouseMoveHandler(true));
|
|
90983
|
+
if (trigger.includes('hover')) {
|
|
90984
|
+
this._handleMouseMove = this._throttle(this._getMouseMoveHandler(false));
|
|
90985
|
+
this._mountEvent('pointermove', { source: 'chart' }, this._handleMouseMove);
|
|
90986
|
+
if (isMobileLikeMode(mode) || isMiniAppLikeMode(mode)) {
|
|
90987
|
+
this._mountEvent('pointerdown', { source: 'chart' }, this._getMouseMoveHandler(false));
|
|
90988
90988
|
this._mountEvent('pointerup', { source: 'window' }, this._getMouseOutHandler(true));
|
|
90989
90989
|
}
|
|
90990
|
-
|
|
90991
|
-
|
|
90992
|
-
|
|
90993
|
-
|
|
90994
|
-
|
|
90995
|
-
|
|
90996
|
-
|
|
90997
|
-
this._mountEvent(entry.eventType, { source: (_a = entry.source) !== null && _a !== void 0 ? _a : 'chart', consume: entry.consume }, this._getMouseOutHandler((_b = entry.checkOutside) !== null && _b !== void 0 ? _b : false));
|
|
90998
|
-
});
|
|
90999
|
-
if (!trigger.includes('click') && this._spec.lockAfterClick) {
|
|
90990
|
+
this._mountEvent('pointerleave', { source: 'chart' }, this._getMouseOutHandler(false));
|
|
90991
|
+
}
|
|
90992
|
+
if (trigger.includes('click')) {
|
|
90993
|
+
this._mountEvent('pointertap', { source: 'chart' }, this._getMouseMoveHandler(true));
|
|
90994
|
+
this._mountEvent('pointerup', { source: 'window' }, this._getMouseOutHandler(true));
|
|
90995
|
+
}
|
|
90996
|
+
else if (this._spec.lockAfterClick) {
|
|
91000
90997
|
this._mountEvent('pointertap', { source: 'chart' }, this._handleClickToLock);
|
|
91001
90998
|
}
|
|
91002
90999
|
}
|