@visactor/vchart 1.11.7-alpha.0 → 1.11.7-alpha.2
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 +119 -80
- package/build/index.min.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/animation/config.js +4 -1
- package/cjs/animation/config.js.map +1 -1
- package/cjs/chart/base/base-chart.js +6 -4
- package/cjs/chart/base/base-chart.js.map +1 -1
- package/cjs/component/tooltip/interface/theme.d.ts +2 -2
- package/cjs/component/tooltip/interface/theme.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/core/interface.d.ts +3 -2
- package/cjs/core/interface.js.map +1 -1
- package/cjs/core/vchart.d.ts +5 -5
- package/cjs/core/vchart.js +33 -25
- package/cjs/core/vchart.js.map +1 -1
- package/cjs/layout/layout-item.d.ts +1 -1
- package/cjs/model/interface.d.ts +4 -0
- package/cjs/model/interface.js.map +1 -1
- package/cjs/series/base/base-series.js +6 -6
- package/cjs/series/base/base-series.js.map +1 -1
- package/cjs/series/base/constant.d.ts +6 -0
- package/cjs/series/base/constant.js +12 -2
- package/cjs/series/base/constant.js.map +1 -1
- package/cjs/series/line/animation.js +7 -4
- package/cjs/series/line/animation.js.map +1 -1
- package/cjs/series/polar/animation.js +12 -3
- package/cjs/series/polar/animation.js.map +1 -1
- package/cjs/series/rose/animation.js +8 -2
- package/cjs/series/rose/animation.js.map +1 -1
- package/cjs/theme/interface.d.ts +2 -2
- package/cjs/theme/interface.js.map +1 -1
- package/cjs/typings/spec/common.d.ts +2 -2
- package/cjs/typings/spec/common.js.map +1 -1
- package/cjs/typings/visual.d.ts +2 -2
- package/cjs/typings/visual.js.map +1 -1
- package/cjs/util/spec/index.d.ts +0 -1
- package/cjs/util/spec/index.js +1 -1
- package/cjs/util/spec/index.js.map +1 -1
- package/esm/animation/config.js +4 -1
- package/esm/animation/config.js.map +1 -1
- package/esm/chart/base/base-chart.js +8 -6
- package/esm/chart/base/base-chart.js.map +1 -1
- package/esm/component/tooltip/interface/theme.d.ts +2 -2
- package/esm/component/tooltip/interface/theme.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/core/interface.d.ts +3 -2
- package/esm/core/interface.js.map +1 -1
- package/esm/core/vchart.d.ts +5 -5
- package/esm/core/vchart.js +34 -26
- package/esm/core/vchart.js.map +1 -1
- package/esm/layout/layout-item.d.ts +1 -1
- package/esm/model/interface.d.ts +4 -0
- package/esm/model/interface.js.map +1 -1
- package/esm/series/base/base-series.js +7 -6
- package/esm/series/base/base-series.js.map +1 -1
- package/esm/series/base/constant.d.ts +6 -0
- package/esm/series/base/constant.js +13 -0
- package/esm/series/base/constant.js.map +1 -1
- package/esm/series/line/animation.js +7 -4
- package/esm/series/line/animation.js.map +1 -1
- package/esm/series/polar/animation.js +10 -4
- package/esm/series/polar/animation.js.map +1 -1
- package/esm/series/rose/animation.js +8 -2
- package/esm/series/rose/animation.js.map +1 -1
- package/esm/theme/interface.d.ts +2 -2
- package/esm/theme/interface.js.map +1 -1
- package/esm/typings/spec/common.d.ts +2 -2
- package/esm/typings/spec/common.js.map +1 -1
- package/esm/typings/visual.d.ts +2 -2
- package/esm/typings/visual.js.map +1 -1
- package/esm/util/spec/index.d.ts +0 -1
- package/esm/util/spec/index.js +0 -2
- package/esm/util/spec/index.js.map +1 -1
- package/package.json +14 -14
- package/cjs/util/spec/background.d.ts +0 -4
- package/cjs/util/spec/background.js +0 -21
- package/cjs/util/spec/background.js.map +0 -1
- package/esm/util/spec/background.d.ts +0 -4
- package/esm/util/spec/background.js +0 -13
- package/esm/util/spec/background.js.map +0 -1
package/build/index.js
CHANGED
|
@@ -11819,7 +11819,9 @@
|
|
|
11819
11819
|
onFirstRun() {}
|
|
11820
11820
|
onStart() {}
|
|
11821
11821
|
onEnd() {}
|
|
11822
|
-
getEndProps() {
|
|
11822
|
+
getEndProps() {
|
|
11823
|
+
return this.to;
|
|
11824
|
+
}
|
|
11823
11825
|
getFromProps() {
|
|
11824
11826
|
return this.from;
|
|
11825
11827
|
}
|
|
@@ -12330,7 +12332,8 @@
|
|
|
12330
12332
|
}(Direction || (Direction = {}));
|
|
12331
12333
|
class TagPointsUpdate extends ACustomAnimate {
|
|
12332
12334
|
constructor(from, to, duration, easing, params) {
|
|
12333
|
-
|
|
12335
|
+
var _a, _b;
|
|
12336
|
+
super(from, to, duration, easing, params), this.newPointAnimateType = null !== (_a = null == params ? void 0 : params.newPointAnimateType) && void 0 !== _a ? _a : "grow", this.clipRangeByDimension = null !== (_b = null == params ? void 0 : params.clipRangeByDimension) && void 0 !== _b ? _b : "x";
|
|
12334
12337
|
}
|
|
12335
12338
|
onBind() {
|
|
12336
12339
|
var _a, _b;
|
|
@@ -12353,10 +12356,11 @@
|
|
|
12353
12356
|
lastMatchedIndex = i, lastMatchedPoint = tagMap.get(this.toPoints[i].context);
|
|
12354
12357
|
break;
|
|
12355
12358
|
}
|
|
12359
|
+
"clip" === this.newPointAnimateType && 0 !== this.toPoints.length && (Number.isFinite(lastMatchedIndex) ? (this.clipRange = this.toPoints[lastMatchedIndex][this.clipRangeByDimension] / this.toPoints[this.toPoints.length - 1][this.clipRangeByDimension], isValidNumber$1(this.clipRange) ? this.clipRange = clamp$1(this.clipRange, 0, 1) : this.clipRange = 0) : this.clipRange = 0);
|
|
12356
12360
|
let prevMatchedPoint = this.toPoints[0];
|
|
12357
12361
|
this.interpolatePoints = this.toPoints.map((point, index) => {
|
|
12358
12362
|
const matchedPoint = tagMap.get(point.context);
|
|
12359
|
-
return matchedPoint ? (prevMatchedPoint = matchedPoint, [matchedPoint, point]) : "appear" === this.newPointAnimateType ? [point, point] : index < firstMatchedIndex && firstMatchedPoint ? [firstMatchedPoint, point] : index > lastMatchedIndex && lastMatchedPoint ? [lastMatchedPoint, point] : [prevMatchedPoint, point];
|
|
12363
|
+
return matchedPoint ? (prevMatchedPoint = matchedPoint, [matchedPoint, point]) : "appear" === this.newPointAnimateType || "clip" === this.newPointAnimateType ? [point, point] : index < firstMatchedIndex && firstMatchedPoint ? [firstMatchedPoint, point] : index > lastMatchedIndex && lastMatchedPoint ? [lastMatchedPoint, point] : [prevMatchedPoint, point];
|
|
12360
12364
|
}), this.points = this.interpolatePoints.map(interpolate => {
|
|
12361
12365
|
const fromPoint = interpolate[0],
|
|
12362
12366
|
toPoint = interpolate[1],
|
|
@@ -12368,7 +12372,7 @@
|
|
|
12368
12372
|
this.points = this.points.map((point, index) => {
|
|
12369
12373
|
const newPoint = pointInterpolation(this.interpolatePoints[index][0], this.interpolatePoints[index][1], ratio);
|
|
12370
12374
|
return newPoint.context = point.context, newPoint;
|
|
12371
|
-
}), out.points = this.points;
|
|
12375
|
+
}), this.clipRange && (out.clipRange = this.clipRange + (1 - this.clipRange) * ratio), out.points = this.points;
|
|
12372
12376
|
}
|
|
12373
12377
|
}
|
|
12374
12378
|
class ClipGraphicAnimate extends ACustomAnimate {
|
|
@@ -20849,7 +20853,7 @@
|
|
|
20849
20853
|
} else startP = points[0], endP = points[points.length - 1];
|
|
20850
20854
|
const xTotalLength = abs$1(endP.x - startP.x),
|
|
20851
20855
|
yTotalLength = abs$1(endP.y - startP.y);
|
|
20852
|
-
direction = Number.isFinite(xTotalLength + yTotalLength) ? xTotalLength > yTotalLength ? Direction$1.ROW : Direction$1.COLUMN : Direction$1.ROW, drawAreaSegments(context.camera ? context : context.nativeContext, cache, clipRange, {
|
|
20856
|
+
direction = null == endP.x1 ? Direction$1.ROW : null == endP.y1 ? Direction$1.COLUMN : Number.isFinite(xTotalLength + yTotalLength) ? xTotalLength > yTotalLength ? Direction$1.ROW : Direction$1.COLUMN : Direction$1.ROW, drawAreaSegments(context.camera ? context : context.nativeContext, cache, clipRange, {
|
|
20853
20857
|
offsetX: offsetX,
|
|
20854
20858
|
offsetY: offsetY,
|
|
20855
20859
|
offsetZ: offsetZ,
|
|
@@ -51576,7 +51580,7 @@
|
|
|
51576
51580
|
};
|
|
51577
51581
|
return points.forEach(point => {
|
|
51578
51582
|
center.x += point.x, center.y += point.y;
|
|
51579
|
-
}), center.x /= points.length, center.y /= points.length, options && options.center && (isValidNumber$1(options.center.x) && (center.x = options.center.x), isValidNumber$1(options.center.y) && (center.y = options.center.y)), "area" === element.mark.markType && (center.x1 = center.x, center.y1 = center.y), points.map(
|
|
51583
|
+
}), center.x /= points.length, center.y /= points.length, options && options.center && (isValidNumber$1(options.center.x) && (center.x = options.center.x), isValidNumber$1(options.center.y) && (center.y = options.center.y)), "area" === element.mark.markType && (center.x1 = center.x, center.y1 = center.y), points.map(point => Object.assign({}, point, center));
|
|
51580
51584
|
};
|
|
51581
51585
|
const growPointsIn = (element, options, animationParameters) => ({
|
|
51582
51586
|
from: {
|
|
@@ -51598,21 +51602,21 @@
|
|
|
51598
51602
|
var _a;
|
|
51599
51603
|
if (options && "negative" === options.orient) {
|
|
51600
51604
|
let groupRight = animationParameters.width;
|
|
51601
|
-
return animationParameters.group && (groupRight = null !== (_a = animationParameters.groupWidth) && void 0 !== _a ? _a : animationParameters.group.getBounds().width(), animationParameters.groupWidth = groupRight), {
|
|
51605
|
+
return animationParameters.group && (groupRight = null !== (_a = animationParameters.groupWidth) && void 0 !== _a ? _a : animationParameters.group.getBounds().width(), animationParameters.groupWidth = groupRight), Object.assign(Object.assign({}, point), {
|
|
51602
51606
|
x: groupRight,
|
|
51603
51607
|
y: point.y,
|
|
51604
51608
|
x1: groupRight,
|
|
51605
51609
|
y1: point.y1,
|
|
51606
51610
|
defined: !1 !== point.defined
|
|
51607
|
-
};
|
|
51611
|
+
});
|
|
51608
51612
|
}
|
|
51609
|
-
return {
|
|
51613
|
+
return Object.assign(Object.assign({}, point), {
|
|
51610
51614
|
x: 0,
|
|
51611
51615
|
y: point.y,
|
|
51612
51616
|
x1: 0,
|
|
51613
51617
|
y1: point.y1,
|
|
51614
51618
|
defined: !1 !== point.defined
|
|
51615
|
-
};
|
|
51619
|
+
});
|
|
51616
51620
|
});
|
|
51617
51621
|
const growPointsXIn = (element, options, animationParameters) => ({
|
|
51618
51622
|
from: {
|
|
@@ -51634,21 +51638,21 @@
|
|
|
51634
51638
|
var _a;
|
|
51635
51639
|
if (options && "negative" === options.orient) {
|
|
51636
51640
|
let groupBottom = animationParameters.height;
|
|
51637
|
-
return animationParameters.group && (groupBottom = null !== (_a = animationParameters.groupHeight) && void 0 !== _a ? _a : animationParameters.group.getBounds().height(), animationParameters.groupHeight = groupBottom), {
|
|
51641
|
+
return animationParameters.group && (groupBottom = null !== (_a = animationParameters.groupHeight) && void 0 !== _a ? _a : animationParameters.group.getBounds().height(), animationParameters.groupHeight = groupBottom), Object.assign(Object.assign({}, point), {
|
|
51638
51642
|
x: point.x,
|
|
51639
51643
|
y: groupBottom,
|
|
51640
51644
|
x1: point.x1,
|
|
51641
51645
|
y1: groupBottom,
|
|
51642
51646
|
defined: !1 !== point.defined
|
|
51643
|
-
};
|
|
51647
|
+
});
|
|
51644
51648
|
}
|
|
51645
|
-
return {
|
|
51649
|
+
return Object.assign(Object.assign({}, point), {
|
|
51646
51650
|
x: point.x,
|
|
51647
51651
|
y: 0,
|
|
51648
51652
|
x1: point.x1,
|
|
51649
51653
|
y1: 0,
|
|
51650
51654
|
defined: !1 !== point.defined
|
|
51651
|
-
};
|
|
51655
|
+
});
|
|
51652
51656
|
});
|
|
51653
51657
|
const growPointsYIn = (element, options, animationParameters) => ({
|
|
51654
51658
|
from: {
|
|
@@ -52228,6 +52232,17 @@
|
|
|
52228
52232
|
const RECT_X1 = `${PREFIX}_rect_x1`;
|
|
52229
52233
|
const RECT_Y = `${PREFIX}_rect_y`;
|
|
52230
52234
|
const RECT_Y1 = `${PREFIX}_rect_y1`;
|
|
52235
|
+
const defaultSeriesIgnoreCheckKeys = {
|
|
52236
|
+
data: true
|
|
52237
|
+
};
|
|
52238
|
+
const defaultSeriesCompileCheckKeys = {
|
|
52239
|
+
animation: true,
|
|
52240
|
+
animationAppear: true,
|
|
52241
|
+
animationEnter: true,
|
|
52242
|
+
animationUpdate: true,
|
|
52243
|
+
animationExit: true,
|
|
52244
|
+
animationNormal: true
|
|
52245
|
+
};
|
|
52231
52246
|
|
|
52232
52247
|
const barSeriesMark = Object.assign(Object.assign({}, baseSeriesMark), { ["bar"]: { name: "bar", type: "rect" }, ["barBackground"]: { name: "barBackground", type: "rect" } });
|
|
52233
52248
|
const bar3dSeriesMark = Object.assign(Object.assign({}, baseSeriesMark), { ["bar3d"]: { name: "bar3d", type: "rect3d" } });
|
|
@@ -54903,24 +54918,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
54903
54918
|
return {};
|
|
54904
54919
|
}
|
|
54905
54920
|
|
|
54906
|
-
function convertBackgroundSpec(bg) {
|
|
54907
|
-
if (!bg) {
|
|
54908
|
-
return null;
|
|
54909
|
-
}
|
|
54910
|
-
if (typeof bg === 'string') {
|
|
54911
|
-
return {
|
|
54912
|
-
fill: bg,
|
|
54913
|
-
fillOpacity: 1
|
|
54914
|
-
};
|
|
54915
|
-
}
|
|
54916
|
-
if (typeof bg !== 'object') {
|
|
54917
|
-
return null;
|
|
54918
|
-
}
|
|
54919
|
-
const result = pickWithout(bg, ['x', 'y', 'width', 'height', 'x1', 'y1', 'image']);
|
|
54920
|
-
result.background = bg.image;
|
|
54921
|
-
return result;
|
|
54922
|
-
}
|
|
54923
|
-
|
|
54924
54921
|
function specTransform(spec, special = {
|
|
54925
54922
|
data: v => v
|
|
54926
54923
|
}) {
|
|
@@ -60628,8 +60625,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
60628
60625
|
Factory.registerMark(GroupMark.type, GroupMark);
|
|
60629
60626
|
};
|
|
60630
60627
|
|
|
60631
|
-
const Appear_ClipIn = {
|
|
60632
|
-
|
|
60628
|
+
const Appear_ClipIn = (params) => {
|
|
60629
|
+
return {
|
|
60630
|
+
type: 'clipIn',
|
|
60631
|
+
options: {
|
|
60632
|
+
clipDimension: params.direction === "horizontal" ? 'y' : 'x'
|
|
60633
|
+
}
|
|
60634
|
+
};
|
|
60633
60635
|
};
|
|
60634
60636
|
const Appear_FadeIn$8 = {
|
|
60635
60637
|
type: 'fadeIn'
|
|
@@ -60649,7 +60651,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
60649
60651
|
case 'fadeIn':
|
|
60650
60652
|
return Appear_FadeIn$8;
|
|
60651
60653
|
default:
|
|
60652
|
-
return Appear_ClipIn;
|
|
60654
|
+
return Appear_ClipIn(params);
|
|
60653
60655
|
}
|
|
60654
60656
|
}
|
|
60655
60657
|
|
|
@@ -60740,7 +60742,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
60740
60742
|
channel: ['points'],
|
|
60741
60743
|
custom: TagPointsUpdate,
|
|
60742
60744
|
duration: DEFAULT_ANIMATION_CONFIG.update.duration,
|
|
60743
|
-
easing: DEFAULT_ANIMATION_CONFIG.update.easing
|
|
60745
|
+
easing: DEFAULT_ANIMATION_CONFIG.update.easing,
|
|
60746
|
+
customParameters: {
|
|
60747
|
+
clipRangeByDimension: params.direction === "horizontal" ? 'y' : 'x'
|
|
60748
|
+
}
|
|
60744
60749
|
}
|
|
60745
60750
|
],
|
|
60746
60751
|
disappear: { type: 'clipOut' }
|
|
@@ -61259,6 +61264,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61259
61264
|
if (isFunction$1(updateSpecResult)) {
|
|
61260
61265
|
updateSpecResult = updateSpecResult();
|
|
61261
61266
|
}
|
|
61267
|
+
if (updateSpecResult.reAnimate) {
|
|
61268
|
+
this.stopAnimation();
|
|
61269
|
+
this._updateAnimateState(true);
|
|
61270
|
+
}
|
|
61262
61271
|
this._reCompile(updateSpecResult);
|
|
61263
61272
|
if (sync) {
|
|
61264
61273
|
return this._renderSync(option);
|
|
@@ -61364,16 +61373,17 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61364
61373
|
return this._renderSync(option);
|
|
61365
61374
|
});
|
|
61366
61375
|
}
|
|
61367
|
-
_updateAnimateState() {
|
|
61376
|
+
_updateAnimateState(initial) {
|
|
61368
61377
|
var _a, _b;
|
|
61369
61378
|
if (this._option.animation) {
|
|
61379
|
+
const animationState = initial ? AnimationStateEnum.appear : AnimationStateEnum.update;
|
|
61370
61380
|
(_a = this._chart) === null || _a === void 0 ? void 0 : _a.getAllRegions().forEach(region => {
|
|
61371
61381
|
var _a;
|
|
61372
|
-
(_a = region.animate) === null || _a === void 0 ? void 0 : _a.updateAnimateState(
|
|
61382
|
+
(_a = region.animate) === null || _a === void 0 ? void 0 : _a.updateAnimateState(animationState, true);
|
|
61373
61383
|
});
|
|
61374
61384
|
(_b = this._chart) === null || _b === void 0 ? void 0 : _b.getAllComponents().forEach(component => {
|
|
61375
61385
|
var _a;
|
|
61376
|
-
(_a = component.animate) === null || _a === void 0 ? void 0 : _a.updateAnimateState(
|
|
61386
|
+
(_a = component.animate) === null || _a === void 0 ? void 0 : _a.updateAnimateState(animationState, true);
|
|
61377
61387
|
});
|
|
61378
61388
|
}
|
|
61379
61389
|
}
|
|
@@ -61406,19 +61416,19 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61406
61416
|
this._isReleased = true;
|
|
61407
61417
|
InstanceManager.unregisterInstance(this);
|
|
61408
61418
|
}
|
|
61409
|
-
updateData(id, data,
|
|
61419
|
+
updateData(id, data, parserOptions, userUpdateOptions) {
|
|
61410
61420
|
return __awaiter$7(this, void 0, void 0, function* () {
|
|
61411
|
-
return this.updateDataSync(id, data,
|
|
61421
|
+
return this.updateDataSync(id, data, parserOptions, userUpdateOptions);
|
|
61412
61422
|
});
|
|
61413
61423
|
}
|
|
61414
|
-
_updateDataById(id, data,
|
|
61424
|
+
_updateDataById(id, data, parserOptions) {
|
|
61415
61425
|
const preDV = this._spec.data.find((dv) => dv.name === id || dv.id === id);
|
|
61416
61426
|
if (preDV) {
|
|
61417
61427
|
if (preDV.id === id) {
|
|
61418
61428
|
preDV.values = data;
|
|
61419
61429
|
}
|
|
61420
61430
|
else if (preDV.name === id) {
|
|
61421
|
-
preDV.parse(data,
|
|
61431
|
+
preDV.parse(data, parserOptions);
|
|
61422
61432
|
}
|
|
61423
61433
|
}
|
|
61424
61434
|
else {
|
|
@@ -61450,17 +61460,21 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61450
61460
|
return this;
|
|
61451
61461
|
});
|
|
61452
61462
|
}
|
|
61453
|
-
updateDataSync(id, data,
|
|
61463
|
+
updateDataSync(id, data, parserOptions, userUpdateOptions) {
|
|
61454
61464
|
if (isNil$1(this._dataSet)) {
|
|
61455
61465
|
return this;
|
|
61456
61466
|
}
|
|
61457
61467
|
if (this._chart) {
|
|
61458
|
-
|
|
61468
|
+
if (userUpdateOptions === null || userUpdateOptions === void 0 ? void 0 : userUpdateOptions.reAnimate) {
|
|
61469
|
+
this.stopAnimation();
|
|
61470
|
+
this._updateAnimateState(true);
|
|
61471
|
+
}
|
|
61472
|
+
this._chart.updateData(id, data, true, parserOptions);
|
|
61459
61473
|
this._compiler.render();
|
|
61460
61474
|
return this;
|
|
61461
61475
|
}
|
|
61462
61476
|
this._spec.data = array(this._spec.data);
|
|
61463
|
-
this._updateDataById(id, data,
|
|
61477
|
+
this._updateDataById(id, data, parserOptions);
|
|
61464
61478
|
return this;
|
|
61465
61479
|
}
|
|
61466
61480
|
updateFullDataSync(data, reRender = true) {
|
|
@@ -61504,9 +61518,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61504
61518
|
return this.updateFullDataSync(data, reRender);
|
|
61505
61519
|
});
|
|
61506
61520
|
}
|
|
61507
|
-
updateSpec(spec, forceMerge = false, morphConfig) {
|
|
61521
|
+
updateSpec(spec, forceMerge = false, morphConfig, userUpdateOptions) {
|
|
61508
61522
|
return __awaiter$7(this, void 0, void 0, function* () {
|
|
61509
|
-
const result = this._updateSpec(spec, forceMerge);
|
|
61523
|
+
const result = this._updateSpec(spec, forceMerge, userUpdateOptions);
|
|
61510
61524
|
if (!result) {
|
|
61511
61525
|
return this;
|
|
61512
61526
|
}
|
|
@@ -61518,8 +61532,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61518
61532
|
return this;
|
|
61519
61533
|
});
|
|
61520
61534
|
}
|
|
61521
|
-
updateSpecSync(spec, forceMerge = false, morphConfig) {
|
|
61522
|
-
const result = this._updateSpec(spec, forceMerge);
|
|
61535
|
+
updateSpecSync(spec, forceMerge = false, morphConfig, userUpdateOptions) {
|
|
61536
|
+
const result = this._updateSpec(spec, forceMerge, userUpdateOptions);
|
|
61523
61537
|
if (!result) {
|
|
61524
61538
|
return this;
|
|
61525
61539
|
}
|
|
@@ -61534,7 +61548,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61534
61548
|
const result = this._updateSpec(spec, forceMerge);
|
|
61535
61549
|
return this._updateCustomConfigAndRecompile(result, Object.assign({ actionSource: 'updateSpecAndRecompile' }, option));
|
|
61536
61550
|
}
|
|
61537
|
-
_updateSpec(spec, forceMerge = false) {
|
|
61551
|
+
_updateSpec(spec, forceMerge = false, userUpdateOptions) {
|
|
61538
61552
|
var _a, _b;
|
|
61539
61553
|
const lastSpec = this._spec;
|
|
61540
61554
|
if (!this._setNewSpec(spec, forceMerge)) {
|
|
@@ -61555,13 +61569,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61555
61569
|
};
|
|
61556
61570
|
}
|
|
61557
61571
|
this._initChartSpec(this._spec, 'render');
|
|
61558
|
-
|
|
61572
|
+
const res = mergeUpdateResult(this._chart.updateSpec(this._spec), {
|
|
61559
61573
|
reTransformSpec: false,
|
|
61560
61574
|
change: reSize,
|
|
61561
61575
|
reMake: false,
|
|
61562
61576
|
reCompile: false,
|
|
61563
61577
|
reSize
|
|
61564
61578
|
});
|
|
61579
|
+
return userUpdateOptions
|
|
61580
|
+
? Object.assign(Object.assign({}, res), userUpdateOptions) : res;
|
|
61565
61581
|
}
|
|
61566
61582
|
updateModelSpec(filter, spec, forceMerge = false, morphConfig) {
|
|
61567
61583
|
return __awaiter$7(this, void 0, void 0, function* () {
|
|
@@ -61780,7 +61796,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61780
61796
|
return resize;
|
|
61781
61797
|
}
|
|
61782
61798
|
_getBackground() {
|
|
61783
|
-
const specBackground = typeof this._spec.background === 'string'
|
|
61799
|
+
const specBackground = typeof this._spec.background === 'string' || (isObject$2(this._spec.background) && this._spec.background.gradient)
|
|
61800
|
+
? this._spec.background
|
|
61801
|
+
: null;
|
|
61784
61802
|
return specBackground || this._currentTheme.background || this._option.background;
|
|
61785
61803
|
}
|
|
61786
61804
|
getCurrentTheme() {
|
|
@@ -66428,7 +66446,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
66428
66446
|
registerComponentPlugin(CanvasTooltipHandler);
|
|
66429
66447
|
};
|
|
66430
66448
|
|
|
66431
|
-
const version = "1.11.7-alpha.
|
|
66449
|
+
const version = "1.11.7-alpha.2";
|
|
66432
66450
|
|
|
66433
66451
|
const addVChartProperty = (data, op) => {
|
|
66434
66452
|
const context = op.beforeCall();
|
|
@@ -67704,7 +67722,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
67704
67722
|
result.reMake = true;
|
|
67705
67723
|
return result;
|
|
67706
67724
|
}
|
|
67707
|
-
ignoreCheckKeys =
|
|
67725
|
+
ignoreCheckKeys = Object.assign(Object.assign(Object.assign({}, defaultSeriesIgnoreCheckKeys), defaultSeriesCompileCheckKeys), ignoreCheckKeys);
|
|
67708
67726
|
ignoreCheckKeys.invalidType = true;
|
|
67709
67727
|
if (spec.invalidType !== prevSpec.invalidType) {
|
|
67710
67728
|
result.reCompile = true;
|
|
@@ -67727,14 +67745,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
67727
67745
|
})) {
|
|
67728
67746
|
result.reCompile = true;
|
|
67729
67747
|
}
|
|
67730
|
-
if (currentKeys.some(k => {
|
|
67731
|
-
|
|
67732
|
-
|
|
67733
|
-
|
|
67734
|
-
|
|
67735
|
-
|
|
67736
|
-
|
|
67737
|
-
return false;
|
|
67748
|
+
if (currentKeys.some((k) => {
|
|
67749
|
+
return defaultSeriesCompileCheckKeys[k] && !isEqual$1(spec[k], prevSpec[k]);
|
|
67750
|
+
})) {
|
|
67751
|
+
result.reCompile = true;
|
|
67752
|
+
}
|
|
67753
|
+
if (currentKeys.some((k) => {
|
|
67754
|
+
return !ignoreCheckKeys[k] && !isEqual$1(spec[k], prevSpec[k]);
|
|
67738
67755
|
})) {
|
|
67739
67756
|
result.reMake = true;
|
|
67740
67757
|
return result;
|
|
@@ -67762,6 +67779,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
67762
67779
|
if (this._tooltipHelper) {
|
|
67763
67780
|
this._tooltipHelper.updateTooltipSpec();
|
|
67764
67781
|
}
|
|
67782
|
+
const hasAnimation = isAnimationEnabledForSeries(this);
|
|
67783
|
+
if (hasAnimation) {
|
|
67784
|
+
this.initAnimation();
|
|
67785
|
+
}
|
|
67765
67786
|
}
|
|
67766
67787
|
onEvaluateEnd(ctx) {
|
|
67767
67788
|
this._data.updateData();
|
|
@@ -71767,7 +71788,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
71767
71788
|
this._transformer = new this.transformerConstructor(Object.assign(Object.assign({}, this._option), { type: this.type, seriesType: this.seriesType }));
|
|
71768
71789
|
this._chartData.parseData(this._spec.data);
|
|
71769
71790
|
this._createGlobalScale();
|
|
71770
|
-
this.
|
|
71791
|
+
this._createBackground();
|
|
71771
71792
|
this._createLayout();
|
|
71772
71793
|
this._transformer.forEachRegionInSpec(this._spec, this._createRegion.bind(this));
|
|
71773
71794
|
this._transformer.forEachSeriesInSpec(this._spec, this._createSeries.bind(this));
|
|
@@ -71804,17 +71825,20 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
71804
71825
|
this.setLayoutTag(true, null, reLayout);
|
|
71805
71826
|
}
|
|
71806
71827
|
_createBackground() {
|
|
71807
|
-
const
|
|
71808
|
-
if (
|
|
71809
|
-
|
|
71810
|
-
model: this,
|
|
71811
|
-
map: this._option.map,
|
|
71812
|
-
getCompiler: this.getCompiler,
|
|
71813
|
-
globalScale: this._globalScale
|
|
71814
|
-
});
|
|
71815
|
-
this._backgroundMark.created();
|
|
71816
|
-
this._backgroundMark.setStyle(Object.assign(Object.assign({}, backgroundStyle), { x: () => this._viewBox.x1, y: () => this._viewBox.y1, width: () => this._viewBox.x2 - this._viewBox.x1, height: () => this._viewBox.y2 - this._viewBox.y1 }));
|
|
71828
|
+
const bg = this._spec.background;
|
|
71829
|
+
if (!bg || typeof bg !== 'object' || isValid$1(bg.gradient)) {
|
|
71830
|
+
return;
|
|
71817
71831
|
}
|
|
71832
|
+
const backgroundStyle = pickWithout(bg, ['x', 'y', 'width', 'height', 'x1', 'y1', 'image']);
|
|
71833
|
+
backgroundStyle.background = bg.image;
|
|
71834
|
+
this._backgroundMark = Factory.createMark("group", 'chart-background', {
|
|
71835
|
+
model: this,
|
|
71836
|
+
map: this._option.map,
|
|
71837
|
+
getCompiler: this.getCompiler,
|
|
71838
|
+
globalScale: this._globalScale
|
|
71839
|
+
});
|
|
71840
|
+
this._backgroundMark.created();
|
|
71841
|
+
this._backgroundMark.setStyle(Object.assign(Object.assign({}, backgroundStyle), { x: () => this._viewBox.x1, y: () => this._viewBox.y1, width: () => this._viewBox.x2 - this._viewBox.x1, height: () => this._viewBox.y2 - this._viewBox.y1 }));
|
|
71818
71842
|
}
|
|
71819
71843
|
_createRegion(constructor, specInfo) {
|
|
71820
71844
|
if (!constructor) {
|
|
@@ -78692,8 +78716,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
78692
78716
|
}
|
|
78693
78717
|
: {
|
|
78694
78718
|
channel: {
|
|
78695
|
-
innerRadius: { from, to: (datum, element) => element.
|
|
78696
|
-
outerRadius: { from, to: (datum, element) => element.
|
|
78719
|
+
innerRadius: { from, to: (datum, element) => { var _a; return (_a = element.getFinalGraphicAttributes()) === null || _a === void 0 ? void 0 : _a.innerRadius; } },
|
|
78720
|
+
outerRadius: { from, to: (datum, element) => { var _a; return (_a = element.getFinalGraphicAttributes()) === null || _a === void 0 ? void 0 : _a.outerRadius; } }
|
|
78697
78721
|
}
|
|
78698
78722
|
};
|
|
78699
78723
|
};
|
|
@@ -79459,6 +79483,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
79459
79483
|
}
|
|
79460
79484
|
this._toAngle = toAngle;
|
|
79461
79485
|
this._toRadius = toRadius;
|
|
79486
|
+
if (isClose(this._fromAngle, this._toAngle) && isClose(this._fromRadius, this._toRadius)) {
|
|
79487
|
+
this.valid = false;
|
|
79488
|
+
}
|
|
79462
79489
|
}
|
|
79463
79490
|
onUpdate(end, ratio, out) {
|
|
79464
79491
|
if (this.valid === false) {
|
|
@@ -79498,12 +79525,24 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
79498
79525
|
polarPointInterpolation(pointA, pointB, ratio) {
|
|
79499
79526
|
const polarPointA0 = this._pointToCoord(pointA);
|
|
79500
79527
|
const polarPointA1 = this._pointToCoord({ x: pointA.x1, y: pointA.y1 });
|
|
79501
|
-
|
|
79502
|
-
|
|
79528
|
+
let angleA0 = normalizeAngle$1(polarPointA0.angle);
|
|
79529
|
+
let angleA1 = normalizeAngle$1(polarPointA1.angle);
|
|
79503
79530
|
const polarPointB0 = this._pointToCoord(pointB);
|
|
79504
79531
|
const polarPointB1 = this._pointToCoord({ x: pointB.x1, y: pointB.y1 });
|
|
79505
|
-
|
|
79506
|
-
|
|
79532
|
+
let angleB0 = normalizeAngle$1(polarPointB0.angle);
|
|
79533
|
+
let angleB1 = normalizeAngle$1(polarPointB1.angle);
|
|
79534
|
+
if (!isValidNumber$1(angleA0) && isValidNumber$1(angleB0)) {
|
|
79535
|
+
angleA0 = angleB0;
|
|
79536
|
+
}
|
|
79537
|
+
if (isValidNumber$1(angleA0) && !isValidNumber$1(angleB0)) {
|
|
79538
|
+
angleB0 = angleA0;
|
|
79539
|
+
}
|
|
79540
|
+
if (!isValidNumber$1(angleA1) && isValidNumber$1(angleB1)) {
|
|
79541
|
+
angleA1 = angleB1;
|
|
79542
|
+
}
|
|
79543
|
+
if (isValidNumber$1(angleA1) && !isValidNumber$1(angleB1)) {
|
|
79544
|
+
angleB1 = angleA1;
|
|
79545
|
+
}
|
|
79507
79546
|
const angle0 = angleA0 + (angleB0 - angleA0) * ratio;
|
|
79508
79547
|
const radius0 = polarPointA0.radius + (polarPointB0.radius - polarPointA0.radius) * ratio;
|
|
79509
79548
|
const angle1 = angleA1 + (angleB1 - angleA1) * ratio;
|