@visactor/vchart 2.0.2 → 2.0.3-alpha.0
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.es.js +412 -435
- package/build/index.js +411 -435
- package/build/index.min.js +2 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/animation/animate-manager.d.ts +1 -0
- package/cjs/animation/animate-manager.js +2 -0
- package/cjs/animation/animate-manager.js.map +1 -0
- package/cjs/animation/index.js +1 -2
- package/cjs/animation/interface.js +2 -1
- package/cjs/chart/base/base-chart.d.ts +0 -1
- package/cjs/chart/base/base-chart.js +8 -5
- package/cjs/chart/base/base-chart.js.map +1 -1
- package/cjs/chart/interface/chart.d.ts +0 -1
- package/cjs/chart/interface/chart.js.map +1 -1
- package/cjs/chart/util.js +1 -2
- package/cjs/compile/compiler.d.ts +0 -1
- package/cjs/compile/compiler.js +5 -13
- package/cjs/compile/compiler.js.map +1 -1
- package/cjs/compile/interface/compilable-item.d.ts +0 -1
- package/cjs/compile/interface/compilable-item.js.map +1 -1
- package/cjs/compile/interface/compiler.d.ts +0 -5
- package/cjs/compile/interface/compiler.js.map +1 -1
- package/cjs/component/axis/base-axis.js.map +1 -1
- package/cjs/component/axis/cartesian/band-axis.d.ts +0 -8
- package/cjs/component/axis/cartesian/band-axis.js +0 -9
- package/cjs/component/axis/cartesian/band-axis.js.map +1 -1
- package/cjs/component/axis/interface/common.js.map +1 -1
- package/cjs/component/axis/mixin/band-axis-mixin.d.ts +0 -2
- package/cjs/component/axis/mixin/band-axis-mixin.js +1 -15
- package/cjs/component/axis/mixin/band-axis-mixin.js.map +1 -1
- package/cjs/component/brush/brush.js +6 -6
- package/cjs/component/brush/brush.js.map +1 -1
- package/cjs/component/brush/interface.d.ts +0 -1
- package/cjs/component/brush/interface.js.map +1 -1
- package/cjs/component/crosshair/base.d.ts +1 -1
- package/cjs/component/crosshair/base.js +1 -1
- package/cjs/component/crosshair/base.js.map +1 -1
- package/cjs/component/crosshair/utils/cartesian.js +2 -2
- package/cjs/component/crosshair/utils/cartesian.js.map +1 -1
- package/cjs/component/data-zoom/data-filter-base-component.d.ts +1 -0
- package/cjs/component/data-zoom/data-filter-base-component.js +19 -13
- package/cjs/component/data-zoom/data-filter-base-component.js.map +1 -1
- package/cjs/component/data-zoom/interface.d.ts +3 -0
- package/cjs/component/data-zoom/interface.js.map +1 -1
- package/cjs/component/data-zoom/util.d.ts +1 -0
- package/cjs/component/data-zoom/util.js +4 -3
- package/cjs/component/data-zoom/util.js.map +1 -1
- package/cjs/component/player/player.js +1 -2
- package/cjs/component/player/player.js.map +1 -1
- package/cjs/component/tooltip/tooltip.js +3 -8
- package/cjs/component/tooltip/tooltip.js.map +1 -1
- package/cjs/constant/attribute.js +2 -1
- package/cjs/constant/sunburst.js +1 -2
- package/cjs/constant/waterfall.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/core/util.js +1 -1
- package/cjs/core/vchart.d.ts +0 -1
- package/cjs/core/vchart.js +17 -36
- package/cjs/core/vchart.js.map +1 -1
- package/cjs/data/transforms/obj-flat.js +4 -1
- package/cjs/data/transforms/obj-flat.js.map +1 -1
- package/cjs/mark/base/base-mark.d.ts +2 -6
- package/cjs/mark/base/base-mark.js +51 -69
- package/cjs/mark/base/base-mark.js.map +1 -1
- package/cjs/mark/group.d.ts +2 -3
- package/cjs/mark/group.js +13 -15
- package/cjs/mark/group.js.map +1 -1
- package/cjs/mark/interface/common.d.ts +2 -5
- package/cjs/mark/interface/common.js.map +1 -1
- package/cjs/model/base-model.d.ts +1 -5
- package/cjs/model/base-model.js +0 -7
- package/cjs/model/base-model.js.map +1 -1
- package/cjs/model/interface.d.ts +1 -4
- package/cjs/model/interface.js.map +1 -1
- package/cjs/plugin/components/tooltip-handler/utils/style.js +4 -4
- package/cjs/plugin/components/tooltip-handler/utils/style.js.map +1 -1
- package/cjs/region/region.js.map +1 -1
- package/cjs/series/base/base-series.js +3 -2
- package/cjs/series/base/base-series.js.map +1 -1
- package/cjs/series/dot/dot.d.ts +1 -0
- package/cjs/series/dot/dot.js +29 -6
- package/cjs/series/dot/dot.js.map +1 -1
- package/cjs/series/dot/interface.d.ts +1 -0
- package/cjs/series/dot/interface.js.map +1 -1
- package/cjs/series/dot/tooltip-helper.js +3 -2
- package/cjs/series/dot/tooltip-helper.js.map +1 -1
- package/cjs/series/funnel/funnel.js +2 -0
- package/cjs/series/funnel/funnel.js.map +1 -1
- package/cjs/series/interface/type.d.ts +3 -0
- package/cjs/series/interface/type.js +5 -3
- package/cjs/series/interface/type.js.map +1 -1
- package/cjs/series/link/constant.js +8 -0
- package/cjs/series/link/constant.js.map +1 -1
- package/cjs/series/link/interface.d.ts +10 -1
- package/cjs/series/link/interface.js +5 -1
- package/cjs/series/link/interface.js.map +1 -1
- package/cjs/series/link/link.d.ts +3 -1
- package/cjs/series/link/link.js +46 -16
- package/cjs/series/link/link.js.map +1 -1
- package/cjs/series/map/map.js +2 -1
- package/cjs/series/map/map.js.map +1 -1
- package/cjs/series/pie/pie.js +1 -0
- package/cjs/series/pie/pie.js.map +1 -1
- package/cjs/util/mark.d.ts +0 -1
- package/cjs/util/mark.js +1 -10
- package/cjs/util/mark.js.map +1 -1
- package/esm/animation/animate-manager.d.ts +1 -0
- package/esm/animation/animate-manager.js +2 -0
- package/esm/animation/animate-manager.js.map +1 -0
- package/esm/animation/index.js +1 -2
- package/esm/animation/interface.js +2 -1
- package/esm/chart/base/base-chart.d.ts +0 -1
- package/esm/chart/base/base-chart.js +8 -5
- package/esm/chart/base/base-chart.js.map +1 -1
- package/esm/chart/interface/chart.d.ts +0 -1
- package/esm/chart/interface/chart.js.map +1 -1
- package/esm/chart/util.js +1 -2
- package/esm/compile/compiler.d.ts +0 -1
- package/esm/compile/compiler.js +6 -13
- package/esm/compile/compiler.js.map +1 -1
- package/esm/compile/interface/compilable-item.d.ts +0 -1
- package/esm/compile/interface/compilable-item.js.map +1 -1
- package/esm/compile/interface/compiler.d.ts +0 -5
- package/esm/compile/interface/compiler.js.map +1 -1
- package/esm/component/axis/base-axis.js.map +1 -1
- package/esm/component/axis/cartesian/band-axis.d.ts +0 -8
- package/esm/component/axis/cartesian/band-axis.js +1 -9
- package/esm/component/axis/cartesian/band-axis.js.map +1 -1
- package/esm/component/axis/interface/common.js.map +1 -1
- package/esm/component/axis/mixin/band-axis-mixin.d.ts +0 -2
- package/esm/component/axis/mixin/band-axis-mixin.js +1 -15
- package/esm/component/axis/mixin/band-axis-mixin.js.map +1 -1
- package/esm/component/brush/brush.js +6 -6
- package/esm/component/brush/brush.js.map +1 -1
- package/esm/component/brush/interface.d.ts +0 -1
- package/esm/component/brush/interface.js.map +1 -1
- package/esm/component/crosshair/base.d.ts +1 -1
- package/esm/component/crosshair/base.js +1 -1
- package/esm/component/crosshair/base.js.map +1 -1
- package/esm/component/crosshair/utils/cartesian.js +2 -2
- package/esm/component/crosshair/utils/cartesian.js.map +1 -1
- package/esm/component/data-zoom/data-filter-base-component.d.ts +1 -0
- package/esm/component/data-zoom/data-filter-base-component.js +18 -13
- package/esm/component/data-zoom/data-filter-base-component.js.map +1 -1
- package/esm/component/data-zoom/interface.d.ts +3 -0
- package/esm/component/data-zoom/interface.js.map +1 -1
- package/esm/component/data-zoom/util.d.ts +1 -0
- package/esm/component/data-zoom/util.js +5 -2
- package/esm/component/data-zoom/util.js.map +1 -1
- package/esm/component/player/player.js +1 -2
- package/esm/component/player/player.js.map +1 -1
- package/esm/component/tooltip/tooltip.js +3 -8
- package/esm/component/tooltip/tooltip.js.map +1 -1
- package/esm/constant/attribute.js +2 -1
- package/esm/constant/sunburst.js +1 -2
- package/esm/constant/waterfall.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/core/util.js +1 -1
- package/esm/core/vchart.d.ts +0 -1
- package/esm/core/vchart.js +16 -35
- package/esm/core/vchart.js.map +1 -1
- package/esm/data/transforms/obj-flat.js +4 -1
- package/esm/data/transforms/obj-flat.js.map +1 -1
- package/esm/mark/base/base-mark.d.ts +2 -6
- package/esm/mark/base/base-mark.js +50 -69
- package/esm/mark/base/base-mark.js.map +1 -1
- package/esm/mark/group.d.ts +2 -3
- package/esm/mark/group.js +12 -18
- package/esm/mark/group.js.map +1 -1
- package/esm/mark/interface/common.d.ts +2 -5
- package/esm/mark/interface/common.js.map +1 -1
- package/esm/model/base-model.d.ts +1 -5
- package/esm/model/base-model.js +0 -7
- package/esm/model/base-model.js.map +1 -1
- package/esm/model/interface.d.ts +1 -4
- package/esm/model/interface.js.map +1 -1
- package/esm/plugin/components/tooltip-handler/utils/style.js +4 -5
- package/esm/plugin/components/tooltip-handler/utils/style.js.map +1 -1
- package/esm/region/region.js.map +1 -1
- package/esm/series/base/base-series.js +3 -2
- package/esm/series/base/base-series.js.map +1 -1
- package/esm/series/dot/dot.d.ts +1 -0
- package/esm/series/dot/dot.js +29 -6
- package/esm/series/dot/dot.js.map +1 -1
- package/esm/series/dot/interface.d.ts +1 -0
- package/esm/series/dot/interface.js.map +1 -1
- package/esm/series/dot/tooltip-helper.js +3 -2
- package/esm/series/dot/tooltip-helper.js.map +1 -1
- package/esm/series/funnel/funnel.js +2 -0
- package/esm/series/funnel/funnel.js.map +1 -1
- package/esm/series/interface/type.d.ts +3 -0
- package/esm/series/interface/type.js +5 -3
- package/esm/series/interface/type.js.map +1 -1
- package/esm/series/link/constant.js +8 -0
- package/esm/series/link/constant.js.map +1 -1
- package/esm/series/link/interface.d.ts +10 -1
- package/esm/series/link/interface.js +5 -1
- package/esm/series/link/interface.js.map +1 -1
- package/esm/series/link/link.d.ts +3 -1
- package/esm/series/link/link.js +48 -16
- package/esm/series/link/link.js.map +1 -1
- package/esm/series/map/map.js +2 -1
- package/esm/series/map/map.js.map +1 -1
- package/esm/series/pie/pie.js +1 -0
- package/esm/series/pie/pie.js.map +1 -1
- package/esm/util/mark.d.ts +0 -1
- package/esm/util/mark.js +0 -7
- package/esm/util/mark.js.map +1 -1
- package/package.json +8 -8
package/build/index.js
CHANGED
|
@@ -14173,9 +14173,9 @@
|
|
|
14173
14173
|
setWidthHeightWithoutTransform(aabbBounds) {
|
|
14174
14174
|
this.widthWithoutTransform = aabbBounds.x2 - aabbBounds.x1, this.heightWithoutTransform = aabbBounds.y2 - aabbBounds.y1;
|
|
14175
14175
|
}
|
|
14176
|
-
setAttributesAndPreventAnimate(params, forceUpdateTag = !1, context
|
|
14176
|
+
setAttributesAndPreventAnimate(params, forceUpdateTag = !1, context) {
|
|
14177
14177
|
this.setAttributes(params, forceUpdateTag, context), this.animates && this.animates.forEach(animate => {
|
|
14178
|
-
|
|
14178
|
+
Object.keys(params).forEach(key => {
|
|
14179
14179
|
animate.preventAttr(key);
|
|
14180
14180
|
});
|
|
14181
14181
|
});
|
|
@@ -14346,7 +14346,7 @@
|
|
|
14346
14346
|
});
|
|
14347
14347
|
} else this.stopStateAnimates(), this.setAttributesAndPreventAnimate(attrs, !1, {
|
|
14348
14348
|
type: AttributeUpdateType.STATE
|
|
14349
|
-
})
|
|
14349
|
+
});
|
|
14350
14350
|
this._emitCustomEvent("afterStateUpdate", {
|
|
14351
14351
|
type: AttributeUpdateType.STATE
|
|
14352
14352
|
});
|
|
@@ -14739,7 +14739,7 @@
|
|
|
14739
14739
|
}
|
|
14740
14740
|
removeChild(child) {
|
|
14741
14741
|
const data = super.removeChild(child);
|
|
14742
|
-
return this.getGraphicService().onRemove(child),
|
|
14742
|
+
return child.stage = null, this.getGraphicService().onRemove(child), this.addUpdateBoundTag(), data;
|
|
14743
14743
|
}
|
|
14744
14744
|
removeAllChild(deep = !1) {
|
|
14745
14745
|
this.forEachChildren(child => {
|
|
@@ -17753,10 +17753,9 @@
|
|
|
17753
17753
|
return super.needUpdateTag(key, POLYGON_UPDATE_TAG_KEY);
|
|
17754
17754
|
}
|
|
17755
17755
|
toCustomPath() {
|
|
17756
|
-
|
|
17757
|
-
|
|
17758
|
-
|
|
17759
|
-
return path = new CustomPath2D(), points.forEach((point, index) => {
|
|
17756
|
+
const points = this.attribute.points,
|
|
17757
|
+
path = new CustomPath2D();
|
|
17758
|
+
return points.forEach((point, index) => {
|
|
17760
17759
|
0 === index ? path.moveTo(point.x, point.y) : path.lineTo(point.x, point.y);
|
|
17761
17760
|
}), path.closePath(), path;
|
|
17762
17761
|
}
|
|
@@ -21021,7 +21020,6 @@
|
|
|
21021
21020
|
drawContext.updateBounds ? this.useDirtyBounds = !0 : this.useDirtyBounds = !drawContext.stage.params.optimize.disableCheckGraphicWidthOutRange;
|
|
21022
21021
|
}
|
|
21023
21022
|
draw(renderService, drawContext) {
|
|
21024
|
-
var _a;
|
|
21025
21023
|
this.prepareForDraw(renderService, drawContext), drawContext.drawContribution = this, this.currentRenderMap = this.styleRenderMap.get(drawContext.renderStyle) || this.defaultRenderMap, this.currentRenderService = renderService;
|
|
21026
21024
|
const {
|
|
21027
21025
|
context: context,
|
|
@@ -21036,7 +21034,7 @@
|
|
|
21036
21034
|
dirtyBounds.x1 = Math.floor(b.x1), dirtyBounds.y1 = Math.floor(b.y1), dirtyBounds.x2 = Math.ceil(b.x2), dirtyBounds.y2 = Math.ceil(b.y2);
|
|
21037
21035
|
}
|
|
21038
21036
|
const d = context.dpr % 1;
|
|
21039
|
-
(d || .5 !== d) && (dirtyBounds.x1 = Math.floor(dirtyBounds.x1 * context.dpr) / context.dpr, dirtyBounds.y1 = Math.floor(dirtyBounds.y1 * context.dpr) / context.dpr, dirtyBounds.x2 = Math.ceil(dirtyBounds.x2 * context.dpr) / context.dpr, dirtyBounds.y2 = Math.ceil(dirtyBounds.y2 * context.dpr) / context.dpr), this.backupDirtyBounds.copy(dirtyBounds), context.reset(!1), context.save(), context.setClearMatrix(transMatrix.a, transMatrix.b, transMatrix.c, transMatrix.d, transMatrix.e, transMatrix.f), context.clearMatrix(!1), context.translate(viewBox.x1, viewBox.y1, !0), context.beginPath(), context.rect(dirtyBounds.x1, dirtyBounds.y1, dirtyBounds.width(), dirtyBounds.height()), context.clip(), stage.camera && (this.dirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0), this.backupDirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0)), this.clearScreen(renderService, context, drawContext),
|
|
21037
|
+
(d || .5 !== d) && (dirtyBounds.x1 = Math.floor(dirtyBounds.x1 * context.dpr) / context.dpr, dirtyBounds.y1 = Math.floor(dirtyBounds.y1 * context.dpr) / context.dpr, dirtyBounds.x2 = Math.ceil(dirtyBounds.x2 * context.dpr) / context.dpr, dirtyBounds.y2 = Math.ceil(dirtyBounds.y2 * context.dpr) / context.dpr), this.backupDirtyBounds.copy(dirtyBounds), context.reset(!1), context.save(), context.setClearMatrix(transMatrix.a, transMatrix.b, transMatrix.c, transMatrix.d, transMatrix.e, transMatrix.f), context.clearMatrix(!1), context.translate(viewBox.x1, viewBox.y1, !0), context.beginPath(), context.rect(dirtyBounds.x1, dirtyBounds.y1, dirtyBounds.width(), dirtyBounds.height()), context.clip(), stage.camera && (this.dirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0), this.backupDirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0)), this.clearScreen(renderService, context, drawContext), renderService.renderTreeRoots.sort((a, b) => {
|
|
21040
21038
|
var _a, _b;
|
|
21041
21039
|
return (null !== (_a = a.attribute.zIndex) && void 0 !== _a ? _a : DefaultAttribute.zIndex) - (null !== (_b = b.attribute.zIndex) && void 0 !== _b ? _b : DefaultAttribute.zIndex);
|
|
21042
21040
|
}).forEach(group => {
|
|
@@ -21172,7 +21170,7 @@
|
|
|
21172
21170
|
return data || this.currentRenderMap.get(type) || this.defaultRenderMap.get(type);
|
|
21173
21171
|
}
|
|
21174
21172
|
clearScreen(renderService, context, drawContext) {
|
|
21175
|
-
var _a, _b
|
|
21173
|
+
var _a, _b;
|
|
21176
21174
|
const {
|
|
21177
21175
|
clear: clear,
|
|
21178
21176
|
viewBox: viewBox
|
|
@@ -21180,9 +21178,9 @@
|
|
|
21180
21178
|
width = viewBox.width(),
|
|
21181
21179
|
height = viewBox.height();
|
|
21182
21180
|
if (clear) {
|
|
21183
|
-
context.clearRect(0, 0, width, height)
|
|
21184
|
-
const stage = null === (
|
|
21185
|
-
if (stage && (context.globalAlpha = null !== (
|
|
21181
|
+
context.clearRect(0, 0, width, height);
|
|
21182
|
+
const stage = null === (_a = renderService.drawParams) || void 0 === _a ? void 0 : _a.stage;
|
|
21183
|
+
if (stage && (context.globalAlpha = null !== (_b = stage.attribute.opacity) && void 0 !== _b ? _b : 1), stage && stage.backgroundImg && stage.resources) {
|
|
21186
21184
|
const res = stage.resources.get(clear);
|
|
21187
21185
|
res && "success" === res.state && res.data && context.drawImage(res.data, 0, 0, width, height);
|
|
21188
21186
|
} else context.fillStyle = createColor(context, clear, {
|
|
@@ -21710,19 +21708,13 @@
|
|
|
21710
21708
|
} else this._skipRender = 1;
|
|
21711
21709
|
}, this.beforeRender = stage => {
|
|
21712
21710
|
this._beforeRender && this._beforeRender(stage);
|
|
21713
|
-
}, this.afterClearScreen = drawParams => {
|
|
21714
|
-
this._afterClearScreen && this._afterClearScreen(drawParams);
|
|
21715
|
-
}, this.afterClearRect = drawParams => {
|
|
21716
|
-
this._afterClearRect && this._afterClearRect(drawParams);
|
|
21717
21711
|
}, this.afterRender = stage => {
|
|
21718
21712
|
this.renderCount++, this._afterRender && this._afterRender(stage), this._afterNextRenderCbs && this._afterNextRenderCbs.forEach(cb => cb(stage)), this._afterNextRenderCbs = null, this.tickedBeforeRender = !1;
|
|
21719
21713
|
}, this.afterTickCb = () => {
|
|
21720
21714
|
this.tickedBeforeRender = !0, "rendering" !== this.state && this.renderNextFrame();
|
|
21721
21715
|
}, this.params = params, this.theme = new Theme(), this.hooks = {
|
|
21722
21716
|
beforeRender: new SyncHook(["stage"]),
|
|
21723
|
-
afterRender: new SyncHook(["stage"])
|
|
21724
|
-
afterClearScreen: new SyncHook(["stage"]),
|
|
21725
|
-
afterClearRect: new SyncHook(["stage"])
|
|
21717
|
+
afterRender: new SyncHook(["stage"])
|
|
21726
21718
|
}, this.global = application.global, !this.global.env && isBrowserEnv() && this.global.setEnv("browser"), this.window = container.get(VWindow), this.renderService = container.get(RenderService), this.pluginService = container.get(PluginService), this.layerService = container.get(LayerService), this.graphicService = container.get(GraphicService), this.pluginService.active(this, params), this.window.create({
|
|
21727
21719
|
width: params.width,
|
|
21728
21720
|
height: params.height,
|
|
@@ -21734,7 +21726,7 @@
|
|
|
21734
21726
|
canvas: params.canvas
|
|
21735
21727
|
}), this.state = "normal", this.renderCount = 0, this.tryInitEventSystem(), this._background = null !== (_a = params.background) && void 0 !== _a ? _a : DefaultConfig.BACKGROUND, this.appendChild(this.layerService.createLayer(this, {
|
|
21736
21728
|
main: !0
|
|
21737
|
-
})), this.nextFrameRenderLayerSet = new Set(), this.willNextFrameRender = !1, this.stage = this, this.renderStyle = params.renderStyle, params.autoRender && this.enableAutoRender(), params.autoRefresh && this.enableAutoRefresh(), !1 === params.disableDirtyBounds && this.enableDirtyBounds(), params.enableHtmlAttribute && this.enableHtmlAttribute(params.enableHtmlAttribute), params.ReactDOM && this.enableReactAttribute(params.ReactDOM), params.enableLayout && this.enableLayout(), this.hooks.beforeRender.tap("constructor", this.beforeRender), this.hooks.afterRender.tap("constructor", this.afterRender), this.
|
|
21729
|
+
})), this.nextFrameRenderLayerSet = new Set(), this.willNextFrameRender = !1, this.stage = this, this.renderStyle = params.renderStyle, params.autoRender && this.enableAutoRender(), params.autoRefresh && this.enableAutoRefresh(), !1 === params.disableDirtyBounds && this.enableDirtyBounds(), params.enableHtmlAttribute && this.enableHtmlAttribute(params.enableHtmlAttribute), params.ReactDOM && this.enableReactAttribute(params.ReactDOM), params.enableLayout && this.enableLayout(), this.hooks.beforeRender.tap("constructor", this.beforeRender), this.hooks.afterRender.tap("constructor", this.afterRender), this._beforeRender = params.beforeRender, this._afterRender = params.afterRender, this.supportInteractiveLayer = !1 !== params.interactiveLayer, params.optimize || (params.optimize = {
|
|
21738
21730
|
tickRenderMode: "effect"
|
|
21739
21731
|
}), this.optmize(params.optimize), params.background && isString$1(this._background) && this._background.includes("/") && this.setAttributes({
|
|
21740
21732
|
background: this._background
|
|
@@ -22129,7 +22121,7 @@
|
|
|
22129
22121
|
return this._cursor;
|
|
22130
22122
|
}
|
|
22131
22123
|
eventPointTransform(e) {
|
|
22132
|
-
const point = this.global.mapToCanvasPoint(e, this.window);
|
|
22124
|
+
const point = this.global.mapToCanvasPoint(e, this.window.getContext().canvas.nativeCanvas);
|
|
22133
22125
|
return this.stage.window.pointTransform(point.x, point.y);
|
|
22134
22126
|
}
|
|
22135
22127
|
pauseTriggerEvent() {
|
|
@@ -31742,7 +31734,7 @@
|
|
|
31742
31734
|
return this._animateCount;
|
|
31743
31735
|
}
|
|
31744
31736
|
constructor() {
|
|
31745
|
-
super(), this.head = null, this.tail = null, this.animateMap = new Map(), this._animateCount = 0, this._playSpeed = 1, this._totalDuration = 0, this._startTime = 0, this._currentTime = 0, this.
|
|
31737
|
+
super(), this.head = null, this.tail = null, this.animateMap = new Map(), this._animateCount = 0, this._playSpeed = 1, this._totalDuration = 0, this._startTime = 0, this._currentTime = 0, this.id = Generator.GenAutoIncrementId(), this.paused = !1;
|
|
31746
31738
|
}
|
|
31747
31739
|
isRunning() {
|
|
31748
31740
|
return !this.paused && this._animateCount > 0;
|
|
@@ -31771,11 +31763,10 @@
|
|
|
31771
31763
|
}
|
|
31772
31764
|
tick(delta) {
|
|
31773
31765
|
if (this.paused) return;
|
|
31774
|
-
this._animationEndFlag && (this._animationEndFlag = !1, this.emit("animationStart"));
|
|
31775
31766
|
const scaledDelta = delta * this._playSpeed;
|
|
31776
31767
|
this._currentTime += scaledDelta, this.forEachAccessAnimate((animate, i) => {
|
|
31777
31768
|
animate.status === AnimateStatus.END ? this.removeAnimate(animate, !0) : animate.status !== AnimateStatus.RUNNING && animate.status !== AnimateStatus.INITIAL || animate.advance(scaledDelta);
|
|
31778
|
-
}), 0 === this._animateCount &&
|
|
31769
|
+
}), 0 === this._animateCount && this.emit("animationEnd");
|
|
31779
31770
|
}
|
|
31780
31771
|
clear() {
|
|
31781
31772
|
this.forEachAccessAnimate(animate => {
|
|
@@ -31839,9 +31830,7 @@
|
|
|
31839
31830
|
return this._timeline;
|
|
31840
31831
|
}
|
|
31841
31832
|
bind(target) {
|
|
31842
|
-
return this.target = target, this.target.
|
|
31843
|
-
this.stop(), this.target.animates.delete(this.id);
|
|
31844
|
-
}), this.target.onAnimateBind && !this.slience && this.target.onAnimateBind(this), this.target.animationAttribute || (this.target.animationAttribute = {}), this;
|
|
31833
|
+
return this.target = target, this.target.onAnimateBind && !this.slience && this.target.onAnimateBind(this), this.target.animationAttribute || (this.target.animationAttribute = {}), this;
|
|
31845
31834
|
}
|
|
31846
31835
|
to(props, duration = 300, easing = "linear") {
|
|
31847
31836
|
const step = new Step(AnimateStepType.to, props, duration, easing);
|
|
@@ -32055,8 +32044,8 @@
|
|
|
32055
32044
|
}
|
|
32056
32045
|
init() {
|
|
32057
32046
|
this.interval = 16, this.status = STATUS$1.INITIAL, application.global.hooks.onSetEnv.tap("graph-ticker", () => {
|
|
32058
|
-
this.initHandler(
|
|
32059
|
-
}), application.global.env && this.initHandler(
|
|
32047
|
+
this.initHandler();
|
|
32048
|
+
}), application.global.env && this.initHandler();
|
|
32060
32049
|
}
|
|
32061
32050
|
addTimeline(timeline) {
|
|
32062
32051
|
this.timelines.push(timeline);
|
|
@@ -32067,11 +32056,10 @@
|
|
|
32067
32056
|
getTimelines() {
|
|
32068
32057
|
return this.timelines;
|
|
32069
32058
|
}
|
|
32070
|
-
initHandler(
|
|
32071
|
-
this.setupTickHandler(
|
|
32059
|
+
initHandler() {
|
|
32060
|
+
this.setupTickHandler();
|
|
32072
32061
|
}
|
|
32073
|
-
setupTickHandler(
|
|
32074
|
-
if (!force && this.tickerHandler) return !0;
|
|
32062
|
+
setupTickHandler() {
|
|
32075
32063
|
const handler = new RAFTickHandler();
|
|
32076
32064
|
return this.tickerHandler && this.tickerHandler.release(), this.tickerHandler = handler, !0;
|
|
32077
32065
|
}
|
|
@@ -32122,7 +32110,7 @@
|
|
|
32122
32110
|
return this.status = STATUS$1.RUNNING, this.tickerHandler.tick(0, this.handleTick), !0;
|
|
32123
32111
|
}
|
|
32124
32112
|
stop() {
|
|
32125
|
-
this.status = STATUS$1.INITIAL, this.setupTickHandler(
|
|
32113
|
+
this.status = STATUS$1.INITIAL, this.setupTickHandler(), this.lastFrameTime = -1;
|
|
32126
32114
|
}
|
|
32127
32115
|
trySyncTickStatus() {
|
|
32128
32116
|
this.status === STATUS$1.INITIAL && this.timelines.some(timeline => timeline.isRunning()) ? this.start() : this.status === STATUS$1.RUNNING && this.timelines.every(timeline => !timeline.isRunning()) && this.stop();
|
|
@@ -32132,8 +32120,7 @@
|
|
|
32132
32120
|
this.stop(), this.timelines = [], null === (_a = this.tickerHandler) || void 0 === _a || _a.release(), this.tickerHandler = null, this.lastFrameTime = -1;
|
|
32133
32121
|
}
|
|
32134
32122
|
checkSkip(delta) {
|
|
32135
|
-
|
|
32136
|
-
if ("performance" === (null === (_c = null === (_b = null === (_a = this.stage) || void 0 === _a ? void 0 : _a.params) || void 0 === _b ? void 0 : _b.optimize) || void 0 === _c ? void 0 : _c.tickRenderMode)) return !1;
|
|
32123
|
+
if ("performance" === this.stage.params.optimize.tickRenderMode) return !1;
|
|
32137
32124
|
return delta < this.interval + 2 * (Math.random() - .5) * this._jitter;
|
|
32138
32125
|
}
|
|
32139
32126
|
}
|
|
@@ -32431,11 +32418,10 @@
|
|
|
32431
32418
|
_handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic) {
|
|
32432
32419
|
var _a, _b, _c, _d;
|
|
32433
32420
|
if (custom && customType) {
|
|
32434
|
-
const customParams =
|
|
32421
|
+
const customParams = this.resolveValue(customParameters, graphic, {
|
|
32435
32422
|
width: graphic.stage.width,
|
|
32436
|
-
height: graphic.stage.height
|
|
32437
|
-
|
|
32438
|
-
}, this.resolveValue(customParameters, graphic)),
|
|
32423
|
+
height: graphic.stage.height
|
|
32424
|
+
}),
|
|
32439
32425
|
objOptions = isFunction$1(options) ? options.call(null, null !== (_b = customParams && (null === (_a = customParams.data) || void 0 === _a ? void 0 : _a[0])) && void 0 !== _b ? _b : null === (_d = null === (_c = graphic.context) || void 0 === _c ? void 0 : _c.data) || void 0 === _d ? void 0 : _d[0], graphic, customParams) : options;
|
|
32440
32426
|
customParams.options = objOptions, customParams.controlOptions = controlOptions, 1 === customType ? this.createCustomAnimation(animate, custom, from, props, duration, easing, customParams) : 2 === customType && this.createCustomInterpolatorAnimation(animate, custom, props, duration, easing, customParams);
|
|
32441
32427
|
} else "to" === type ? animate.to(props, duration, easing) : "from" === type && animate.from(props, duration, easing);
|
|
@@ -32653,14 +32639,6 @@
|
|
|
32653
32639
|
state.executor.stop();
|
|
32654
32640
|
}), this.stateList = null;
|
|
32655
32641
|
}
|
|
32656
|
-
reApplyState(state) {
|
|
32657
|
-
var _a;
|
|
32658
|
-
const stateInfo = null === (_a = this.stateList) || void 0 === _a ? void 0 : _a.find(stateInfo => stateInfo.state === state);
|
|
32659
|
-
if (stateInfo) {
|
|
32660
|
-
const stateList = this.stateList.slice();
|
|
32661
|
-
stateInfo.executor.stop(), this.stateList = stateList, stateInfo.executor.execute(stateInfo.animationConfig);
|
|
32662
|
-
}
|
|
32663
|
-
}
|
|
32664
32642
|
}
|
|
32665
32643
|
|
|
32666
32644
|
class GraphicStateExtension {
|
|
@@ -32691,20 +32669,11 @@
|
|
|
32691
32669
|
applyUnhighlightState(animationConfig, callback) {
|
|
32692
32670
|
return this._getAnimationStateManager(this).applyUnhighlightState(animationConfig, callback), this;
|
|
32693
32671
|
}
|
|
32694
|
-
stopAnimationState(state, type
|
|
32695
|
-
return this._getAnimationStateManager(this).stopState(state, type),
|
|
32696
|
-
child.stopAnimationState(state, type, deep);
|
|
32697
|
-
}), this;
|
|
32672
|
+
stopAnimationState(state, type) {
|
|
32673
|
+
return this._getAnimationStateManager(this).stopState(state, type), this;
|
|
32698
32674
|
}
|
|
32699
32675
|
clearAnimationStates() {
|
|
32700
|
-
|
|
32701
|
-
return stateManager && stateManager.clearState(), this;
|
|
32702
|
-
}
|
|
32703
|
-
reApplyAnimationState(state, deep = !1) {
|
|
32704
|
-
const stateManager = this._animationStateManager;
|
|
32705
|
-
return stateManager && stateManager.reApplyState(state), deep && this.isContainer && this.forEachChildren(child => {
|
|
32706
|
-
child.reApplyAnimationState(state, deep);
|
|
32707
|
-
}), this;
|
|
32676
|
+
return this._getAnimationStateManager(this).clearState(), this;
|
|
32708
32677
|
}
|
|
32709
32678
|
static extend(graphic) {
|
|
32710
32679
|
return new GraphicStateExtension()._getAnimationStateManager(graphic), graphic;
|
|
@@ -32717,6 +32686,7 @@
|
|
|
32717
32686
|
}
|
|
32718
32687
|
animate(params) {
|
|
32719
32688
|
var _a, _b, _c;
|
|
32689
|
+
this.animates || (this.animates = new Map());
|
|
32720
32690
|
const animate = new Animate(null == params ? void 0 : params.id, null !== (_b = null !== (_a = null == params ? void 0 : params.timeline) && void 0 !== _a ? _a : this.stage && this.stage.getTimeline()) && void 0 !== _b ? _b : defaultTimeline, null == params ? void 0 : params.slience);
|
|
32721
32691
|
if (animate.bind(this), params) {
|
|
32722
32692
|
const {
|
|
@@ -32726,7 +32696,9 @@
|
|
|
32726
32696
|
} = params;
|
|
32727
32697
|
null != onStart && animate.onStart(onStart), null != onEnd && animate.onEnd(onEnd), null != onRemove && animate.onRemove(onRemove);
|
|
32728
32698
|
}
|
|
32729
|
-
return
|
|
32699
|
+
return this.animates.set(animate.id, animate), animate.onRemove(() => {
|
|
32700
|
+
animate.stop(), this.animates.delete(animate.id);
|
|
32701
|
+
}), null === (_c = this.stage) || void 0 === _c || _c.ticker.start(), animate;
|
|
32730
32702
|
}
|
|
32731
32703
|
createTimeline() {
|
|
32732
32704
|
return new DefaultTimeline();
|
|
@@ -32757,21 +32729,6 @@
|
|
|
32757
32729
|
getGraphicAttribute(key, prev = !1) {
|
|
32758
32730
|
return !prev && this.finalAttribute ? this.finalAttribute[key] : this.attribute[key];
|
|
32759
32731
|
}
|
|
32760
|
-
pauseAnimation(deep = !1) {
|
|
32761
|
-
this.animates && this.animates.forEach(animate => animate.pause()), deep && this.isContainer && this.forEachChildren(child => {
|
|
32762
|
-
child.pauseAnimation(deep);
|
|
32763
|
-
});
|
|
32764
|
-
}
|
|
32765
|
-
resumeAnimation(deep = !1) {
|
|
32766
|
-
this.animates && this.animates.forEach(animate => animate.resume()), deep && this.isContainer && this.forEachChildren(child => {
|
|
32767
|
-
child.resumeAnimation(deep);
|
|
32768
|
-
});
|
|
32769
|
-
}
|
|
32770
|
-
stopAnimation(deep = !1) {
|
|
32771
|
-
this.animates && this.animates.forEach(animate => animate.stop()), deep && this.isContainer && this.forEachChildren(child => {
|
|
32772
|
-
child.stopAnimation(deep);
|
|
32773
|
-
});
|
|
32774
|
-
}
|
|
32775
32732
|
}
|
|
32776
32733
|
|
|
32777
32734
|
function registerAnimate$1() {
|
|
@@ -32780,7 +32737,7 @@
|
|
|
32780
32737
|
|
|
32781
32738
|
class ACustomAnimate extends Step {
|
|
32782
32739
|
constructor(customFrom, customTo, duration, easing, params) {
|
|
32783
|
-
super("customAnimate", customTo, duration, easing), this.type = "customAnimate", this.customFrom = customFrom, this.params = params
|
|
32740
|
+
super("customAnimate", customTo, duration, easing), this.type = "customAnimate", this.customFrom = customFrom, this.params = params;
|
|
32784
32741
|
}
|
|
32785
32742
|
update(end, ratio, out) {
|
|
32786
32743
|
if (this.onStart(), !this.props || !this.propKeys) return;
|
|
@@ -33852,7 +33809,7 @@
|
|
|
33852
33809
|
super(from, to, duration, easing, params);
|
|
33853
33810
|
}
|
|
33854
33811
|
onBind() {
|
|
33855
|
-
var _a, _b
|
|
33812
|
+
var _a, _b;
|
|
33856
33813
|
super.onBind();
|
|
33857
33814
|
const {
|
|
33858
33815
|
from: from,
|
|
@@ -33861,7 +33818,7 @@
|
|
|
33861
33818
|
fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
|
|
33862
33819
|
this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to;
|
|
33863
33820
|
const finalAttribute = this.target.getFinalAttribute();
|
|
33864
|
-
finalAttribute && this.target.setAttributes(finalAttribute),
|
|
33821
|
+
finalAttribute && this.target.setAttributes(finalAttribute), this.target.setAttributes(fromAttrs);
|
|
33865
33822
|
}
|
|
33866
33823
|
onEnd(cb) {
|
|
33867
33824
|
super.onEnd(cb);
|
|
@@ -33959,7 +33916,7 @@
|
|
|
33959
33916
|
super(from, to, duration, easing, params);
|
|
33960
33917
|
}
|
|
33961
33918
|
onBind() {
|
|
33962
|
-
var _a, _b
|
|
33919
|
+
var _a, _b;
|
|
33963
33920
|
super.onBind();
|
|
33964
33921
|
const {
|
|
33965
33922
|
from: from,
|
|
@@ -33968,7 +33925,7 @@
|
|
|
33968
33925
|
fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
|
|
33969
33926
|
this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to;
|
|
33970
33927
|
const finalAttribute = this.target.getFinalAttribute();
|
|
33971
|
-
finalAttribute && this.target.setAttributes(finalAttribute),
|
|
33928
|
+
finalAttribute && this.target.setAttributes(finalAttribute), this.target.setAttributes(fromAttrs);
|
|
33972
33929
|
}
|
|
33973
33930
|
onEnd(cb) {
|
|
33974
33931
|
super.onEnd(cb);
|
|
@@ -35819,15 +35776,16 @@
|
|
|
35819
35776
|
changedY = 0;
|
|
35820
35777
|
"negative" === orient && (changedX = null !== (_a = layoutRect.width) && void 0 !== _a ? _a : graphic.stage.viewWidth, changedY = null !== (_b = layoutRect.height) && void 0 !== _b ? _b : graphic.stage.viewHeight), changedX += offset, changedY += offset;
|
|
35821
35778
|
const point = isFunction$1(pointOpt) ? pointOpt.call(null, null === (_d = null === (_c = graphic.context) || void 0 === _c ? void 0 : _c.data) || void 0 === _d ? void 0 : _d[0], graphic, animationParameters) : pointOpt,
|
|
35822
|
-
|
|
35823
|
-
|
|
35824
|
-
|
|
35825
|
-
|
|
35779
|
+
fromX = point && isValidNumber$1(point.x) ? point.x : changedX,
|
|
35780
|
+
fromY = point && isValidNumber$1(point.y) ? point.y : changedY,
|
|
35781
|
+
finalAttrs = graphic.getFinalAttribute(),
|
|
35782
|
+
finalAttrsX = excludeChannels.includes("x") ? graphic.attribute.x : finalAttrs.x,
|
|
35783
|
+
finalAttrsY = excludeChannels.includes("y") ? graphic.attribute.y : finalAttrs.y;
|
|
35826
35784
|
switch (direction) {
|
|
35827
35785
|
case "x":
|
|
35828
35786
|
return {
|
|
35829
35787
|
from: {
|
|
35830
|
-
x:
|
|
35788
|
+
x: fromX
|
|
35831
35789
|
},
|
|
35832
35790
|
to: {
|
|
35833
35791
|
x: finalAttrsX
|
|
@@ -35856,26 +35814,25 @@
|
|
|
35856
35814
|
}
|
|
35857
35815
|
};
|
|
35858
35816
|
const moveOut = (graphic, options, animationParameters) => {
|
|
35859
|
-
var _a, _b, _c, _d;
|
|
35817
|
+
var _a, _b, _c, _d, _e, _f;
|
|
35860
35818
|
const {
|
|
35861
35819
|
offset = 0,
|
|
35862
35820
|
orient: orient,
|
|
35863
35821
|
direction: direction,
|
|
35864
35822
|
point: pointOpt
|
|
35865
35823
|
} = null != options ? options : {},
|
|
35866
|
-
|
|
35867
|
-
|
|
35868
|
-
groupHeight = null !== (_b = groupBounds.height()) && void 0 !== _b ? _b : animationParameters.height,
|
|
35824
|
+
groupWidth = null !== (_b = null === (_a = options.layoutRect) || void 0 === _a ? void 0 : _a.width) && void 0 !== _b ? _b : graphic.stage.viewWidth,
|
|
35825
|
+
groupHeight = null !== (_d = null === (_c = options.layoutRect) || void 0 === _c ? void 0 : _c.height) && void 0 !== _d ? _d : graphic.stage.viewHeight,
|
|
35869
35826
|
changedX = ("negative" === orient ? groupWidth : 0) + offset,
|
|
35870
35827
|
changedY = ("negative" === orient ? groupHeight : 0) + offset,
|
|
35871
|
-
point = isFunction$1(pointOpt) ? pointOpt.call(null, null === (
|
|
35828
|
+
point = isFunction$1(pointOpt) ? pointOpt.call(null, null === (_f = null === (_e = graphic.context) || void 0 === _e ? void 0 : _e.data) || void 0 === _f ? void 0 : _f[0], graphic, animationParameters) : pointOpt,
|
|
35872
35829
|
fromX = point && isValidNumber$1(point.x) ? point.x : changedX,
|
|
35873
35830
|
fromY = point && isValidNumber$1(point.y) ? point.y : changedY;
|
|
35874
35831
|
switch (direction) {
|
|
35875
35832
|
case "x":
|
|
35876
35833
|
return {
|
|
35877
35834
|
from: {
|
|
35878
|
-
x: graphic.
|
|
35835
|
+
x: graphic.attribute.x
|
|
35879
35836
|
},
|
|
35880
35837
|
to: {
|
|
35881
35838
|
x: fromX
|
|
@@ -35884,7 +35841,7 @@
|
|
|
35884
35841
|
case "y":
|
|
35885
35842
|
return {
|
|
35886
35843
|
from: {
|
|
35887
|
-
y: graphic.
|
|
35844
|
+
y: graphic.attribute.y
|
|
35888
35845
|
},
|
|
35889
35846
|
to: {
|
|
35890
35847
|
y: fromY
|
|
@@ -35893,8 +35850,8 @@
|
|
|
35893
35850
|
default:
|
|
35894
35851
|
return {
|
|
35895
35852
|
from: {
|
|
35896
|
-
x: graphic.
|
|
35897
|
-
y: graphic.
|
|
35853
|
+
x: graphic.attribute.x,
|
|
35854
|
+
y: graphic.attribute.y
|
|
35898
35855
|
},
|
|
35899
35856
|
to: {
|
|
35900
35857
|
x: fromX,
|
|
@@ -36041,9 +35998,6 @@
|
|
|
36041
35998
|
this.from[key] = null !== (_a = this.from[key]) && void 0 !== _a ? _a : startProps[key];
|
|
36042
35999
|
}), this.target.setAttributes(this.from);
|
|
36043
36000
|
}
|
|
36044
|
-
deleteSelfAttr(key) {
|
|
36045
|
-
super.deleteSelfAttr(key), delete this.from[key];
|
|
36046
|
-
}
|
|
36047
36001
|
update(end, ratio, out) {
|
|
36048
36002
|
if (this.onStart(), !this.props || !this.propKeys) return;
|
|
36049
36003
|
const easedRatio = this.easing(ratio);
|
|
@@ -36112,8 +36066,9 @@
|
|
|
36112
36066
|
w = Math.min(Math.min(currentX + maxLength, maxLength), streamLength - currentX),
|
|
36113
36067
|
width = w + x > parentWidth ? Math.max(parentWidth - x, 0) : w;
|
|
36114
36068
|
this.rect.setAttributes({
|
|
36115
|
-
x: x
|
|
36116
|
-
width: width
|
|
36069
|
+
x: x,
|
|
36070
|
+
width: width,
|
|
36071
|
+
dx: Math.min(parentAttr.x1 - parentAttr.x, 0)
|
|
36117
36072
|
}, !1, {
|
|
36118
36073
|
type: AttributeUpdateType.ANIMATE_PLAY,
|
|
36119
36074
|
animationState: {
|
|
@@ -36130,8 +36085,9 @@
|
|
|
36130
36085
|
const h = Math.min(parentHeight - currentY, maxLength);
|
|
36131
36086
|
let height;
|
|
36132
36087
|
y <= 0 ? (height = Math.max(y + h, 0), y = 0) : height = h, this.rect.setAttributes({
|
|
36133
|
-
y: y
|
|
36134
|
-
height: height
|
|
36088
|
+
y: y,
|
|
36089
|
+
height: height,
|
|
36090
|
+
dy: Math.min(parentAttr.y1 - parentAttr.y, 0)
|
|
36135
36091
|
}, !1, {
|
|
36136
36092
|
type: AttributeUpdateType.ANIMATE_PLAY,
|
|
36137
36093
|
animationState: {
|
|
@@ -38823,8 +38779,7 @@
|
|
|
38823
38779
|
prevText: prevText,
|
|
38824
38780
|
curText: curText,
|
|
38825
38781
|
prevLabelLine: prevLabelLine,
|
|
38826
|
-
curLabelLine: curLabelLine
|
|
38827
|
-
increaseEffect = !0
|
|
38782
|
+
curLabelLine: curLabelLine
|
|
38828
38783
|
} = this.params,
|
|
38829
38784
|
diff = {};
|
|
38830
38785
|
for (const key in curText.attribute) prevText.attribute[key] !== curText.attribute[key] && (diff[key] = curText.attribute[key]);
|
|
@@ -38834,7 +38789,7 @@
|
|
|
38834
38789
|
to: rest,
|
|
38835
38790
|
duration: duration,
|
|
38836
38791
|
easing: easing
|
|
38837
|
-
}),
|
|
38792
|
+
}), animator.animate(prevText, {
|
|
38838
38793
|
type: "increaseCount",
|
|
38839
38794
|
to: {
|
|
38840
38795
|
text: curText.attribute.text
|
|
@@ -39528,15 +39483,16 @@
|
|
|
39528
39483
|
} = currentLabel;
|
|
39529
39484
|
prevText.applyAnimationState(["update"], [{
|
|
39530
39485
|
name: "update",
|
|
39531
|
-
animation: {
|
|
39532
|
-
type: "labelUpdate"
|
|
39533
|
-
|
|
39486
|
+
animation: Object.assign(Object.assign({
|
|
39487
|
+
type: "labelUpdate"
|
|
39488
|
+
}, this._animationConfig.update), {
|
|
39489
|
+
customParameters: {
|
|
39534
39490
|
prevText: prevText,
|
|
39535
39491
|
curText: curText,
|
|
39536
39492
|
prevLabelLine: prevLabelLine,
|
|
39537
39493
|
curLabelLine: curLabelLine
|
|
39538
|
-
}
|
|
39539
|
-
}
|
|
39494
|
+
}
|
|
39495
|
+
})
|
|
39540
39496
|
}]);
|
|
39541
39497
|
}
|
|
39542
39498
|
_syncStateWithRelatedGraphic(relatedGraphic) {
|
|
@@ -47335,6 +47291,7 @@
|
|
|
47335
47291
|
SeriesTypeEnum["dot"] = "dot";
|
|
47336
47292
|
SeriesTypeEnum["geo"] = "geo";
|
|
47337
47293
|
SeriesTypeEnum["link"] = "link";
|
|
47294
|
+
SeriesTypeEnum["curveLink"] = "curveLink";
|
|
47338
47295
|
SeriesTypeEnum["map"] = "map";
|
|
47339
47296
|
SeriesTypeEnum["pie"] = "pie";
|
|
47340
47297
|
SeriesTypeEnum["radar"] = "radar";
|
|
@@ -47389,6 +47346,8 @@
|
|
|
47389
47346
|
SeriesMarkNameEnum["cell"] = "cell";
|
|
47390
47347
|
SeriesMarkNameEnum["cellBackground"] = "cellBackground";
|
|
47391
47348
|
SeriesMarkNameEnum["link"] = "link";
|
|
47349
|
+
SeriesMarkNameEnum["curveLink"] = "curveLink";
|
|
47350
|
+
SeriesMarkNameEnum["imageLabel"] = "imageLabel";
|
|
47392
47351
|
SeriesMarkNameEnum["arrow"] = "arrow";
|
|
47393
47352
|
SeriesMarkNameEnum["pie"] = "pie";
|
|
47394
47353
|
SeriesMarkNameEnum["labelLine"] = "labelLine";
|
|
@@ -49154,16 +49113,6 @@
|
|
|
49154
49113
|
}
|
|
49155
49114
|
return null;
|
|
49156
49115
|
};
|
|
49157
|
-
const getDiffAttributesOfGraphic = (g, newAttrs) => {
|
|
49158
|
-
const prevAttrs = g.getAttributes(true);
|
|
49159
|
-
const diffAttrs = {};
|
|
49160
|
-
Object.keys(newAttrs).forEach(key => {
|
|
49161
|
-
if (prevAttrs[key] !== newAttrs[key]) {
|
|
49162
|
-
diffAttrs[key] = newAttrs[key];
|
|
49163
|
-
}
|
|
49164
|
-
});
|
|
49165
|
-
return diffAttrs;
|
|
49166
|
-
};
|
|
49167
49116
|
|
|
49168
49117
|
let Event$1 = class Event {
|
|
49169
49118
|
getComposedEventMap() {
|
|
@@ -50065,28 +50014,6 @@
|
|
|
50065
50014
|
return attrs;
|
|
50066
50015
|
};
|
|
50067
50016
|
|
|
50068
|
-
function toRenderMode(mode) {
|
|
50069
|
-
switch (mode) {
|
|
50070
|
-
case exports.RenderModeEnum['desktop-browser']:
|
|
50071
|
-
case exports.RenderModeEnum['mobile-browser']:
|
|
50072
|
-
return 'browser';
|
|
50073
|
-
case exports.RenderModeEnum.node:
|
|
50074
|
-
case exports.RenderModeEnum.worker:
|
|
50075
|
-
return 'node';
|
|
50076
|
-
case exports.RenderModeEnum.miniApp:
|
|
50077
|
-
case exports.RenderModeEnum['desktop-miniApp']:
|
|
50078
|
-
return 'feishu';
|
|
50079
|
-
case exports.RenderModeEnum.lynx:
|
|
50080
|
-
return 'lynx';
|
|
50081
|
-
case exports.RenderModeEnum.wx:
|
|
50082
|
-
return 'wx';
|
|
50083
|
-
case exports.RenderModeEnum.tt:
|
|
50084
|
-
return 'tt';
|
|
50085
|
-
case exports.RenderModeEnum.harmony:
|
|
50086
|
-
return 'harmony';
|
|
50087
|
-
}
|
|
50088
|
-
return 'browser';
|
|
50089
|
-
}
|
|
50090
50017
|
function traverseGroupMark(group, apply, filter, leafFirst, stop) {
|
|
50091
50018
|
const traverse = (mark) => {
|
|
50092
50019
|
if (!leafFirst) {
|
|
@@ -50260,9 +50187,6 @@
|
|
|
50260
50187
|
this._container = container;
|
|
50261
50188
|
this._option = option;
|
|
50262
50189
|
}
|
|
50263
|
-
getChart() {
|
|
50264
|
-
return this._compileChart;
|
|
50265
|
-
}
|
|
50266
50190
|
getCanvas() {
|
|
50267
50191
|
var _a;
|
|
50268
50192
|
return (_a = this._stage) === null || _a === void 0 ? void 0 : _a.window.getNativeHandler().nativeCanvas;
|
|
@@ -50271,7 +50195,7 @@
|
|
|
50271
50195
|
return this._stage;
|
|
50272
50196
|
}
|
|
50273
50197
|
initView() {
|
|
50274
|
-
var _a, _b, _c
|
|
50198
|
+
var _a, _b, _c;
|
|
50275
50199
|
if (this._released) {
|
|
50276
50200
|
return;
|
|
50277
50201
|
}
|
|
@@ -50279,17 +50203,34 @@
|
|
|
50279
50203
|
if (this._stage) {
|
|
50280
50204
|
return;
|
|
50281
50205
|
}
|
|
50282
|
-
const { autoRefreshDpr, dpr, mode,
|
|
50283
|
-
vglobal.setEnv(toRenderMode(mode), modeParams !== null && modeParams !== void 0 ? modeParams : {});
|
|
50206
|
+
const { autoRefreshDpr, dpr, mode, gestureConfig, interactive, clickInterval, autoPreventDefault, background } = this._option;
|
|
50284
50207
|
this._stage =
|
|
50285
|
-
(_a = this._option.stage) !== null && _a !== void 0 ? _a : new Stage(
|
|
50286
|
-
|
|
50287
|
-
|
|
50288
|
-
|
|
50289
|
-
|
|
50208
|
+
(_a = this._option.stage) !== null && _a !== void 0 ? _a : new Stage({
|
|
50209
|
+
background,
|
|
50210
|
+
width: this._width,
|
|
50211
|
+
height: this._height,
|
|
50212
|
+
container: (_b = this._container.dom) !== null && _b !== void 0 ? _b : null,
|
|
50213
|
+
canvas: (_c = this._container.canvas) !== null && _c !== void 0 ? _c : null,
|
|
50214
|
+
dpr,
|
|
50215
|
+
viewBox: this._option.viewBox,
|
|
50216
|
+
canvasControled: this._option.canvasControled,
|
|
50217
|
+
beforeRender: this._option.beforeRender,
|
|
50218
|
+
afterRender: this._option.afterRender,
|
|
50219
|
+
disableDirtyBounds: true,
|
|
50220
|
+
autoRender: true,
|
|
50221
|
+
ticker: this._option.ticker,
|
|
50222
|
+
pluginList: this._option.pluginList,
|
|
50223
|
+
enableHtmlAttribute: this._option.enableHtmlAttribute,
|
|
50224
|
+
optimize: this._option.optimize,
|
|
50225
|
+
supportsTouchEvents: this._option.supportsTouchEvents,
|
|
50226
|
+
supportsPointerEvents: this._option.supportsPointerEvents,
|
|
50227
|
+
event: {
|
|
50290
50228
|
clickInterval: clickInterval,
|
|
50291
50229
|
autoPreventDefault: autoPreventDefault
|
|
50292
|
-
},
|
|
50230
|
+
},
|
|
50231
|
+
ReactDOM: this._option.ReactDOM,
|
|
50232
|
+
autoRefresh: isValid$1(autoRefreshDpr) ? autoRefreshDpr : !isValid$1(dpr)
|
|
50233
|
+
});
|
|
50293
50234
|
this._stage.enableIncrementalAutoRender();
|
|
50294
50235
|
this._stage.setTheme({
|
|
50295
50236
|
symbol: {
|
|
@@ -51120,8 +51061,6 @@
|
|
|
51120
51061
|
}
|
|
51121
51062
|
onEvaluateEnd(ctx) {
|
|
51122
51063
|
}
|
|
51123
|
-
onBeforeRender() {
|
|
51124
|
-
}
|
|
51125
51064
|
onDataUpdate() {
|
|
51126
51065
|
}
|
|
51127
51066
|
beforeRelease() {
|
|
@@ -51249,12 +51188,6 @@
|
|
|
51249
51188
|
}
|
|
51250
51189
|
return index;
|
|
51251
51190
|
}
|
|
51252
|
-
updateAnimateStateCallback(callback) {
|
|
51253
|
-
this._aniamtionStateCallback = callback;
|
|
51254
|
-
}
|
|
51255
|
-
getAnimationStateCallback() {
|
|
51256
|
-
return this._aniamtionStateCallback;
|
|
51257
|
-
}
|
|
51258
51191
|
}
|
|
51259
51192
|
|
|
51260
51193
|
class LayoutItem {
|
|
@@ -53278,39 +53211,26 @@
|
|
|
53278
53211
|
}
|
|
53279
53212
|
setAnimationConfig(config) {
|
|
53280
53213
|
const defaultPrams = this.type === 'group' ? { selfOnly: true } : {};
|
|
53281
|
-
const formatAnimationCfg = (cfg) => {
|
|
53282
|
-
var _a;
|
|
53283
|
-
const options = (_a = cfg.options) !== null && _a !== void 0 ? _a : {};
|
|
53284
|
-
return Object.assign(Object.assign(Object.assign({}, defaultPrams), cfg), { options: (datum, graphic, customParams) => {
|
|
53285
|
-
var _a, _b;
|
|
53286
|
-
const _options = typeof options === 'function' ? options(datum, graphic, customParams) : options;
|
|
53287
|
-
if (graphic && graphic.context && graphic.context.compiler && isValid$1(graphic.context.modelId)) {
|
|
53288
|
-
const model = (_a = graphic.context.compiler.getChart()) === null || _a === void 0 ? void 0 : _a.getModelById(graphic.context.modelId);
|
|
53289
|
-
return Object.assign(Object.assign({}, _options), { layoutRect: (_b = model === null || model === void 0 ? void 0 : model.getLayoutRect) === null || _b === void 0 ? void 0 : _b.call(model) });
|
|
53290
|
-
}
|
|
53291
|
-
return Object.assign({}, _options);
|
|
53292
|
-
} });
|
|
53293
|
-
};
|
|
53294
53214
|
const animationConfig = {};
|
|
53295
53215
|
Object.keys(config).forEach(key => {
|
|
53296
53216
|
const value = config[key];
|
|
53297
53217
|
if (isArray$1(value)) {
|
|
53298
|
-
animationConfig[key] = value.map(
|
|
53218
|
+
animationConfig[key] = value.map(item => {
|
|
53219
|
+
var _a;
|
|
53220
|
+
const options = (_a = item.options) !== null && _a !== void 0 ? _a : {};
|
|
53221
|
+
return Object.assign(Object.assign(Object.assign({}, defaultPrams), item), { options: (...args) => {
|
|
53222
|
+
var _a, _b;
|
|
53223
|
+
const _options = typeof options === 'function' ? options(...args) : options;
|
|
53224
|
+
return Object.assign(Object.assign({}, _options), { layoutRect: (_b = (_a = this.model).getLayoutRect) === null || _b === void 0 ? void 0 : _b.call(_a) });
|
|
53225
|
+
} });
|
|
53226
|
+
});
|
|
53299
53227
|
}
|
|
53300
|
-
else
|
|
53301
|
-
animationConfig[key] =
|
|
53228
|
+
else {
|
|
53229
|
+
animationConfig[key] = Object.assign(Object.assign({}, defaultPrams), config[key]);
|
|
53302
53230
|
}
|
|
53303
53231
|
});
|
|
53304
53232
|
this._animationConfig = animationConfig;
|
|
53305
53233
|
}
|
|
53306
|
-
disableAnimationByState(state) {
|
|
53307
|
-
const states = array(state);
|
|
53308
|
-
this._disabledAnimationStates = [...new Set([...this._disabledAnimationStates, ...states])];
|
|
53309
|
-
}
|
|
53310
|
-
enableAnimationByState(state) {
|
|
53311
|
-
const states = array(state);
|
|
53312
|
-
this._disabledAnimationStates = this._disabledAnimationStates.filter(s => !states.includes(s));
|
|
53313
|
-
}
|
|
53314
53234
|
setSkipBeforeLayouted(skip) {
|
|
53315
53235
|
this._skipBeforeLayouted = skip;
|
|
53316
53236
|
}
|
|
@@ -53445,7 +53365,6 @@
|
|
|
53445
53365
|
this._visible = true;
|
|
53446
53366
|
this.stateStyle = {};
|
|
53447
53367
|
this._unCompileChannel = {};
|
|
53448
|
-
this._disabledAnimationStates = [];
|
|
53449
53368
|
this._skipBeforeLayouted = false;
|
|
53450
53369
|
this._extensionChannel = {};
|
|
53451
53370
|
this._computeExChannel = {};
|
|
@@ -53863,7 +53782,6 @@
|
|
|
53863
53782
|
}
|
|
53864
53783
|
_getCommonContext() {
|
|
53865
53784
|
return {
|
|
53866
|
-
compiler: this.getCompiler(),
|
|
53867
53785
|
markType: this.type,
|
|
53868
53786
|
markId: this.id,
|
|
53869
53787
|
modelId: this.model.id,
|
|
@@ -53937,19 +53855,17 @@
|
|
|
53937
53855
|
this._dataByGroup = groupData(data, this._groupKeyGetter);
|
|
53938
53856
|
}
|
|
53939
53857
|
createAnimationStateList(type, animationConfig) {
|
|
53940
|
-
var _a;
|
|
53941
53858
|
let config = animationConfig[type];
|
|
53942
53859
|
if (config && Array.isArray(config)) {
|
|
53943
53860
|
config = config.length === 1 ? config[0] : config;
|
|
53944
53861
|
}
|
|
53945
53862
|
if (Array.isArray(config)) {
|
|
53946
|
-
|
|
53863
|
+
config = config.map((item, index) => {
|
|
53947
53864
|
var _a;
|
|
53948
53865
|
return (Object.assign(Object.assign({}, item), { priority: (_a = item.priority) !== null && _a !== void 0 ? _a : Infinity }));
|
|
53949
53866
|
});
|
|
53950
53867
|
}
|
|
53951
|
-
return config
|
|
53952
|
-
? Object.assign(Object.assign({}, config), { priority: type === 'normal' ? (_a = config.priority) !== null && _a !== void 0 ? _a : Infinity : config.priority }) : config;
|
|
53868
|
+
return config;
|
|
53953
53869
|
}
|
|
53954
53870
|
tryRunMorphing(graphics) {
|
|
53955
53871
|
if (this._lastMark) {
|
|
@@ -54033,34 +53949,13 @@
|
|
|
54033
53949
|
this._product.applyAnimationState(['normal'], [normalConfig]);
|
|
54034
53950
|
}
|
|
54035
53951
|
}
|
|
54036
|
-
_setAnimationState(g) {
|
|
54037
|
-
var _a, _b, _c;
|
|
54038
|
-
const callback = (this.type === "component"
|
|
54039
|
-
? this.model.getAnimationStateCallback()
|
|
54040
|
-
: (_c = (_b = (_a = this.model).getRegion) === null || _b === void 0 ? void 0 : _b.call(_a)) === null || _c === void 0 ? void 0 : _c.getAnimationStateCallback()) ||
|
|
54041
|
-
((g) => {
|
|
54042
|
-
var _a;
|
|
54043
|
-
const diffState = (_a = g.context) === null || _a === void 0 ? void 0 : _a.diffState;
|
|
54044
|
-
return diffState === AnimationStateEnum.exit
|
|
54045
|
-
? AnimationStateEnum.exit
|
|
54046
|
-
: diffState === AnimationStateEnum.update
|
|
54047
|
-
? AnimationStateEnum.update
|
|
54048
|
-
: AnimationStateEnum.appear;
|
|
54049
|
-
});
|
|
54050
|
-
const customizedState = callback(g);
|
|
54051
|
-
g.context.animationState = customizedState !== null && customizedState !== void 0 ? customizedState : g.context.diffState;
|
|
54052
|
-
if (g.context.animationState === DiffState.exit) {
|
|
54053
|
-
g.context.reusing = true;
|
|
54054
|
-
g.animates && g.animates.forEach((a) => a.stop());
|
|
54055
|
-
}
|
|
54056
|
-
}
|
|
54057
53952
|
_runJoin(data) {
|
|
54058
53953
|
const newGroupedData = this._getDataByKey(data);
|
|
54059
53954
|
const prevGroupedData = this._prevDataByKey;
|
|
54060
|
-
const
|
|
53955
|
+
const newGraphics = [];
|
|
54061
53956
|
const enterGraphics = new Set(this._graphics.filter(g => g.context.diffState === DiffState.enter));
|
|
54062
53957
|
const callback = (key, newData, prevData) => {
|
|
54063
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
53958
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
54064
53959
|
let g;
|
|
54065
53960
|
let diffState;
|
|
54066
53961
|
if (isNil$1(newData)) {
|
|
@@ -54078,20 +53973,23 @@
|
|
|
54078
53973
|
}
|
|
54079
53974
|
diffState = DiffState.enter;
|
|
54080
53975
|
g.isExiting = false;
|
|
53976
|
+
if (((_a = g.context) === null || _a === void 0 ? void 0 : _a.diffState) === DiffState.exit) {
|
|
53977
|
+
g.context.reusing = true;
|
|
53978
|
+
g.animates && g.animates.forEach((a) => a.stop());
|
|
53979
|
+
}
|
|
54081
53980
|
this._graphicMap.set(key, g);
|
|
54082
|
-
|
|
53981
|
+
newGraphics.push(g);
|
|
54083
53982
|
}
|
|
54084
53983
|
else {
|
|
54085
53984
|
g = this._graphicMap.get(key);
|
|
54086
53985
|
if (g) {
|
|
54087
53986
|
diffState = DiffState.update;
|
|
54088
|
-
|
|
53987
|
+
newGraphics.push(g);
|
|
54089
53988
|
}
|
|
54090
53989
|
}
|
|
54091
53990
|
if (g) {
|
|
53991
|
+
g.context = Object.assign(Object.assign({}, this._getCommonContext()), { diffState, reusing: (_b = g.context) === null || _b === void 0 ? void 0 : _b.reusing, originalFieldX: (_c = g.context) === null || _c === void 0 ? void 0 : _c.originalFieldX, originalFieldY: (_d = g.context) === null || _d === void 0 ? void 0 : _d.originalFieldY, fieldX: (_e = g.context) === null || _e === void 0 ? void 0 : _e.fieldX, fieldY: (_f = g.context) === null || _f === void 0 ? void 0 : _f.fieldY, animationState: diffState, data: newData !== null && newData !== void 0 ? newData : (_g = g.context) === null || _g === void 0 ? void 0 : _g.data, uniqueKey: key, key: newData ? this._keyGetter(newData[0]) : (_h = g.context) === null || _h === void 0 ? void 0 : _h.key, groupKey: newData ? this._groupKeyGetter(newData[0]) : (_j = g.context) === null || _j === void 0 ? void 0 : _j.groupKey, indexKey: '__VCHART_DEFAULT_DATA_INDEX', stateAnimateConfig: (_k = this.getAnimationConfig()) === null || _k === void 0 ? void 0 : _k.state });
|
|
54092
53992
|
enterGraphics.delete(g);
|
|
54093
|
-
g.context = Object.assign(Object.assign({}, this._getCommonContext()), { diffState, reusing: (_a = g.context) === null || _a === void 0 ? void 0 : _a.reusing, originalFieldX: (_b = g.context) === null || _b === void 0 ? void 0 : _b.originalFieldX, originalFieldY: (_c = g.context) === null || _c === void 0 ? void 0 : _c.originalFieldY, fieldX: (_d = g.context) === null || _d === void 0 ? void 0 : _d.fieldX, fieldY: (_e = g.context) === null || _e === void 0 ? void 0 : _e.fieldY, data: newData !== null && newData !== void 0 ? newData : (_f = g.context) === null || _f === void 0 ? void 0 : _f.data, uniqueKey: key, key: newData ? this._keyGetter(newData[0]) : (_g = g.context) === null || _g === void 0 ? void 0 : _g.key, groupKey: newData ? this._groupKeyGetter(newData[0]) : (_h = g.context) === null || _h === void 0 ? void 0 : _h.groupKey, indexKey: '__VCHART_DEFAULT_DATA_INDEX', stateAnimateConfig: (_j = this.getAnimationConfig()) === null || _j === void 0 ? void 0 : _j.state });
|
|
54094
|
-
this._setAnimationState(g);
|
|
54095
53993
|
}
|
|
54096
53994
|
return g;
|
|
54097
53995
|
};
|
|
@@ -54129,13 +54027,13 @@
|
|
|
54129
54027
|
}
|
|
54130
54028
|
g.release();
|
|
54131
54029
|
});
|
|
54132
|
-
const graphicCount =
|
|
54133
|
-
|
|
54030
|
+
const graphicCount = newGraphics.length;
|
|
54031
|
+
newGraphics.forEach((g, index) => {
|
|
54134
54032
|
g.context.graphicCount = graphicCount;
|
|
54135
54033
|
g.context.graphicIndex = index;
|
|
54136
54034
|
});
|
|
54137
54035
|
this._dataByKey = newGroupedData;
|
|
54138
|
-
this._graphics =
|
|
54036
|
+
this._graphics = newGraphics;
|
|
54139
54037
|
this.needClear = true;
|
|
54140
54038
|
}
|
|
54141
54039
|
_runEncoderOfGraphic(styles, g, attrs = {}) {
|
|
@@ -54218,7 +54116,13 @@
|
|
|
54218
54116
|
}
|
|
54219
54117
|
}
|
|
54220
54118
|
else {
|
|
54221
|
-
const
|
|
54119
|
+
const prevAttrs = g.getAttributes(true);
|
|
54120
|
+
const diffAttrs = {};
|
|
54121
|
+
Object.keys(finalAttrs).forEach(key => {
|
|
54122
|
+
if (prevAttrs[key] !== finalAttrs[key]) {
|
|
54123
|
+
diffAttrs[key] = finalAttrs[key];
|
|
54124
|
+
}
|
|
54125
|
+
});
|
|
54222
54126
|
g.context.diffAttrs = diffAttrs;
|
|
54223
54127
|
if (g.context.reusing) {
|
|
54224
54128
|
g.context.lastAttrs = g.attribute;
|
|
@@ -54387,24 +54291,23 @@
|
|
|
54387
54291
|
}
|
|
54388
54292
|
};
|
|
54389
54293
|
this._graphicMap.forEach((g, key) => {
|
|
54390
|
-
if (g.context.diffState
|
|
54391
|
-
|
|
54392
|
-
|
|
54393
|
-
|
|
54394
|
-
|
|
54395
|
-
|
|
54396
|
-
|
|
54397
|
-
|
|
54398
|
-
|
|
54399
|
-
|
|
54400
|
-
|
|
54401
|
-
|
|
54402
|
-
|
|
54403
|
-
|
|
54294
|
+
if (g.context.diffState === DiffState.exit && !g.isExiting) {
|
|
54295
|
+
if (this.hasAnimationByState('exit')) {
|
|
54296
|
+
g.isExiting = true;
|
|
54297
|
+
const animationConfig = this.getAnimationConfig();
|
|
54298
|
+
if (animationConfig.exit && animationConfig.exit.length) {
|
|
54299
|
+
const exitConfigList = animationConfig.exit.map((item, index) => ({
|
|
54300
|
+
name: `exit_${index}`,
|
|
54301
|
+
animation: Object.assign(Object.assign({}, item), { customParameters: g.context })
|
|
54302
|
+
}));
|
|
54303
|
+
g.applyAnimationState(['exit'], [exitConfigList.length === 1 ? exitConfigList[0] : exitConfigList], () => {
|
|
54304
|
+
doRemove(g, key);
|
|
54305
|
+
});
|
|
54306
|
+
}
|
|
54307
|
+
}
|
|
54308
|
+
else {
|
|
54309
|
+
doRemove(g, key);
|
|
54404
54310
|
}
|
|
54405
|
-
}
|
|
54406
|
-
else {
|
|
54407
|
-
doRemove(g, key);
|
|
54408
54311
|
}
|
|
54409
54312
|
});
|
|
54410
54313
|
}
|
|
@@ -54550,11 +54453,15 @@
|
|
|
54550
54453
|
this._runProgressiveStep();
|
|
54551
54454
|
}
|
|
54552
54455
|
}
|
|
54456
|
+
updateAnimationState(callback) {
|
|
54457
|
+
if (this._graphics && this._graphics.length) {
|
|
54458
|
+
this._graphics.forEach(g => {
|
|
54459
|
+
g.context.animationState = callback(g);
|
|
54460
|
+
});
|
|
54461
|
+
}
|
|
54462
|
+
}
|
|
54553
54463
|
hasAnimationByState(state) {
|
|
54554
|
-
if (!state ||
|
|
54555
|
-
!this._animationConfig ||
|
|
54556
|
-
!this._animationConfig[state] ||
|
|
54557
|
-
this._disabledAnimationStates.includes(state)) {
|
|
54464
|
+
if (!state || !this._animationConfig || !this._animationConfig[state]) {
|
|
54558
54465
|
return false;
|
|
54559
54466
|
}
|
|
54560
54467
|
const stateAnimationConfig = this._animationConfig[state];
|
|
@@ -54571,36 +54478,11 @@
|
|
|
54571
54478
|
}
|
|
54572
54479
|
}
|
|
54573
54480
|
|
|
54574
|
-
exports.MarkTypeEnum = void 0;
|
|
54575
|
-
(function (MarkTypeEnum) {
|
|
54576
|
-
MarkTypeEnum["group"] = "group";
|
|
54577
|
-
MarkTypeEnum["symbol"] = "symbol";
|
|
54578
|
-
MarkTypeEnum["rule"] = "rule";
|
|
54579
|
-
MarkTypeEnum["line"] = "line";
|
|
54580
|
-
MarkTypeEnum["text"] = "text";
|
|
54581
|
-
MarkTypeEnum["rect"] = "rect";
|
|
54582
|
-
MarkTypeEnum["image"] = "image";
|
|
54583
|
-
MarkTypeEnum["path"] = "path";
|
|
54584
|
-
MarkTypeEnum["area"] = "area";
|
|
54585
|
-
MarkTypeEnum["arc"] = "arc";
|
|
54586
|
-
MarkTypeEnum["polygon"] = "polygon";
|
|
54587
|
-
MarkTypeEnum["boxPlot"] = "boxPlot";
|
|
54588
|
-
MarkTypeEnum["linkPath"] = "linkPath";
|
|
54589
|
-
MarkTypeEnum["cell"] = "cell";
|
|
54590
|
-
MarkTypeEnum["ripple"] = "ripple";
|
|
54591
|
-
MarkTypeEnum["liquid"] = "liquid";
|
|
54592
|
-
MarkTypeEnum["component"] = "component";
|
|
54593
|
-
MarkTypeEnum["dataLabel"] = "dataLabel";
|
|
54594
|
-
MarkTypeEnum["label"] = "label";
|
|
54595
|
-
MarkTypeEnum["pictogram"] = "pictogram";
|
|
54596
|
-
})(exports.MarkTypeEnum || (exports.MarkTypeEnum = {}));
|
|
54597
|
-
|
|
54598
54481
|
class GroupMark extends BaseMark {
|
|
54599
54482
|
constructor() {
|
|
54600
54483
|
super(...arguments);
|
|
54601
54484
|
this.type = GroupMark.type;
|
|
54602
54485
|
this._marks = [];
|
|
54603
|
-
this._diffState = DiffState.enter;
|
|
54604
54486
|
}
|
|
54605
54487
|
getMarks() {
|
|
54606
54488
|
return this._marks;
|
|
@@ -54663,28 +54545,10 @@
|
|
|
54663
54545
|
return;
|
|
54664
54546
|
}
|
|
54665
54547
|
const style = (_a = this._simpleStyle) !== null && _a !== void 0 ? _a : this.getAttributesOfState({});
|
|
54666
|
-
this._product.context = Object.assign(Object.assign(
|
|
54667
|
-
this.
|
|
54668
|
-
const newAttrs = this._getAttrsFromConfig(style);
|
|
54669
|
-
if (this._product.context.diffState === DiffState.update) {
|
|
54670
|
-
const hasAnimation = this.hasAnimation();
|
|
54671
|
-
const diffAttrs = getDiffAttributesOfGraphic(this._product, newAttrs);
|
|
54672
|
-
this._product.context.diffAttrs = diffAttrs;
|
|
54673
|
-
if (!this.hasAnimationByState(this._product.context.animationState)) {
|
|
54674
|
-
hasAnimation ? this._product.setAttributesAndPreventAnimate(diffAttrs) : this._product.setAttributes(diffAttrs);
|
|
54675
|
-
}
|
|
54676
|
-
if (hasAnimation) {
|
|
54677
|
-
this._product.setFinalAttributes(newAttrs);
|
|
54678
|
-
}
|
|
54679
|
-
}
|
|
54680
|
-
else {
|
|
54681
|
-
this._product.setAttributes(newAttrs);
|
|
54682
|
-
}
|
|
54548
|
+
this._product.context = Object.assign(Object.assign({}, this._product.context), this._getCommonContext());
|
|
54549
|
+
this._product.setAttributes(this._getAttrsFromConfig(style));
|
|
54683
54550
|
this.needClear = true;
|
|
54684
54551
|
}
|
|
54685
|
-
clearExitGraphics() {
|
|
54686
|
-
this._diffState = DiffState.update;
|
|
54687
|
-
}
|
|
54688
54552
|
render() {
|
|
54689
54553
|
if (this._isCommited) {
|
|
54690
54554
|
log(`render mark: ${this.getProductId()}, type is ${this.type}`);
|
|
@@ -54695,6 +54559,16 @@
|
|
|
54695
54559
|
mark.render();
|
|
54696
54560
|
});
|
|
54697
54561
|
}
|
|
54562
|
+
updateAnimationState(callback) {
|
|
54563
|
+
this.getGraphics().forEach(g => {
|
|
54564
|
+
if (g) {
|
|
54565
|
+
g.context = Object.assign(Object.assign({}, g.context), { animationState: callback(g) });
|
|
54566
|
+
}
|
|
54567
|
+
});
|
|
54568
|
+
this.getMarks().forEach(mark => {
|
|
54569
|
+
mark.updateAnimationState(callback);
|
|
54570
|
+
});
|
|
54571
|
+
}
|
|
54698
54572
|
release() {
|
|
54699
54573
|
super.release();
|
|
54700
54574
|
this.removeProduct();
|
|
@@ -55592,6 +55466,7 @@
|
|
|
55592
55466
|
if (!this._beforeRender(option)) {
|
|
55593
55467
|
return self;
|
|
55594
55468
|
}
|
|
55469
|
+
this._updateAnimateState(true);
|
|
55595
55470
|
(_a = this._compiler) === null || _a === void 0 ? void 0 : _a.render(option.morphConfig);
|
|
55596
55471
|
this._updateAnimateState(false);
|
|
55597
55472
|
this._afterRender();
|
|
@@ -55888,7 +55763,7 @@
|
|
|
55888
55763
|
return this._beforeRender(option);
|
|
55889
55764
|
}
|
|
55890
55765
|
_reCompile(updateResult, morphConfig) {
|
|
55891
|
-
var _a, _b, _c, _d, _e
|
|
55766
|
+
var _a, _b, _c, _d, _e;
|
|
55892
55767
|
if (updateResult.reMake) {
|
|
55893
55768
|
this._releaseData();
|
|
55894
55769
|
this._initDataSet();
|
|
@@ -55908,16 +55783,20 @@
|
|
|
55908
55783
|
if (updateResult.reMake) {
|
|
55909
55784
|
(_c = this._compiler) === null || _c === void 0 ? void 0 : _c.releaseGrammar();
|
|
55910
55785
|
this._userEvents.forEach(e => { var _a; return (_a = this._event) === null || _a === void 0 ? void 0 : _a.on(e.eType, e.query, e.handler); });
|
|
55786
|
+
if (updateResult.reSize) {
|
|
55787
|
+
this._doResize();
|
|
55788
|
+
}
|
|
55911
55789
|
}
|
|
55912
|
-
else
|
|
55913
|
-
(
|
|
55914
|
-
|
|
55915
|
-
|
|
55916
|
-
|
|
55917
|
-
|
|
55918
|
-
|
|
55919
|
-
|
|
55920
|
-
|
|
55790
|
+
else {
|
|
55791
|
+
if (updateResult.reCompile) {
|
|
55792
|
+
(_d = this._compiler) === null || _d === void 0 ? void 0 : _d.clear({ chart: this._chart, vChart: this });
|
|
55793
|
+
(_e = this._compiler) === null || _e === void 0 ? void 0 : _e.compile({ chart: this._chart, vChart: this });
|
|
55794
|
+
}
|
|
55795
|
+
if (updateResult.reSize) {
|
|
55796
|
+
const { width, height } = this.getCurrentSize();
|
|
55797
|
+
this._chart.onResize(width, height, false);
|
|
55798
|
+
this._compiler.resize(width, height, false);
|
|
55799
|
+
}
|
|
55921
55800
|
}
|
|
55922
55801
|
}
|
|
55923
55802
|
_beforeRender(option = {}) {
|
|
@@ -55976,21 +55855,17 @@
|
|
|
55976
55855
|
});
|
|
55977
55856
|
}
|
|
55978
55857
|
_updateAnimateState(initial) {
|
|
55979
|
-
var _a, _b;
|
|
55980
55858
|
if (this._option.animation) {
|
|
55981
55859
|
const updateGraphicAnimationState = (graphic) => {
|
|
55982
55860
|
var _a;
|
|
55983
55861
|
const diffState = (_a = graphic.context) === null || _a === void 0 ? void 0 : _a.diffState;
|
|
55984
55862
|
if (initial) {
|
|
55985
|
-
return diffState === 'exit' ?
|
|
55863
|
+
return diffState === 'exit' ? undefined : AnimationStateEnum.appear;
|
|
55986
55864
|
}
|
|
55987
55865
|
return diffState;
|
|
55988
55866
|
};
|
|
55989
|
-
|
|
55990
|
-
|
|
55991
|
-
});
|
|
55992
|
-
(_b = this._chart) === null || _b === void 0 ? void 0 : _b.getAllComponents().forEach(component => {
|
|
55993
|
-
component.updateAnimateStateCallback(updateGraphicAnimationState);
|
|
55867
|
+
this._compiler.getRootMarks().forEach(mark => {
|
|
55868
|
+
mark.updateAnimationState(updateGraphicAnimationState);
|
|
55994
55869
|
});
|
|
55995
55870
|
}
|
|
55996
55871
|
}
|
|
@@ -56074,11 +55949,11 @@
|
|
|
56074
55949
|
}
|
|
56075
55950
|
if (this._chart) {
|
|
56076
55951
|
this._chart.updateData(id, data, true, parserOptions);
|
|
55952
|
+
this._compiler.render();
|
|
56077
55953
|
if (userUpdateOptions === null || userUpdateOptions === void 0 ? void 0 : userUpdateOptions.reAnimate) {
|
|
56078
55954
|
this.stopAnimation();
|
|
56079
55955
|
this._updateAnimateState(true);
|
|
56080
55956
|
}
|
|
56081
|
-
this._compiler.render();
|
|
56082
55957
|
return this;
|
|
56083
55958
|
}
|
|
56084
55959
|
this._spec.data = array(this._spec.data);
|
|
@@ -56089,11 +55964,11 @@
|
|
|
56089
55964
|
if (this._chart) {
|
|
56090
55965
|
this._chart.updateFullData(data);
|
|
56091
55966
|
if (reRender) {
|
|
55967
|
+
this._compiler.render();
|
|
56092
55968
|
if (userUpdateOptions === null || userUpdateOptions === void 0 ? void 0 : userUpdateOptions.reAnimate) {
|
|
56093
55969
|
this.stopAnimation();
|
|
56094
55970
|
this._updateAnimateState(true);
|
|
56095
55971
|
}
|
|
56096
|
-
this._compiler.render();
|
|
56097
55972
|
}
|
|
56098
55973
|
return this;
|
|
56099
55974
|
}
|
|
@@ -56613,20 +56488,10 @@
|
|
|
56613
56488
|
return (_a = this._chart) === null || _a === void 0 ? void 0 : _a.setDimensionIndex(value, opt);
|
|
56614
56489
|
}
|
|
56615
56490
|
stopAnimation() {
|
|
56616
|
-
var _a;
|
|
56617
|
-
(_a = this.getStage()) === null || _a === void 0 ? void 0 : _a.stopAnimation(true);
|
|
56618
|
-
}
|
|
56619
|
-
reRunNormalAnimation() {
|
|
56620
|
-
var _a;
|
|
56621
|
-
(_a = this.getStage()) === null || _a === void 0 ? void 0 : _a.reApplyAnimationState('normal', true);
|
|
56622
56491
|
}
|
|
56623
56492
|
pauseAnimation() {
|
|
56624
|
-
var _a;
|
|
56625
|
-
(_a = this.getStage()) === null || _a === void 0 ? void 0 : _a.pauseAnimation(true);
|
|
56626
56493
|
}
|
|
56627
56494
|
resumeAnimation() {
|
|
56628
|
-
var _a;
|
|
56629
|
-
(_a = this.getStage()) === null || _a === void 0 ? void 0 : _a.resumeAnimation(true);
|
|
56630
56495
|
}
|
|
56631
56496
|
convertDatumToPosition(datum, dataLinkInfo = {}, isRelativeToCanvas = false, checkInViewData) {
|
|
56632
56497
|
var _a;
|
|
@@ -56910,7 +56775,7 @@
|
|
|
56910
56775
|
});
|
|
56911
56776
|
};
|
|
56912
56777
|
|
|
56913
|
-
const version = "2.0.
|
|
56778
|
+
const version = "2.0.3-alpha.0";
|
|
56914
56779
|
|
|
56915
56780
|
const addVChartProperty = (data, op) => {
|
|
56916
56781
|
const context = op.beforeCall();
|
|
@@ -58723,11 +58588,14 @@
|
|
|
58723
58588
|
}
|
|
58724
58589
|
if (isNil$1(dataView)) {
|
|
58725
58590
|
m.setData(this._data);
|
|
58591
|
+
m.setSkipBeforeLayouted(true);
|
|
58726
58592
|
}
|
|
58727
58593
|
else if (dataView !== false) {
|
|
58728
58594
|
m.setDataView(dataView);
|
|
58729
58595
|
}
|
|
58730
|
-
|
|
58596
|
+
if (isBoolean$1(skipBeforeLayouted)) {
|
|
58597
|
+
m.setSkipBeforeLayouted(skipBeforeLayouted);
|
|
58598
|
+
}
|
|
58731
58599
|
if (!isNil$1(groupKey)) {
|
|
58732
58600
|
m.setGroupKey(groupKey);
|
|
58733
58601
|
}
|
|
@@ -59952,6 +59820,30 @@
|
|
|
59952
59820
|
|
|
59953
59821
|
const lineSeriesMark = Object.assign(Object.assign({}, baseSeriesMark), lineLikeSeriesMark);
|
|
59954
59822
|
|
|
59823
|
+
exports.MarkTypeEnum = void 0;
|
|
59824
|
+
(function (MarkTypeEnum) {
|
|
59825
|
+
MarkTypeEnum["group"] = "group";
|
|
59826
|
+
MarkTypeEnum["symbol"] = "symbol";
|
|
59827
|
+
MarkTypeEnum["rule"] = "rule";
|
|
59828
|
+
MarkTypeEnum["line"] = "line";
|
|
59829
|
+
MarkTypeEnum["text"] = "text";
|
|
59830
|
+
MarkTypeEnum["rect"] = "rect";
|
|
59831
|
+
MarkTypeEnum["image"] = "image";
|
|
59832
|
+
MarkTypeEnum["path"] = "path";
|
|
59833
|
+
MarkTypeEnum["area"] = "area";
|
|
59834
|
+
MarkTypeEnum["arc"] = "arc";
|
|
59835
|
+
MarkTypeEnum["polygon"] = "polygon";
|
|
59836
|
+
MarkTypeEnum["boxPlot"] = "boxPlot";
|
|
59837
|
+
MarkTypeEnum["linkPath"] = "linkPath";
|
|
59838
|
+
MarkTypeEnum["cell"] = "cell";
|
|
59839
|
+
MarkTypeEnum["ripple"] = "ripple";
|
|
59840
|
+
MarkTypeEnum["liquid"] = "liquid";
|
|
59841
|
+
MarkTypeEnum["component"] = "component";
|
|
59842
|
+
MarkTypeEnum["dataLabel"] = "dataLabel";
|
|
59843
|
+
MarkTypeEnum["label"] = "label";
|
|
59844
|
+
MarkTypeEnum["pictogram"] = "pictogram";
|
|
59845
|
+
})(exports.MarkTypeEnum || (exports.MarkTypeEnum = {}));
|
|
59846
|
+
|
|
59955
59847
|
const isStopsEqual = (prev, next) => {
|
|
59956
59848
|
var _a, _b;
|
|
59957
59849
|
if (prev === next) {
|
|
@@ -63118,24 +63010,6 @@
|
|
|
63118
63010
|
};
|
|
63119
63011
|
}
|
|
63120
63012
|
}
|
|
63121
|
-
_updateData() {
|
|
63122
|
-
var _a, _b, _c;
|
|
63123
|
-
const tickTransformType = this.registerTicksTransform();
|
|
63124
|
-
if (this._spec.showAllGroupLayers && this._scales.length > 1) {
|
|
63125
|
-
const layers = (_a = this._spec.layers) !== null && _a !== void 0 ? _a : [];
|
|
63126
|
-
Object.keys(this._tickDataMap).forEach(layer => {
|
|
63127
|
-
const layerConfig = layers[this._scales.length - 1 - +layer] || {};
|
|
63128
|
-
const tickData = this._tickDataMap[layer];
|
|
63129
|
-
const tickTransform = tickData === null || tickData === void 0 ? void 0 : tickData.getDataView().transformsArr.find((t) => t.type === tickTransformType);
|
|
63130
|
-
tickTransform &&
|
|
63131
|
-
(tickTransform.options = Object.assign(Object.assign({}, this._tickTransformOption()), layerConfig));
|
|
63132
|
-
});
|
|
63133
|
-
}
|
|
63134
|
-
else {
|
|
63135
|
-
const tickTransform = (_c = (_b = this._tickData) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.getDataView().transformsArr.find(t => t.type === tickTransformType);
|
|
63136
|
-
tickTransform && (tickTransform.options = this._tickTransformOption());
|
|
63137
|
-
}
|
|
63138
|
-
}
|
|
63139
63013
|
dataToPosition(values, cfg = {}) {
|
|
63140
63014
|
var _a, _b;
|
|
63141
63015
|
if (values.length === 0 || this._scales.length === 0) {
|
|
@@ -63228,7 +63102,7 @@
|
|
|
63228
63102
|
getLabelItems(length) {
|
|
63229
63103
|
const labelItems = [];
|
|
63230
63104
|
let preData = [];
|
|
63231
|
-
|
|
63105
|
+
this._scales.forEach((scale, index) => {
|
|
63232
63106
|
var _a;
|
|
63233
63107
|
const tickData = this._tickDataMap[index];
|
|
63234
63108
|
const isTickDataHaveData = (_a = tickData === null || tickData === void 0 ? void 0 : tickData.getLatestData()) === null || _a === void 0 ? void 0 : _a.length;
|
|
@@ -63410,20 +63284,6 @@
|
|
|
63410
63284
|
minBandSize
|
|
63411
63285
|
};
|
|
63412
63286
|
}
|
|
63413
|
-
_compareSpec(spec, prevSpec) {
|
|
63414
|
-
const result = super._compareSpec(spec, prevSpec);
|
|
63415
|
-
if (result.reMake) {
|
|
63416
|
-
return result;
|
|
63417
|
-
}
|
|
63418
|
-
if ((prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec.showAllGroupLayers) !== (spec === null || spec === void 0 ? void 0 : spec.showAllGroupLayers) || !isEqual(prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec.layers, spec === null || spec === void 0 ? void 0 : spec.layers)) {
|
|
63419
|
-
result.reMake = true;
|
|
63420
|
-
}
|
|
63421
|
-
return result;
|
|
63422
|
-
}
|
|
63423
|
-
reInit(spec) {
|
|
63424
|
-
super.reInit();
|
|
63425
|
-
this === null || this === void 0 ? void 0 : this._updateData();
|
|
63426
|
-
}
|
|
63427
63287
|
}
|
|
63428
63288
|
CartesianBandAxis.type = ComponentTypeEnum.cartesianBandAxis;
|
|
63429
63289
|
CartesianBandAxis.specKey = 'axes';
|
|
@@ -65066,10 +64926,6 @@
|
|
|
65066
64926
|
const elements = [...this._components, ...this._regions, ...this._series];
|
|
65067
64927
|
elements.forEach(element => element.onEvaluateEnd(option));
|
|
65068
64928
|
}
|
|
65069
|
-
onBeforeRender() {
|
|
65070
|
-
const elements = [...this._components, ...this._regions, ...this._series];
|
|
65071
|
-
elements.forEach(element => element.onBeforeRender());
|
|
65072
|
-
}
|
|
65073
64929
|
getLayoutElements() {
|
|
65074
64930
|
return this.getAllModels()
|
|
65075
64931
|
.map(i => i.layout)
|
|
@@ -65535,11 +65391,17 @@
|
|
|
65535
65391
|
}
|
|
65536
65392
|
_enableMarkAnimation(states) {
|
|
65537
65393
|
const marks = this.getAllMarks();
|
|
65538
|
-
marks.forEach(mark =>
|
|
65394
|
+
marks.forEach(mark => {
|
|
65395
|
+
const product = mark.getProduct();
|
|
65396
|
+
if (product && product.animate) ;
|
|
65397
|
+
});
|
|
65539
65398
|
}
|
|
65540
65399
|
_disableMarkAnimation(states) {
|
|
65541
65400
|
const marks = this.getAllMarks();
|
|
65542
|
-
marks.forEach(mark =>
|
|
65401
|
+
marks.forEach(mark => {
|
|
65402
|
+
const product = mark.getProduct();
|
|
65403
|
+
if (product && product.animate) ;
|
|
65404
|
+
});
|
|
65543
65405
|
}
|
|
65544
65406
|
filterGraphicsByDatum(datum, opt = {}) {
|
|
65545
65407
|
var _a;
|
|
@@ -66422,7 +66284,7 @@
|
|
|
66422
66284
|
layoutStartPoint = { x: 0, y: 0 };
|
|
66423
66285
|
}
|
|
66424
66286
|
Object.keys(stateByField).forEach(field => {
|
|
66425
|
-
var _a, _b, _c, _d, _e
|
|
66287
|
+
var _a, _b, _c, _d, _e;
|
|
66426
66288
|
const { currentValue, cacheInfo, labelsComp, attributes, coordKey } = stateByField[field];
|
|
66427
66289
|
let axis = null;
|
|
66428
66290
|
let coord = 0;
|
|
@@ -66434,8 +66296,8 @@
|
|
|
66434
66296
|
item.axis.getLayoutStartPoint()[coordKey] -
|
|
66435
66297
|
layoutStartPoint[coordKey];
|
|
66436
66298
|
axis = item.axis;
|
|
66437
|
-
axisLabel = (
|
|
66438
|
-
.getVRenderComponents()[0]) === null || _a === void 0 ? void 0 : _a.children[0]) === null || _b === void 0 ? void 0 : _b.children[0]) === null || _c === void 0 ? void 0 : _c.
|
|
66299
|
+
axisLabel = (_e = (_d = (_c = (_b = (_a = axis
|
|
66300
|
+
.getVRenderComponents()[0]) === null || _a === void 0 ? void 0 : _a.children[0]) === null || _b === void 0 ? void 0 : _b.children[0]) === null || _c === void 0 ? void 0 : _c.getChildByName('axis-label-container')) === null || _d === void 0 ? void 0 : _d.getChildByName('axis-label-container-layer-0')) === null || _e === void 0 ? void 0 : _e.children[0];
|
|
66439
66301
|
}
|
|
66440
66302
|
const isVisible = !!currentValue.size && Number.isFinite(coord) && !Number.isNaN(coord);
|
|
66441
66303
|
const useCache = enableRemain && !isVisible && isValid$1(cacheInfo);
|
|
@@ -69813,7 +69675,8 @@
|
|
|
69813
69675
|
initMark() {
|
|
69814
69676
|
this._pathMark = this._createMark(MapSeries.mark.area, {
|
|
69815
69677
|
groupKey: this.getDimensionField()[0],
|
|
69816
|
-
isSeriesMark: true
|
|
69678
|
+
isSeriesMark: true,
|
|
69679
|
+
skipBeforeLayouted: true
|
|
69817
69680
|
}, {
|
|
69818
69681
|
morph: shouldMarkDoMorph(this._spec, MapSeries.mark.area.name),
|
|
69819
69682
|
morphElementKey: this.getDimensionField()[0]
|
|
@@ -73299,6 +73162,7 @@
|
|
|
73299
73162
|
this._pieMark = this._createMark(Object.assign(Object.assign({}, BasePieSeries.mark.pie), { name: this._pieMarkName, type: this._pieMarkType }), {
|
|
73300
73163
|
key: DEFAULT_DATA_KEY,
|
|
73301
73164
|
groupKey: this._seriesField,
|
|
73165
|
+
skipBeforeLayouted: true,
|
|
73302
73166
|
isSeriesMark: true
|
|
73303
73167
|
}, {
|
|
73304
73168
|
morph: shouldMarkDoMorph(this._spec, this._pieMarkName),
|
|
@@ -74763,16 +74627,17 @@
|
|
|
74763
74627
|
const userUpdateContent = (_c = (_b = (_a = this.spec) === null || _a === void 0 ? void 0 : _a[activeType]) === null || _b === void 0 ? void 0 : _b.updateContent) !== null && _c !== void 0 ? _c : (_d = chartTooltipSpec === null || chartTooltipSpec === void 0 ? void 0 : chartTooltipSpec[activeType]) === null || _d === void 0 ? void 0 : _d.updateContent;
|
|
74764
74628
|
if (res && !userUpdateContent) {
|
|
74765
74629
|
res.updateContent = (prev, datum, params) => {
|
|
74630
|
+
var _a, _b;
|
|
74766
74631
|
const childrenContent = [];
|
|
74767
74632
|
const childrenPrev = prev.filter((p) => p.key === 'children');
|
|
74768
74633
|
childrenPrev.length > 0 &&
|
|
74769
|
-
childrenPrev[0].value.forEach((element) => {
|
|
74634
|
+
((_b = (_a = childrenPrev === null || childrenPrev === void 0 ? void 0 : childrenPrev[0]) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.forEach((element) => {
|
|
74770
74635
|
let flag = true;
|
|
74771
74636
|
for (const key in element) {
|
|
74772
74637
|
childrenContent.push(Object.assign(Object.assign({}, childrenPrev[0]), { shapeType: 'circle', hasShape: flag, key: key, value: element[key] + '' }));
|
|
74773
74638
|
flag = false;
|
|
74774
74639
|
}
|
|
74775
|
-
});
|
|
74640
|
+
}));
|
|
74776
74641
|
return prev.concat(childrenContent);
|
|
74777
74642
|
};
|
|
74778
74643
|
}
|
|
@@ -74795,13 +74660,21 @@
|
|
|
74795
74660
|
}
|
|
74796
74661
|
}
|
|
74797
74662
|
const dataOp = datum[op];
|
|
74798
|
-
dataOp
|
|
74799
|
-
|
|
74663
|
+
if (dataOp && dataOp.length > 0) {
|
|
74664
|
+
dataOp === null || dataOp === void 0 ? void 0 : dataOp.forEach((d, i) => {
|
|
74665
|
+
result.push(Object.assign({}, dataKeyObj, d, {
|
|
74666
|
+
[DEFAULT_DATA_INDEX]: index,
|
|
74667
|
+
[DEFAULT_DATA_KEY]: `${dataKey}_${i}`
|
|
74668
|
+
}));
|
|
74669
|
+
index++;
|
|
74670
|
+
});
|
|
74671
|
+
}
|
|
74672
|
+
else {
|
|
74673
|
+
result.push(Object.assign({}, dataKeyObj, {
|
|
74800
74674
|
[DEFAULT_DATA_INDEX]: index,
|
|
74801
|
-
[DEFAULT_DATA_KEY]:
|
|
74675
|
+
[DEFAULT_DATA_KEY]: dataKey
|
|
74802
74676
|
}));
|
|
74803
|
-
|
|
74804
|
-
});
|
|
74677
|
+
}
|
|
74805
74678
|
});
|
|
74806
74679
|
return result;
|
|
74807
74680
|
};
|
|
@@ -74894,7 +74767,7 @@
|
|
|
74894
74767
|
}
|
|
74895
74768
|
}
|
|
74896
74769
|
initData() {
|
|
74897
|
-
var _a;
|
|
74770
|
+
var _a, _b;
|
|
74898
74771
|
super.initData();
|
|
74899
74772
|
this._xDimensionStatisticsDomain = this.getRawData().latestData.map((d) => d[this._fieldY[0]]);
|
|
74900
74773
|
registerDataSetInstanceTransform(this._option.dataSet, 'objFlat', objFlat);
|
|
@@ -74905,9 +74778,31 @@
|
|
|
74905
74778
|
options: 'dots',
|
|
74906
74779
|
level: exports.TransformLevel.dotObjFlat
|
|
74907
74780
|
}, false);
|
|
74781
|
+
(_b = this.getRawData()) === null || _b === void 0 ? void 0 : _b.transform({
|
|
74782
|
+
type: 'objFlat',
|
|
74783
|
+
options: 'dots',
|
|
74784
|
+
level: exports.TransformLevel.dotObjFlat
|
|
74785
|
+
}, false);
|
|
74786
|
+
}
|
|
74787
|
+
_statisticViewData() {
|
|
74788
|
+
var _a;
|
|
74789
|
+
super._statisticViewData();
|
|
74790
|
+
(_a = this._viewDataStatistics) === null || _a === void 0 ? void 0 : _a.transform({
|
|
74791
|
+
type: 'objFlat',
|
|
74792
|
+
options: 'dots',
|
|
74793
|
+
level: exports.TransformLevel.dotObjFlat
|
|
74794
|
+
}, false);
|
|
74908
74795
|
}
|
|
74909
74796
|
getStatisticFields() {
|
|
74910
|
-
|
|
74797
|
+
const result = [{ key: this._fieldY[0], operations: ['values'], customize: this._xDimensionStatisticsDomain }];
|
|
74798
|
+
const { linearMode = true } = this._spec;
|
|
74799
|
+
if (linearMode) {
|
|
74800
|
+
result.push({ key: this._fieldX[0], operations: ['min', 'max'] });
|
|
74801
|
+
}
|
|
74802
|
+
else {
|
|
74803
|
+
result.push({ key: this._fieldX[0], operations: ['values'] });
|
|
74804
|
+
}
|
|
74805
|
+
return result;
|
|
74911
74806
|
}
|
|
74912
74807
|
setAttrFromSpec() {
|
|
74913
74808
|
var _a;
|
|
@@ -74952,20 +74847,21 @@
|
|
|
74952
74847
|
});
|
|
74953
74848
|
}
|
|
74954
74849
|
initMarkStyle() {
|
|
74850
|
+
var _a, _b;
|
|
74955
74851
|
const clipMark = this._clipMark;
|
|
74956
74852
|
if (clipMark) {
|
|
74957
74853
|
this.setMarkStyle(clipMark, {
|
|
74958
|
-
x: -this._spec.leftAppendPadding,
|
|
74854
|
+
x: -((_a = this._spec.leftAppendPadding) !== null && _a !== void 0 ? _a : 0),
|
|
74959
74855
|
y: 0,
|
|
74960
74856
|
width: 10000,
|
|
74961
|
-
height: this._spec.clipHeight
|
|
74857
|
+
height: () => { var _a; return (_a = this._spec.clipHeight) !== null && _a !== void 0 ? _a : this._region.getLayoutRect().height; }
|
|
74962
74858
|
}, 'normal', exports.AttributeLevel.Series);
|
|
74963
74859
|
clipMark.setMarkConfig({ interactive: false, clip: true });
|
|
74964
74860
|
}
|
|
74965
74861
|
const containerMark = this._containerMark;
|
|
74966
74862
|
if (containerMark) {
|
|
74967
74863
|
this.setMarkStyle(containerMark, {
|
|
74968
|
-
x: this._spec.leftAppendPadding
|
|
74864
|
+
x: (_b = this._spec.leftAppendPadding) !== null && _b !== void 0 ? _b : 0
|
|
74969
74865
|
}, 'normal', exports.AttributeLevel.Series);
|
|
74970
74866
|
containerMark.setMarkConfig({ interactive: false });
|
|
74971
74867
|
}
|
|
@@ -75190,7 +75086,13 @@
|
|
|
75190
75086
|
}
|
|
75191
75087
|
}
|
|
75192
75088
|
|
|
75193
|
-
|
|
75089
|
+
var LinkType;
|
|
75090
|
+
(function (LinkType) {
|
|
75091
|
+
LinkType["line"] = "line";
|
|
75092
|
+
LinkType["curve"] = "curve";
|
|
75093
|
+
})(LinkType || (LinkType = {}));
|
|
75094
|
+
|
|
75095
|
+
const linkSeriesMark = Object.assign(Object.assign({}, baseSeriesMark), { ["group"]: { name: "group", type: "group" }, ["link"]: { name: "link", type: "rule" }, ["curveLink"]: { name: "curveLink", type: "path" }, ["arrow"]: { name: "arrow", type: "symbol" }, ["imageLabel"]: { name: "imageLabel", type: "image" } });
|
|
75194
75096
|
|
|
75195
75097
|
const linkDotInfo = (data, op) => {
|
|
75196
75098
|
const { infoKey, fields, linkData, dotData } = op;
|
|
@@ -75232,6 +75134,7 @@
|
|
|
75232
75134
|
constructor() {
|
|
75233
75135
|
super(...arguments);
|
|
75234
75136
|
this.type = exports.SeriesTypeEnum.link;
|
|
75137
|
+
this._curveLinkCountMap = {};
|
|
75235
75138
|
}
|
|
75236
75139
|
getFromField() {
|
|
75237
75140
|
return this._fromField;
|
|
@@ -75302,11 +75205,12 @@
|
|
|
75302
75205
|
this.setDotSeriesSpec(this._spec.dotSeriesSpec);
|
|
75303
75206
|
}
|
|
75304
75207
|
initMark() {
|
|
75208
|
+
const { linkType = LinkType.line, imageLabelField } = this._spec;
|
|
75305
75209
|
this._clipMark = this._createMark(LinkSeries.mark.group);
|
|
75306
75210
|
this._containerMark = this._createMark(LinkSeries.mark.group, {
|
|
75307
75211
|
parent: this._clipMark
|
|
75308
75212
|
});
|
|
75309
|
-
this._linkMark = this._createMark(LinkSeries.mark.link, {
|
|
75213
|
+
this._linkMark = this._createMark(linkType === LinkType.curve ? LinkSeries.mark.curveLink : LinkSeries.mark.link, {
|
|
75310
75214
|
skipBeforeLayouted: false,
|
|
75311
75215
|
parent: this._containerMark
|
|
75312
75216
|
});
|
|
@@ -75315,16 +75219,23 @@
|
|
|
75315
75219
|
isSeriesMark: true,
|
|
75316
75220
|
parent: this._containerMark
|
|
75317
75221
|
});
|
|
75222
|
+
if (imageLabelField) {
|
|
75223
|
+
this._imageLabelMark = this._createMark(LinkSeries.mark.imageLabel, {
|
|
75224
|
+
skipBeforeLayouted: false,
|
|
75225
|
+
isSeriesMark: true,
|
|
75226
|
+
parent: this._containerMark
|
|
75227
|
+
});
|
|
75228
|
+
}
|
|
75318
75229
|
}
|
|
75319
75230
|
initMarkStyle() {
|
|
75320
|
-
var _a, _b, _c, _d;
|
|
75231
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
75321
75232
|
const clipMark = this._clipMark;
|
|
75322
75233
|
if (clipMark) {
|
|
75323
75234
|
this.setMarkStyle(clipMark, {
|
|
75324
|
-
x: -this._spec.leftAppendPadding,
|
|
75235
|
+
x: -((_a = this._spec.leftAppendPadding) !== null && _a !== void 0 ? _a : 0),
|
|
75325
75236
|
y: 0,
|
|
75326
75237
|
width: 10000,
|
|
75327
|
-
height: this._spec.clipHeight
|
|
75238
|
+
height: () => { var _a; return (_a = this._spec.clipHeight) !== null && _a !== void 0 ? _a : this._region.getLayoutRect().height; }
|
|
75328
75239
|
}, 'normal', exports.AttributeLevel.Series);
|
|
75329
75240
|
clipMark.setMarkConfig({ interactive: false, clip: true });
|
|
75330
75241
|
}
|
|
@@ -75337,19 +75248,43 @@
|
|
|
75337
75248
|
containerMark.setMarkConfig({ interactive: false });
|
|
75338
75249
|
}
|
|
75339
75250
|
const linkMark = this._linkMark;
|
|
75251
|
+
const { linkType = LinkType.line } = this._spec;
|
|
75340
75252
|
if (linkMark) {
|
|
75341
|
-
|
|
75342
|
-
|
|
75343
|
-
|
|
75344
|
-
|
|
75345
|
-
|
|
75346
|
-
|
|
75347
|
-
|
|
75348
|
-
|
|
75253
|
+
if (linkType === LinkType.curve) {
|
|
75254
|
+
this.setMarkStyle(linkMark, {
|
|
75255
|
+
stroke: (_d = (_c = (_b = this._spec.link) === null || _b === void 0 ? void 0 : _b.style) === null || _c === void 0 ? void 0 : _c.stroke) !== null && _d !== void 0 ? _d : this.getColorAttribute(),
|
|
75256
|
+
strokeOpacity: this.dataToOpacity.bind(this),
|
|
75257
|
+
path: (datum) => {
|
|
75258
|
+
const fromX = this.dataToPositionXFrom(datum);
|
|
75259
|
+
const fromY = this.dataToPositionYFrom(datum);
|
|
75260
|
+
const toX = this.dataToPositionXTo(datum);
|
|
75261
|
+
const toY = this.dataToPositionYTo(datum);
|
|
75262
|
+
const curveLinkCount = this._curveLinkCountMap[`${fromX}-${fromY}-${toX}-${toY}`] || 1;
|
|
75263
|
+
this._curveLinkCountMap[`${fromX}-${fromY}-${toX}-${toY}`] = curveLinkCount + 1;
|
|
75264
|
+
const curveRatio = 0.5 + curveLinkCount * 0.1;
|
|
75265
|
+
const controlX1 = fromX + (toX - fromX) * 0.7;
|
|
75266
|
+
const controlY1 = fromY;
|
|
75267
|
+
const controlX2 = toX - (toX - fromX) * curveRatio;
|
|
75268
|
+
const controlY2 = toY;
|
|
75269
|
+
return `M ${fromX} ${fromY} C ${controlX1} ${controlY1}, ${controlX2} ${controlY2}, ${toX} ${toY}`;
|
|
75270
|
+
},
|
|
75271
|
+
lineWidth: (_f = (_e = this._spec.link.style) === null || _e === void 0 ? void 0 : _e.lineWidth) !== null && _f !== void 0 ? _f : 1
|
|
75272
|
+
}, 'normal', exports.AttributeLevel.Series);
|
|
75273
|
+
}
|
|
75274
|
+
else {
|
|
75275
|
+
this.setMarkStyle(linkMark, {
|
|
75276
|
+
stroke: this.getColorAttribute(),
|
|
75277
|
+
strokeOpacity: this.dataToOpacity.bind(this),
|
|
75278
|
+
x: this.dataToPositionXFrom.bind(this),
|
|
75279
|
+
y: this.dataToPositionYFrom.bind(this),
|
|
75280
|
+
x1: this.dataToPositionXTo.bind(this),
|
|
75281
|
+
y1: this.dataToPositionYTo.bind(this)
|
|
75282
|
+
}, 'normal', exports.AttributeLevel.Series);
|
|
75283
|
+
}
|
|
75349
75284
|
}
|
|
75350
75285
|
const arrowMark = this._arrowMark;
|
|
75351
75286
|
if (arrowMark) {
|
|
75352
|
-
const arrowSize = (
|
|
75287
|
+
const arrowSize = (_k = (_j = (_h = (_g = this._theme) === null || _g === void 0 ? void 0 : _g.arrow) === null || _h === void 0 ? void 0 : _h.style) === null || _j === void 0 ? void 0 : _j.size) !== null && _k !== void 0 ? _k : 10;
|
|
75353
75288
|
this.setMarkStyle(arrowMark, {
|
|
75354
75289
|
x: this.dataToPositionXTo.bind(this),
|
|
75355
75290
|
y: (datum) => this.dataToPositionArrowYTo(datum, arrowSize),
|
|
@@ -75361,18 +75296,44 @@
|
|
|
75361
75296
|
}
|
|
75362
75297
|
}, 'normal', exports.AttributeLevel.Series);
|
|
75363
75298
|
}
|
|
75299
|
+
const imageLabelMark = this._imageLabelMark;
|
|
75300
|
+
if (imageLabelMark) {
|
|
75301
|
+
const { style = {} } = this._spec.imageLabel;
|
|
75302
|
+
const { width = 40, height = 40 } = style;
|
|
75303
|
+
this.setMarkStyle(imageLabelMark, {
|
|
75304
|
+
x: datum => {
|
|
75305
|
+
return (this.dataToPositionXFrom(datum) + this.dataToPositionXTo(datum)) / 2 - width / 2;
|
|
75306
|
+
},
|
|
75307
|
+
y: datum => {
|
|
75308
|
+
return (this.dataToPositionYFrom(datum) + this.dataToPositionYTo(datum)) / 2 - height / 2;
|
|
75309
|
+
},
|
|
75310
|
+
width,
|
|
75311
|
+
height,
|
|
75312
|
+
image: datum => {
|
|
75313
|
+
return datum[this._spec.imageLabelField];
|
|
75314
|
+
}
|
|
75315
|
+
}, 'normal', exports.AttributeLevel.Series);
|
|
75316
|
+
}
|
|
75364
75317
|
}
|
|
75365
75318
|
afterInitMark() {
|
|
75366
75319
|
super.afterInitMark();
|
|
75367
75320
|
}
|
|
75368
75321
|
dataToPositionXFrom(datum) {
|
|
75322
|
+
var _a, _b, _c, _d;
|
|
75369
75323
|
if (!this._xAxisHelper) {
|
|
75370
75324
|
return Number.NaN;
|
|
75371
75325
|
}
|
|
75372
75326
|
const { dataToPosition } = this._xAxisHelper;
|
|
75373
|
-
|
|
75327
|
+
const allowExtend = this._spec.allowExtend;
|
|
75328
|
+
const bandSize = (_c = (_b = (_a = this._xAxisHelper) === null || _a === void 0 ? void 0 : _a.getBandwidth) === null || _b === void 0 ? void 0 : _b.call(_a, 0)) !== null && _c !== void 0 ? _c : 0;
|
|
75329
|
+
const { style = {} } = (_d = this._dotSeriesSpec.symbol) !== null && _d !== void 0 ? _d : {};
|
|
75330
|
+
const { size: dotSize = 10 } = style;
|
|
75331
|
+
return (dataToPosition(this.getDatumPositionValues(datum, this._fromField + '_xField'), {
|
|
75374
75332
|
bandPosition: this._bandPosition
|
|
75375
|
-
})
|
|
75333
|
+
}) +
|
|
75334
|
+
(allowExtend && (!datum.isExtend || datum.isExtend === 'left')
|
|
75335
|
+
? -(array(bandSize)[0] + dotSize) / 2
|
|
75336
|
+
: 0));
|
|
75376
75337
|
}
|
|
75377
75338
|
dataToPositionYFrom(datum) {
|
|
75378
75339
|
if (!this._yAxisHelper) {
|
|
@@ -75382,13 +75343,21 @@
|
|
|
75382
75343
|
return dataToPosition(this.getDatumPositionValues(datum, this._fromField + '_yField'));
|
|
75383
75344
|
}
|
|
75384
75345
|
dataToPositionXTo(datum) {
|
|
75346
|
+
var _a, _b, _c, _d;
|
|
75385
75347
|
if (!this._xAxisHelper) {
|
|
75386
75348
|
return Number.NaN;
|
|
75387
75349
|
}
|
|
75388
75350
|
const { dataToPosition } = this._xAxisHelper;
|
|
75389
|
-
|
|
75351
|
+
const allowExtend = this._spec.allowExtend;
|
|
75352
|
+
const bandSize = (_c = (_b = (_a = this._xAxisHelper) === null || _a === void 0 ? void 0 : _a.getBandwidth) === null || _b === void 0 ? void 0 : _b.call(_a, 0)) !== null && _c !== void 0 ? _c : 0;
|
|
75353
|
+
const { style = {} } = (_d = this._dotSeriesSpec.symbol) !== null && _d !== void 0 ? _d : {};
|
|
75354
|
+
const { size: dotSize = 10 } = style;
|
|
75355
|
+
return (dataToPosition(this.getDatumPositionValues(datum, this._toField + '_xField'), {
|
|
75390
75356
|
bandPosition: this._bandPosition
|
|
75391
|
-
})
|
|
75357
|
+
}) +
|
|
75358
|
+
(allowExtend && (!datum.isExtend || datum.isExtend === 'right')
|
|
75359
|
+
? (array(bandSize)[0] + dotSize) / 2
|
|
75360
|
+
: 0));
|
|
75392
75361
|
}
|
|
75393
75362
|
dataToPositionYTo(datum) {
|
|
75394
75363
|
if (!this._yAxisHelper) {
|
|
@@ -75410,9 +75379,10 @@
|
|
|
75410
75379
|
}) + offset);
|
|
75411
75380
|
}
|
|
75412
75381
|
dataToOpacity(datum) {
|
|
75413
|
-
if (this.
|
|
75414
|
-
this.isPositionXOuterRange(datum, this.
|
|
75415
|
-
|
|
75382
|
+
if (!this._spec.allowExtend &&
|
|
75383
|
+
(this.isPositionXOuterRange(datum, this._fromField + '_xField') ||
|
|
75384
|
+
this.isPositionXOuterRange(datum, this._toField + '_xField') ||
|
|
75385
|
+
datum[this._fromField] === datum[this._toField])) {
|
|
75416
75386
|
return 0;
|
|
75417
75387
|
}
|
|
75418
75388
|
return 1;
|
|
@@ -80957,6 +80927,7 @@
|
|
|
80957
80927
|
if (this._spec.isTransform) {
|
|
80958
80928
|
this._funnelTransformMark = this._createMark(Object.assign(Object.assign({}, FunnelSeries.mark.transform), { name: this._transformMarkName, type: this._transformMarkType }), {
|
|
80959
80929
|
themeSpec: (_b = this._theme) === null || _b === void 0 ? void 0 : _b.transform,
|
|
80930
|
+
skipBeforeLayouted: true,
|
|
80960
80931
|
noSeparateStyle: true
|
|
80961
80932
|
});
|
|
80962
80933
|
if (this._funnelTransformMark) {
|
|
@@ -80969,6 +80940,7 @@
|
|
|
80969
80940
|
this._funnelOuterLabelMark.label = this._createMark(FunnelSeries.mark.outerLabel, {
|
|
80970
80941
|
themeSpec: (_h = this._theme) === null || _h === void 0 ? void 0 : _h.outerLabel,
|
|
80971
80942
|
markSpec: this._spec.outerLabel,
|
|
80943
|
+
skipBeforeLayouted: true,
|
|
80972
80944
|
noSeparateStyle: true,
|
|
80973
80945
|
parent: false
|
|
80974
80946
|
});
|
|
@@ -89709,15 +89681,11 @@
|
|
|
89709
89681
|
});
|
|
89710
89682
|
};
|
|
89711
89683
|
this._handleClickToLock = (params) => {
|
|
89712
|
-
var _a, _b;
|
|
89713
89684
|
if (this._clickLock) {
|
|
89714
89685
|
this._handleChartMouseOut(params);
|
|
89715
89686
|
this._clickLock = false;
|
|
89716
89687
|
}
|
|
89717
89688
|
else {
|
|
89718
|
-
if (!this._isTooltipShown && !((_b = (_a = this.tooltipHandler) === null || _a === void 0 ? void 0 : _a.isTooltipShown) === null || _b === void 0 ? void 0 : _b.call(_a))) {
|
|
89719
|
-
return;
|
|
89720
|
-
}
|
|
89721
89689
|
this._clickLock = true;
|
|
89722
89690
|
}
|
|
89723
89691
|
};
|
|
@@ -90016,9 +89984,6 @@
|
|
|
90016
89984
|
return;
|
|
90017
89985
|
}
|
|
90018
89986
|
this._isEnterTooltip = false;
|
|
90019
|
-
if (this._spec.triggerOff === 'none') {
|
|
90020
|
-
return;
|
|
90021
|
-
}
|
|
90022
89987
|
if (this._cacheEnterableRect) {
|
|
90023
89988
|
const newRect = (_a = container.getBoundingClientRect) === null || _a === void 0 ? void 0 : _a.call(container);
|
|
90024
89989
|
if (newRect &&
|
|
@@ -90035,10 +90000,7 @@
|
|
|
90035
90000
|
const activeType = this._spec.activeType;
|
|
90036
90001
|
this.processor = {};
|
|
90037
90002
|
activeType.forEach(type => {
|
|
90038
|
-
|
|
90039
|
-
if (instance) {
|
|
90040
|
-
this.processor[type] = instance;
|
|
90041
|
-
}
|
|
90003
|
+
this.processor[type] = Factory.createTooltipProcessor(type, this);
|
|
90042
90004
|
});
|
|
90043
90005
|
}
|
|
90044
90006
|
_initEvent() {
|
|
@@ -90466,7 +90428,7 @@
|
|
|
90466
90428
|
this.event.off(eventName, handler);
|
|
90467
90429
|
}
|
|
90468
90430
|
}
|
|
90469
|
-
|
|
90431
|
+
updateLayoutAttribute() {
|
|
90470
90432
|
this._limitBounds = null;
|
|
90471
90433
|
this._showDefaultCrosshair();
|
|
90472
90434
|
}
|
|
@@ -91350,7 +91312,7 @@
|
|
|
91350
91312
|
return data.filter(filter);
|
|
91351
91313
|
};
|
|
91352
91314
|
const dataFilterComputeDomain = (data, op) => {
|
|
91353
|
-
const { stateFields, valueFields, dataCollection, isCategoryState } = op.input;
|
|
91315
|
+
const { stateFields, valueFields, dataCollection, isCategoryState, seriesTypes } = op.input;
|
|
91354
91316
|
const { stateField, valueField } = op.output;
|
|
91355
91317
|
const resultObj = {};
|
|
91356
91318
|
const resultData = [];
|
|
@@ -91371,7 +91333,8 @@
|
|
|
91371
91333
|
}
|
|
91372
91334
|
});
|
|
91373
91335
|
}
|
|
91374
|
-
dv.latestData
|
|
91336
|
+
const data = seriesTypes[i] === 'dot' ? objFlat(dv.latestData, 'dots') : dv.latestData;
|
|
91337
|
+
data.forEach((d) => {
|
|
91375
91338
|
array(stateFields[i]).forEach(state => {
|
|
91376
91339
|
if (!isNil$1(d[state])) {
|
|
91377
91340
|
if (isNil$1(resultObj[d[state]])) {
|
|
@@ -91456,30 +91419,39 @@
|
|
|
91456
91419
|
const axisScale = axis.getScale();
|
|
91457
91420
|
const reverse = this._isReverse();
|
|
91458
91421
|
const newRangeFactor = reverse ? [1 - this._end, 1 - this._start] : [this._start, this._end];
|
|
91422
|
+
const linkedAxis = this._linkedAxisComponent;
|
|
91459
91423
|
if (reverse) {
|
|
91460
91424
|
switch (tag) {
|
|
91461
91425
|
case 'startHandler':
|
|
91462
91426
|
axis.scaleRangeFactorEnd(newRangeFactor[1]);
|
|
91427
|
+
linkedAxis === null || linkedAxis === void 0 ? void 0 : linkedAxis.scaleRangeFactorEnd(newRangeFactor[1]);
|
|
91463
91428
|
break;
|
|
91464
91429
|
case 'endHandler':
|
|
91465
91430
|
axis.scaleRangeFactorStart(newRangeFactor[0]);
|
|
91431
|
+
linkedAxis === null || linkedAxis === void 0 ? void 0 : linkedAxis.scaleRangeFactorStart(newRangeFactor[0]);
|
|
91466
91432
|
break;
|
|
91467
91433
|
default:
|
|
91468
91434
|
axis.scaleRangeFactorStart(newRangeFactor[0], true);
|
|
91469
91435
|
axis.scaleRangeFactorEnd(newRangeFactor[1]);
|
|
91436
|
+
linkedAxis === null || linkedAxis === void 0 ? void 0 : linkedAxis.scaleRangeFactorStart(newRangeFactor[0], true);
|
|
91437
|
+
linkedAxis === null || linkedAxis === void 0 ? void 0 : linkedAxis.scaleRangeFactorEnd(newRangeFactor[1]);
|
|
91470
91438
|
}
|
|
91471
91439
|
}
|
|
91472
91440
|
else {
|
|
91473
91441
|
switch (tag) {
|
|
91474
91442
|
case 'startHandler':
|
|
91475
91443
|
axis.scaleRangeFactorStart(newRangeFactor[0]);
|
|
91444
|
+
linkedAxis === null || linkedAxis === void 0 ? void 0 : linkedAxis.scaleRangeFactorStart(newRangeFactor[0]);
|
|
91476
91445
|
break;
|
|
91477
91446
|
case 'endHandler':
|
|
91478
91447
|
axis.scaleRangeFactorEnd(newRangeFactor[1]);
|
|
91448
|
+
linkedAxis === null || linkedAxis === void 0 ? void 0 : linkedAxis.scaleRangeFactorEnd(newRangeFactor[1]);
|
|
91479
91449
|
break;
|
|
91480
91450
|
default:
|
|
91481
91451
|
axis.scaleRangeFactorEnd(newRangeFactor[1], true);
|
|
91452
|
+
linkedAxis === null || linkedAxis === void 0 ? void 0 : linkedAxis.scaleRangeFactorEnd(newRangeFactor[1], true);
|
|
91482
91453
|
axis.scaleRangeFactorStart(newRangeFactor[0]);
|
|
91454
|
+
linkedAxis === null || linkedAxis === void 0 ? void 0 : linkedAxis.scaleRangeFactorStart(newRangeFactor[0]);
|
|
91483
91455
|
}
|
|
91484
91456
|
}
|
|
91485
91457
|
const newFactor = axisScale.rangeFactor();
|
|
@@ -91661,6 +91633,12 @@
|
|
|
91661
91633
|
else if (isValid$1(this._spec.axisIndex)) {
|
|
91662
91634
|
this._relatedAxisComponent = this._option.getComponentByIndex('axes', this._spec.axisIndex);
|
|
91663
91635
|
}
|
|
91636
|
+
if (isValid$1(this._spec.linkedAxisId)) {
|
|
91637
|
+
this._linkedAxisComponent = this._option.getComponentByUserId(this._spec.linkedAxisId);
|
|
91638
|
+
}
|
|
91639
|
+
else if (isValid$1(this._spec.linkedAxisIndex)) {
|
|
91640
|
+
this._linkedAxisComponent = this._option.getComponentByIndex('axes', this._spec.linkedAxisIndex);
|
|
91641
|
+
}
|
|
91664
91642
|
if (isNil$1(this._spec.field) && !this._relatedAxisComponent) {
|
|
91665
91643
|
const axes = this._option.getComponentsByKey('axes');
|
|
91666
91644
|
const sameOrientAxis = axes.find((cm) => cm._orient === this._orient);
|
|
@@ -91743,11 +91721,15 @@
|
|
|
91743
91721
|
const dataCollection = [];
|
|
91744
91722
|
const stateFields = [];
|
|
91745
91723
|
const valueFields = [];
|
|
91724
|
+
const seriesTypes = [];
|
|
91746
91725
|
let isCategoryState;
|
|
91747
91726
|
if (this._relatedAxisComponent) {
|
|
91748
91727
|
const originalStateFields = {};
|
|
91749
91728
|
eachSeries(this._regions, s => {
|
|
91750
91729
|
var _a, _b;
|
|
91730
|
+
if (s.type === 'link') {
|
|
91731
|
+
return;
|
|
91732
|
+
}
|
|
91751
91733
|
const xAxisHelper = s.coordinate === 'cartesian'
|
|
91752
91734
|
? s.getXAxisHelper()
|
|
91753
91735
|
: s.coordinate === 'polar'
|
|
@@ -91770,6 +91752,7 @@
|
|
|
91770
91752
|
: yAxisHelper;
|
|
91771
91753
|
const valueAxisHelper = stateAxisHelper === xAxisHelper ? yAxisHelper : xAxisHelper;
|
|
91772
91754
|
dataCollection.push(s.getRawData());
|
|
91755
|
+
seriesTypes.push(s.type);
|
|
91773
91756
|
const seriesSpec = s.getSpec();
|
|
91774
91757
|
const xField = s.coordinate === 'cartesian'
|
|
91775
91758
|
? array(seriesSpec.xField)
|
|
@@ -91788,7 +91771,7 @@
|
|
|
91788
91771
|
}
|
|
91789
91772
|
if (this._valueField) {
|
|
91790
91773
|
const valueField = s.type === 'link' ? ['from_yField'] : valueAxisHelper === xAxisHelper ? xField : yField;
|
|
91791
|
-
if (isContinuous(valueAxisHelper.getScale(0).type)) {
|
|
91774
|
+
if (isContinuous(valueAxisHelper.getScale(0).type) || s.type === 'dot') {
|
|
91792
91775
|
valueFields.push(...valueField);
|
|
91793
91776
|
}
|
|
91794
91777
|
}
|
|
@@ -91821,7 +91804,8 @@
|
|
|
91821
91804
|
dataCollection: dataCollection,
|
|
91822
91805
|
stateFields,
|
|
91823
91806
|
valueFields,
|
|
91824
|
-
isCategoryState
|
|
91807
|
+
isCategoryState,
|
|
91808
|
+
seriesTypes
|
|
91825
91809
|
},
|
|
91826
91810
|
output: {
|
|
91827
91811
|
stateField: this._stateField,
|
|
@@ -91829,9 +91813,9 @@
|
|
|
91829
91813
|
}
|
|
91830
91814
|
}
|
|
91831
91815
|
}, false);
|
|
91832
|
-
this._data = new CompilableData(this._option, data);
|
|
91833
91816
|
data.reRunAllTransform();
|
|
91834
91817
|
dataSet.multipleDataViewAddListener(dataCollection, 'change', this._handleDataCollectionChange.bind(this));
|
|
91818
|
+
this._data = new CompilableData(this._option, data);
|
|
91835
91819
|
}
|
|
91836
91820
|
setAttrFromSpec() {
|
|
91837
91821
|
var _a;
|
|
@@ -92029,7 +92013,7 @@
|
|
|
92029
92013
|
_initCommonEvent() {
|
|
92030
92014
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
92031
92015
|
const delayType = (_b = (_a = this._spec) === null || _a === void 0 ? void 0 : _a.delayType) !== null && _b !== void 0 ? _b : 'throttle';
|
|
92032
|
-
const delayTime = isValid$1((_c = this._spec) === null || _c === void 0 ? void 0 : _c.delayType) ? (_e = (_d = this._spec) === null || _d === void 0 ? void 0 : _d.delayTime) !== null && _e !== void 0 ? _e : 30 : 0;
|
|
92016
|
+
const delayTime = isValid$1((_c = this._spec) === null || _c === void 0 ? void 0 : _c.delayType) ? ((_e = (_d = this._spec) === null || _d === void 0 ? void 0 : _d.delayTime) !== null && _e !== void 0 ? _e : 30) : 0;
|
|
92033
92017
|
const realTime = (_g = (_f = this._spec) === null || _f === void 0 ? void 0 : _f.realTime) !== null && _g !== void 0 ? _g : true;
|
|
92034
92018
|
const option = { delayType, delayTime, realTime, allowComponentZoom: true };
|
|
92035
92019
|
if (this._zoomAttr.enable) {
|
|
@@ -95177,7 +95161,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
95177
95161
|
this._option.globalInstance.on(exports.ChartEvent.rendered, () => {
|
|
95178
95162
|
var _a;
|
|
95179
95163
|
if ((_a = this._spec) === null || _a === void 0 ? void 0 : _a.auto) {
|
|
95180
|
-
this._playerComponent.pause();
|
|
95181
95164
|
this._playerComponent.play();
|
|
95182
95165
|
}
|
|
95183
95166
|
});
|
|
@@ -96569,7 +96552,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
96569
96552
|
var _a;
|
|
96570
96553
|
this._setRegionMarkPickable(region, true);
|
|
96571
96554
|
const { operateMask } = e.detail;
|
|
96572
|
-
const { updateElementsState = true } = this._spec;
|
|
96573
96555
|
if ((_a = this._spec) === null || _a === void 0 ? void 0 : _a.onBrushEnd) {
|
|
96574
96556
|
if (this._spec.onBrushEnd(e) === true) {
|
|
96575
96557
|
this.clearGraphic();
|
|
@@ -96583,7 +96565,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
96583
96565
|
}
|
|
96584
96566
|
else {
|
|
96585
96567
|
const inBrushData = this._extendDataInBrush(this._inBrushElementsMap);
|
|
96586
|
-
if (
|
|
96568
|
+
if (!this._spec.zoomWhenEmpty && inBrushData.length > 0) {
|
|
96587
96569
|
this._setAxisAndDataZoom(operateMask, region);
|
|
96588
96570
|
}
|
|
96589
96571
|
this._emitEvent(exports.ChartEvent.brushEnd, region);
|
|
@@ -96592,9 +96574,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
96592
96574
|
brush.addEventListener(IOperateType.moveEnd, (e) => {
|
|
96593
96575
|
this._setRegionMarkPickable(region, true);
|
|
96594
96576
|
const { operateMask } = e.detail;
|
|
96595
|
-
const { updateElementsState = true } = this._spec;
|
|
96596
96577
|
const inBrushData = this._extendDataInBrush(this._inBrushElementsMap);
|
|
96597
|
-
if (
|
|
96578
|
+
if (!this._spec.zoomWhenEmpty && inBrushData.length > 0) {
|
|
96598
96579
|
this._setAxisAndDataZoom(operateMask, region);
|
|
96599
96580
|
}
|
|
96600
96581
|
this._emitEvent(exports.ChartEvent.brushEnd, region);
|
|
@@ -96636,11 +96617,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
96636
96617
|
}
|
|
96637
96618
|
_handleBrushChange(region, e) {
|
|
96638
96619
|
const { operateMask } = e.detail;
|
|
96639
|
-
|
|
96640
|
-
|
|
96641
|
-
this._reconfigItem(operateMask, region);
|
|
96642
|
-
this._reconfigLinkedItem(operateMask, region);
|
|
96643
|
-
}
|
|
96620
|
+
this._reconfigItem(operateMask, region);
|
|
96621
|
+
this._reconfigLinkedItem(operateMask, region);
|
|
96644
96622
|
}
|
|
96645
96623
|
_extendDataInBrush(elementsMap) {
|
|
96646
96624
|
var _a, _b;
|
|
@@ -97891,15 +97869,14 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
97891
97869
|
const marginKey = align === 'right' ? 'marginLeft' : 'marginRight';
|
|
97892
97870
|
if (align === 'right') {
|
|
97893
97871
|
panelStyle.direction = 'rtl';
|
|
97872
|
+
titleStyle.textAlign = 'right';
|
|
97873
|
+
keyStyle.textAlign = 'right';
|
|
97874
|
+
valueStyle.textAlign = 'left';
|
|
97894
97875
|
}
|
|
97895
|
-
|
|
97896
|
-
titleStyle.textAlign =
|
|
97897
|
-
|
|
97898
|
-
|
|
97899
|
-
keyStyle.textAlign = align === 'right' ? 'right' : 'left';
|
|
97900
|
-
}
|
|
97901
|
-
if (isNil$1(valueStyle.textAlign)) {
|
|
97902
|
-
valueStyle.textAlign = align === 'right' ? 'left' : 'right';
|
|
97876
|
+
else {
|
|
97877
|
+
titleStyle.textAlign = 'left';
|
|
97878
|
+
keyStyle.textAlign = 'left';
|
|
97879
|
+
valueStyle.textAlign = 'right';
|
|
97903
97880
|
}
|
|
97904
97881
|
shapeStyle[marginKey] = getPixelPropertyStr((_b = shape.spacing) !== null && _b !== void 0 ? _b : DEFAULT_SHAPE_SPACING);
|
|
97905
97882
|
keyStyle[marginKey] = getPixelPropertyStr((_c = keyLabel.spacing) !== null && _c !== void 0 ? _c : DEFAULT_KEY_SPACING);
|
|
@@ -100445,7 +100422,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
100445
100422
|
exports.getCombinedSizeOfRegions = getCombinedSizeOfRegions;
|
|
100446
100423
|
exports.getDataScheme = getDataScheme;
|
|
100447
100424
|
exports.getDatumOfGraphic = getDatumOfGraphic;
|
|
100448
|
-
exports.getDiffAttributesOfGraphic = getDiffAttributesOfGraphic;
|
|
100449
100425
|
exports.getDimensionInfoByValue = getDimensionInfoByValue;
|
|
100450
100426
|
exports.getFieldAlias = getFieldAlias;
|
|
100451
100427
|
exports.getFunnelTheme = getFunnelTheme;
|