@visactor/vchart 1.11.7-alpha.0 → 1.11.7-alpha.1
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 +108 -73
- 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/chart/stack.js +1 -2
- package/cjs/compile/grammar-item.js +2 -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 +2 -2
- package/cjs/core/vchart.js +25 -18
- package/cjs/core/vchart.js.map +1 -1
- package/cjs/layout/layout-item.d.ts +1 -1
- package/cjs/model/interface.d.ts +1 -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/chart/stack.js +1 -2
- package/esm/compile/grammar-item.js +2 -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 +2 -2
- package/esm/core/vchart.js +26 -19
- package/esm/core/vchart.js.map +1 -1
- package/esm/layout/layout-item.d.ts +1 -1
- package/esm/model/interface.d.ts +1 -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 +13 -13
- 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
|
}
|
|
@@ -61504,9 +61514,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61504
61514
|
return this.updateFullDataSync(data, reRender);
|
|
61505
61515
|
});
|
|
61506
61516
|
}
|
|
61507
|
-
updateSpec(spec, forceMerge = false, morphConfig) {
|
|
61517
|
+
updateSpec(spec, forceMerge = false, morphConfig, userUpdateOptions) {
|
|
61508
61518
|
return __awaiter$7(this, void 0, void 0, function* () {
|
|
61509
|
-
const result = this._updateSpec(spec, forceMerge);
|
|
61519
|
+
const result = this._updateSpec(spec, forceMerge, userUpdateOptions);
|
|
61510
61520
|
if (!result) {
|
|
61511
61521
|
return this;
|
|
61512
61522
|
}
|
|
@@ -61518,8 +61528,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61518
61528
|
return this;
|
|
61519
61529
|
});
|
|
61520
61530
|
}
|
|
61521
|
-
updateSpecSync(spec, forceMerge = false, morphConfig) {
|
|
61522
|
-
const result = this._updateSpec(spec, forceMerge);
|
|
61531
|
+
updateSpecSync(spec, forceMerge = false, morphConfig, userUpdateOptions) {
|
|
61532
|
+
const result = this._updateSpec(spec, forceMerge, userUpdateOptions);
|
|
61523
61533
|
if (!result) {
|
|
61524
61534
|
return this;
|
|
61525
61535
|
}
|
|
@@ -61534,7 +61544,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61534
61544
|
const result = this._updateSpec(spec, forceMerge);
|
|
61535
61545
|
return this._updateCustomConfigAndRecompile(result, Object.assign({ actionSource: 'updateSpecAndRecompile' }, option));
|
|
61536
61546
|
}
|
|
61537
|
-
_updateSpec(spec, forceMerge = false) {
|
|
61547
|
+
_updateSpec(spec, forceMerge = false, userUpdateOptions) {
|
|
61538
61548
|
var _a, _b;
|
|
61539
61549
|
const lastSpec = this._spec;
|
|
61540
61550
|
if (!this._setNewSpec(spec, forceMerge)) {
|
|
@@ -61555,13 +61565,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61555
61565
|
};
|
|
61556
61566
|
}
|
|
61557
61567
|
this._initChartSpec(this._spec, 'render');
|
|
61558
|
-
|
|
61568
|
+
const res = mergeUpdateResult(this._chart.updateSpec(this._spec), {
|
|
61559
61569
|
reTransformSpec: false,
|
|
61560
61570
|
change: reSize,
|
|
61561
61571
|
reMake: false,
|
|
61562
61572
|
reCompile: false,
|
|
61563
61573
|
reSize
|
|
61564
61574
|
});
|
|
61575
|
+
return userUpdateOptions
|
|
61576
|
+
? Object.assign(Object.assign({}, res), userUpdateOptions) : res;
|
|
61565
61577
|
}
|
|
61566
61578
|
updateModelSpec(filter, spec, forceMerge = false, morphConfig) {
|
|
61567
61579
|
return __awaiter$7(this, void 0, void 0, function* () {
|
|
@@ -61780,7 +61792,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61780
61792
|
return resize;
|
|
61781
61793
|
}
|
|
61782
61794
|
_getBackground() {
|
|
61783
|
-
const specBackground = typeof this._spec.background === 'string'
|
|
61795
|
+
const specBackground = typeof this._spec.background === 'string' || (isObject$2(this._spec.background) && this._spec.background.gradient)
|
|
61796
|
+
? this._spec.background
|
|
61797
|
+
: null;
|
|
61784
61798
|
return specBackground || this._currentTheme.background || this._option.background;
|
|
61785
61799
|
}
|
|
61786
61800
|
getCurrentTheme() {
|
|
@@ -66428,7 +66442,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
66428
66442
|
registerComponentPlugin(CanvasTooltipHandler);
|
|
66429
66443
|
};
|
|
66430
66444
|
|
|
66431
|
-
const version = "1.11.7-alpha.
|
|
66445
|
+
const version = "1.11.7-alpha.1";
|
|
66432
66446
|
|
|
66433
66447
|
const addVChartProperty = (data, op) => {
|
|
66434
66448
|
const context = op.beforeCall();
|
|
@@ -67704,7 +67718,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
67704
67718
|
result.reMake = true;
|
|
67705
67719
|
return result;
|
|
67706
67720
|
}
|
|
67707
|
-
ignoreCheckKeys =
|
|
67721
|
+
ignoreCheckKeys = Object.assign(Object.assign(Object.assign({}, defaultSeriesIgnoreCheckKeys), defaultSeriesCompileCheckKeys), ignoreCheckKeys);
|
|
67708
67722
|
ignoreCheckKeys.invalidType = true;
|
|
67709
67723
|
if (spec.invalidType !== prevSpec.invalidType) {
|
|
67710
67724
|
result.reCompile = true;
|
|
@@ -67727,14 +67741,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
67727
67741
|
})) {
|
|
67728
67742
|
result.reCompile = true;
|
|
67729
67743
|
}
|
|
67730
|
-
if (currentKeys.some(k => {
|
|
67731
|
-
|
|
67732
|
-
|
|
67733
|
-
|
|
67734
|
-
|
|
67735
|
-
|
|
67736
|
-
|
|
67737
|
-
return false;
|
|
67744
|
+
if (currentKeys.some((k) => {
|
|
67745
|
+
return defaultSeriesCompileCheckKeys[k] && !isEqual$1(spec[k], prevSpec[k]);
|
|
67746
|
+
})) {
|
|
67747
|
+
result.reCompile = true;
|
|
67748
|
+
}
|
|
67749
|
+
if (currentKeys.some((k) => {
|
|
67750
|
+
return !ignoreCheckKeys[k] && !isEqual$1(spec[k], prevSpec[k]);
|
|
67738
67751
|
})) {
|
|
67739
67752
|
result.reMake = true;
|
|
67740
67753
|
return result;
|
|
@@ -67762,6 +67775,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
67762
67775
|
if (this._tooltipHelper) {
|
|
67763
67776
|
this._tooltipHelper.updateTooltipSpec();
|
|
67764
67777
|
}
|
|
67778
|
+
const hasAnimation = isAnimationEnabledForSeries(this);
|
|
67779
|
+
if (hasAnimation) {
|
|
67780
|
+
this.initAnimation();
|
|
67781
|
+
}
|
|
67765
67782
|
}
|
|
67766
67783
|
onEvaluateEnd(ctx) {
|
|
67767
67784
|
this._data.updateData();
|
|
@@ -71767,7 +71784,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
71767
71784
|
this._transformer = new this.transformerConstructor(Object.assign(Object.assign({}, this._option), { type: this.type, seriesType: this.seriesType }));
|
|
71768
71785
|
this._chartData.parseData(this._spec.data);
|
|
71769
71786
|
this._createGlobalScale();
|
|
71770
|
-
this.
|
|
71787
|
+
this._createBackground();
|
|
71771
71788
|
this._createLayout();
|
|
71772
71789
|
this._transformer.forEachRegionInSpec(this._spec, this._createRegion.bind(this));
|
|
71773
71790
|
this._transformer.forEachSeriesInSpec(this._spec, this._createSeries.bind(this));
|
|
@@ -71804,17 +71821,20 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
71804
71821
|
this.setLayoutTag(true, null, reLayout);
|
|
71805
71822
|
}
|
|
71806
71823
|
_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 }));
|
|
71824
|
+
const bg = this._spec.background;
|
|
71825
|
+
if (!bg || typeof bg !== 'object' || isValid$1(bg.gradient)) {
|
|
71826
|
+
return;
|
|
71817
71827
|
}
|
|
71828
|
+
const backgroundStyle = pickWithout(bg, ['x', 'y', 'width', 'height', 'x1', 'y1', 'image']);
|
|
71829
|
+
backgroundStyle.background = bg.image;
|
|
71830
|
+
this._backgroundMark = Factory.createMark("group", 'chart-background', {
|
|
71831
|
+
model: this,
|
|
71832
|
+
map: this._option.map,
|
|
71833
|
+
getCompiler: this.getCompiler,
|
|
71834
|
+
globalScale: this._globalScale
|
|
71835
|
+
});
|
|
71836
|
+
this._backgroundMark.created();
|
|
71837
|
+
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
71838
|
}
|
|
71819
71839
|
_createRegion(constructor, specInfo) {
|
|
71820
71840
|
if (!constructor) {
|
|
@@ -78692,8 +78712,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
78692
78712
|
}
|
|
78693
78713
|
: {
|
|
78694
78714
|
channel: {
|
|
78695
|
-
innerRadius: { from, to: (datum, element) => element.
|
|
78696
|
-
outerRadius: { from, to: (datum, element) => element.
|
|
78715
|
+
innerRadius: { from, to: (datum, element) => { var _a; return (_a = element.getFinalGraphicAttributes()) === null || _a === void 0 ? void 0 : _a.innerRadius; } },
|
|
78716
|
+
outerRadius: { from, to: (datum, element) => { var _a; return (_a = element.getFinalGraphicAttributes()) === null || _a === void 0 ? void 0 : _a.outerRadius; } }
|
|
78697
78717
|
}
|
|
78698
78718
|
};
|
|
78699
78719
|
};
|
|
@@ -79459,6 +79479,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
79459
79479
|
}
|
|
79460
79480
|
this._toAngle = toAngle;
|
|
79461
79481
|
this._toRadius = toRadius;
|
|
79482
|
+
if (isClose(this._fromAngle, this._toAngle) && isClose(this._fromRadius, this._toRadius)) {
|
|
79483
|
+
this.valid = false;
|
|
79484
|
+
}
|
|
79462
79485
|
}
|
|
79463
79486
|
onUpdate(end, ratio, out) {
|
|
79464
79487
|
if (this.valid === false) {
|
|
@@ -79498,12 +79521,24 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
79498
79521
|
polarPointInterpolation(pointA, pointB, ratio) {
|
|
79499
79522
|
const polarPointA0 = this._pointToCoord(pointA);
|
|
79500
79523
|
const polarPointA1 = this._pointToCoord({ x: pointA.x1, y: pointA.y1 });
|
|
79501
|
-
|
|
79502
|
-
|
|
79524
|
+
let angleA0 = normalizeAngle$1(polarPointA0.angle);
|
|
79525
|
+
let angleA1 = normalizeAngle$1(polarPointA1.angle);
|
|
79503
79526
|
const polarPointB0 = this._pointToCoord(pointB);
|
|
79504
79527
|
const polarPointB1 = this._pointToCoord({ x: pointB.x1, y: pointB.y1 });
|
|
79505
|
-
|
|
79506
|
-
|
|
79528
|
+
let angleB0 = normalizeAngle$1(polarPointB0.angle);
|
|
79529
|
+
let angleB1 = normalizeAngle$1(polarPointB1.angle);
|
|
79530
|
+
if (!isValidNumber$1(angleA0) && isValidNumber$1(angleB0)) {
|
|
79531
|
+
angleA0 = angleB0;
|
|
79532
|
+
}
|
|
79533
|
+
if (isValidNumber$1(angleA0) && !isValidNumber$1(angleB0)) {
|
|
79534
|
+
angleB0 = angleA0;
|
|
79535
|
+
}
|
|
79536
|
+
if (!isValidNumber$1(angleA1) && isValidNumber$1(angleB1)) {
|
|
79537
|
+
angleA1 = angleB1;
|
|
79538
|
+
}
|
|
79539
|
+
if (isValidNumber$1(angleA1) && !isValidNumber$1(angleB1)) {
|
|
79540
|
+
angleB1 = angleA1;
|
|
79541
|
+
}
|
|
79507
79542
|
const angle0 = angleA0 + (angleB0 - angleA0) * ratio;
|
|
79508
79543
|
const radius0 = polarPointA0.radius + (polarPointB0.radius - polarPointA0.radius) * ratio;
|
|
79509
79544
|
const angle1 = angleA1 + (angleB1 - angleA1) * ratio;
|