@visactor/vchart 2.0.1 → 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 +384 -427
- package/build/index.js +383 -427
- 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 +2 -10
- 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 -1
- 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 +4 -11
- 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 -1
- 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 => {
|
|
@@ -21710,16 +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
21711
|
}, this.afterRender = stage => {
|
|
21716
21712
|
this.renderCount++, this._afterRender && this._afterRender(stage), this._afterNextRenderCbs && this._afterNextRenderCbs.forEach(cb => cb(stage)), this._afterNextRenderCbs = null, this.tickedBeforeRender = !1;
|
|
21717
21713
|
}, this.afterTickCb = () => {
|
|
21718
21714
|
this.tickedBeforeRender = !0, "rendering" !== this.state && this.renderNextFrame();
|
|
21719
21715
|
}, this.params = params, this.theme = new Theme(), this.hooks = {
|
|
21720
21716
|
beforeRender: new SyncHook(["stage"]),
|
|
21721
|
-
afterRender: new SyncHook(["stage"])
|
|
21722
|
-
afterClearScreen: new SyncHook(["stage"])
|
|
21717
|
+
afterRender: new SyncHook(["stage"])
|
|
21723
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({
|
|
21724
21719
|
width: params.width,
|
|
21725
21720
|
height: params.height,
|
|
@@ -21731,7 +21726,7 @@
|
|
|
21731
21726
|
canvas: params.canvas
|
|
21732
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, {
|
|
21733
21728
|
main: !0
|
|
21734
|
-
})), 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 = {
|
|
21735
21730
|
tickRenderMode: "effect"
|
|
21736
21731
|
}), this.optmize(params.optimize), params.background && isString$1(this._background) && this._background.includes("/") && this.setAttributes({
|
|
21737
21732
|
background: this._background
|
|
@@ -22126,7 +22121,7 @@
|
|
|
22126
22121
|
return this._cursor;
|
|
22127
22122
|
}
|
|
22128
22123
|
eventPointTransform(e) {
|
|
22129
|
-
const point = this.global.mapToCanvasPoint(e, this.window);
|
|
22124
|
+
const point = this.global.mapToCanvasPoint(e, this.window.getContext().canvas.nativeCanvas);
|
|
22130
22125
|
return this.stage.window.pointTransform(point.x, point.y);
|
|
22131
22126
|
}
|
|
22132
22127
|
pauseTriggerEvent() {
|
|
@@ -31739,7 +31734,7 @@
|
|
|
31739
31734
|
return this._animateCount;
|
|
31740
31735
|
}
|
|
31741
31736
|
constructor() {
|
|
31742
|
-
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;
|
|
31743
31738
|
}
|
|
31744
31739
|
isRunning() {
|
|
31745
31740
|
return !this.paused && this._animateCount > 0;
|
|
@@ -31768,11 +31763,10 @@
|
|
|
31768
31763
|
}
|
|
31769
31764
|
tick(delta) {
|
|
31770
31765
|
if (this.paused) return;
|
|
31771
|
-
this._animationEndFlag && (this._animationEndFlag = !1, this.emit("animationStart"));
|
|
31772
31766
|
const scaledDelta = delta * this._playSpeed;
|
|
31773
31767
|
this._currentTime += scaledDelta, this.forEachAccessAnimate((animate, i) => {
|
|
31774
31768
|
animate.status === AnimateStatus.END ? this.removeAnimate(animate, !0) : animate.status !== AnimateStatus.RUNNING && animate.status !== AnimateStatus.INITIAL || animate.advance(scaledDelta);
|
|
31775
|
-
}), 0 === this._animateCount &&
|
|
31769
|
+
}), 0 === this._animateCount && this.emit("animationEnd");
|
|
31776
31770
|
}
|
|
31777
31771
|
clear() {
|
|
31778
31772
|
this.forEachAccessAnimate(animate => {
|
|
@@ -31836,9 +31830,7 @@
|
|
|
31836
31830
|
return this._timeline;
|
|
31837
31831
|
}
|
|
31838
31832
|
bind(target) {
|
|
31839
|
-
return this.target = target, this.target.
|
|
31840
|
-
this.stop(), this.target.animates.delete(this.id);
|
|
31841
|
-
}), 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;
|
|
31842
31834
|
}
|
|
31843
31835
|
to(props, duration = 300, easing = "linear") {
|
|
31844
31836
|
const step = new Step(AnimateStepType.to, props, duration, easing);
|
|
@@ -32052,8 +32044,8 @@
|
|
|
32052
32044
|
}
|
|
32053
32045
|
init() {
|
|
32054
32046
|
this.interval = 16, this.status = STATUS$1.INITIAL, application.global.hooks.onSetEnv.tap("graph-ticker", () => {
|
|
32055
|
-
this.initHandler(
|
|
32056
|
-
}), application.global.env && this.initHandler(
|
|
32047
|
+
this.initHandler();
|
|
32048
|
+
}), application.global.env && this.initHandler();
|
|
32057
32049
|
}
|
|
32058
32050
|
addTimeline(timeline) {
|
|
32059
32051
|
this.timelines.push(timeline);
|
|
@@ -32064,11 +32056,10 @@
|
|
|
32064
32056
|
getTimelines() {
|
|
32065
32057
|
return this.timelines;
|
|
32066
32058
|
}
|
|
32067
|
-
initHandler(
|
|
32068
|
-
this.setupTickHandler(
|
|
32059
|
+
initHandler() {
|
|
32060
|
+
this.setupTickHandler();
|
|
32069
32061
|
}
|
|
32070
|
-
setupTickHandler(
|
|
32071
|
-
if (!force && this.tickerHandler) return !0;
|
|
32062
|
+
setupTickHandler() {
|
|
32072
32063
|
const handler = new RAFTickHandler();
|
|
32073
32064
|
return this.tickerHandler && this.tickerHandler.release(), this.tickerHandler = handler, !0;
|
|
32074
32065
|
}
|
|
@@ -32119,7 +32110,7 @@
|
|
|
32119
32110
|
return this.status = STATUS$1.RUNNING, this.tickerHandler.tick(0, this.handleTick), !0;
|
|
32120
32111
|
}
|
|
32121
32112
|
stop() {
|
|
32122
|
-
this.status = STATUS$1.INITIAL, this.setupTickHandler(
|
|
32113
|
+
this.status = STATUS$1.INITIAL, this.setupTickHandler(), this.lastFrameTime = -1;
|
|
32123
32114
|
}
|
|
32124
32115
|
trySyncTickStatus() {
|
|
32125
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();
|
|
@@ -32129,8 +32120,7 @@
|
|
|
32129
32120
|
this.stop(), this.timelines = [], null === (_a = this.tickerHandler) || void 0 === _a || _a.release(), this.tickerHandler = null, this.lastFrameTime = -1;
|
|
32130
32121
|
}
|
|
32131
32122
|
checkSkip(delta) {
|
|
32132
|
-
|
|
32133
|
-
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;
|
|
32134
32124
|
return delta < this.interval + 2 * (Math.random() - .5) * this._jitter;
|
|
32135
32125
|
}
|
|
32136
32126
|
}
|
|
@@ -32428,11 +32418,10 @@
|
|
|
32428
32418
|
_handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic) {
|
|
32429
32419
|
var _a, _b, _c, _d;
|
|
32430
32420
|
if (custom && customType) {
|
|
32431
|
-
const customParams =
|
|
32421
|
+
const customParams = this.resolveValue(customParameters, graphic, {
|
|
32432
32422
|
width: graphic.stage.width,
|
|
32433
|
-
height: graphic.stage.height
|
|
32434
|
-
|
|
32435
|
-
}, this.resolveValue(customParameters, graphic)),
|
|
32423
|
+
height: graphic.stage.height
|
|
32424
|
+
}),
|
|
32436
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;
|
|
32437
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);
|
|
32438
32427
|
} else "to" === type ? animate.to(props, duration, easing) : "from" === type && animate.from(props, duration, easing);
|
|
@@ -32650,14 +32639,6 @@
|
|
|
32650
32639
|
state.executor.stop();
|
|
32651
32640
|
}), this.stateList = null;
|
|
32652
32641
|
}
|
|
32653
|
-
reApplyState(state) {
|
|
32654
|
-
var _a;
|
|
32655
|
-
const stateInfo = null === (_a = this.stateList) || void 0 === _a ? void 0 : _a.find(stateInfo => stateInfo.state === state);
|
|
32656
|
-
if (stateInfo) {
|
|
32657
|
-
const stateList = this.stateList.slice();
|
|
32658
|
-
stateInfo.executor.stop(), this.stateList = stateList, stateInfo.executor.execute(stateInfo.animationConfig);
|
|
32659
|
-
}
|
|
32660
|
-
}
|
|
32661
32642
|
}
|
|
32662
32643
|
|
|
32663
32644
|
class GraphicStateExtension {
|
|
@@ -32688,20 +32669,11 @@
|
|
|
32688
32669
|
applyUnhighlightState(animationConfig, callback) {
|
|
32689
32670
|
return this._getAnimationStateManager(this).applyUnhighlightState(animationConfig, callback), this;
|
|
32690
32671
|
}
|
|
32691
|
-
stopAnimationState(state, type
|
|
32692
|
-
return this._getAnimationStateManager(this).stopState(state, type),
|
|
32693
|
-
child.stopAnimationState(state, type, deep);
|
|
32694
|
-
}), this;
|
|
32672
|
+
stopAnimationState(state, type) {
|
|
32673
|
+
return this._getAnimationStateManager(this).stopState(state, type), this;
|
|
32695
32674
|
}
|
|
32696
32675
|
clearAnimationStates() {
|
|
32697
|
-
|
|
32698
|
-
return stateManager && stateManager.clearState(), this;
|
|
32699
|
-
}
|
|
32700
|
-
reApplyAnimationState(state, deep = !1) {
|
|
32701
|
-
const stateManager = this._animationStateManager;
|
|
32702
|
-
return stateManager && stateManager.reApplyState(state), deep && this.isContainer && this.forEachChildren(child => {
|
|
32703
|
-
child.reApplyAnimationState(state, deep);
|
|
32704
|
-
}), this;
|
|
32676
|
+
return this._getAnimationStateManager(this).clearState(), this;
|
|
32705
32677
|
}
|
|
32706
32678
|
static extend(graphic) {
|
|
32707
32679
|
return new GraphicStateExtension()._getAnimationStateManager(graphic), graphic;
|
|
@@ -32714,6 +32686,7 @@
|
|
|
32714
32686
|
}
|
|
32715
32687
|
animate(params) {
|
|
32716
32688
|
var _a, _b, _c;
|
|
32689
|
+
this.animates || (this.animates = new Map());
|
|
32717
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);
|
|
32718
32691
|
if (animate.bind(this), params) {
|
|
32719
32692
|
const {
|
|
@@ -32723,7 +32696,9 @@
|
|
|
32723
32696
|
} = params;
|
|
32724
32697
|
null != onStart && animate.onStart(onStart), null != onEnd && animate.onEnd(onEnd), null != onRemove && animate.onRemove(onRemove);
|
|
32725
32698
|
}
|
|
32726
|
-
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;
|
|
32727
32702
|
}
|
|
32728
32703
|
createTimeline() {
|
|
32729
32704
|
return new DefaultTimeline();
|
|
@@ -32754,21 +32729,6 @@
|
|
|
32754
32729
|
getGraphicAttribute(key, prev = !1) {
|
|
32755
32730
|
return !prev && this.finalAttribute ? this.finalAttribute[key] : this.attribute[key];
|
|
32756
32731
|
}
|
|
32757
|
-
pauseAnimation(deep = !1) {
|
|
32758
|
-
this.animates && this.animates.forEach(animate => animate.pause()), deep && this.isContainer && this.forEachChildren(child => {
|
|
32759
|
-
child.pauseAnimation(deep);
|
|
32760
|
-
});
|
|
32761
|
-
}
|
|
32762
|
-
resumeAnimation(deep = !1) {
|
|
32763
|
-
this.animates && this.animates.forEach(animate => animate.resume()), deep && this.isContainer && this.forEachChildren(child => {
|
|
32764
|
-
child.resumeAnimation(deep);
|
|
32765
|
-
});
|
|
32766
|
-
}
|
|
32767
|
-
stopAnimation(deep = !1) {
|
|
32768
|
-
this.animates && this.animates.forEach(animate => animate.stop()), deep && this.isContainer && this.forEachChildren(child => {
|
|
32769
|
-
child.stopAnimation(deep);
|
|
32770
|
-
});
|
|
32771
|
-
}
|
|
32772
32732
|
}
|
|
32773
32733
|
|
|
32774
32734
|
function registerAnimate$1() {
|
|
@@ -32777,7 +32737,7 @@
|
|
|
32777
32737
|
|
|
32778
32738
|
class ACustomAnimate extends Step {
|
|
32779
32739
|
constructor(customFrom, customTo, duration, easing, params) {
|
|
32780
|
-
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;
|
|
32781
32741
|
}
|
|
32782
32742
|
update(end, ratio, out) {
|
|
32783
32743
|
if (this.onStart(), !this.props || !this.propKeys) return;
|
|
@@ -33849,7 +33809,7 @@
|
|
|
33849
33809
|
super(from, to, duration, easing, params);
|
|
33850
33810
|
}
|
|
33851
33811
|
onBind() {
|
|
33852
|
-
var _a, _b
|
|
33812
|
+
var _a, _b;
|
|
33853
33813
|
super.onBind();
|
|
33854
33814
|
const {
|
|
33855
33815
|
from: from,
|
|
@@ -33858,7 +33818,7 @@
|
|
|
33858
33818
|
fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
|
|
33859
33819
|
this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to;
|
|
33860
33820
|
const finalAttribute = this.target.getFinalAttribute();
|
|
33861
|
-
finalAttribute && this.target.setAttributes(finalAttribute),
|
|
33821
|
+
finalAttribute && this.target.setAttributes(finalAttribute), this.target.setAttributes(fromAttrs);
|
|
33862
33822
|
}
|
|
33863
33823
|
onEnd(cb) {
|
|
33864
33824
|
super.onEnd(cb);
|
|
@@ -33956,7 +33916,7 @@
|
|
|
33956
33916
|
super(from, to, duration, easing, params);
|
|
33957
33917
|
}
|
|
33958
33918
|
onBind() {
|
|
33959
|
-
var _a, _b
|
|
33919
|
+
var _a, _b;
|
|
33960
33920
|
super.onBind();
|
|
33961
33921
|
const {
|
|
33962
33922
|
from: from,
|
|
@@ -33965,7 +33925,7 @@
|
|
|
33965
33925
|
fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
|
|
33966
33926
|
this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to;
|
|
33967
33927
|
const finalAttribute = this.target.getFinalAttribute();
|
|
33968
|
-
finalAttribute && this.target.setAttributes(finalAttribute),
|
|
33928
|
+
finalAttribute && this.target.setAttributes(finalAttribute), this.target.setAttributes(fromAttrs);
|
|
33969
33929
|
}
|
|
33970
33930
|
onEnd(cb) {
|
|
33971
33931
|
super.onEnd(cb);
|
|
@@ -35816,15 +35776,16 @@
|
|
|
35816
35776
|
changedY = 0;
|
|
35817
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;
|
|
35818
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,
|
|
35819
|
-
|
|
35820
|
-
|
|
35821
|
-
|
|
35822
|
-
|
|
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;
|
|
35823
35784
|
switch (direction) {
|
|
35824
35785
|
case "x":
|
|
35825
35786
|
return {
|
|
35826
35787
|
from: {
|
|
35827
|
-
x:
|
|
35788
|
+
x: fromX
|
|
35828
35789
|
},
|
|
35829
35790
|
to: {
|
|
35830
35791
|
x: finalAttrsX
|
|
@@ -35853,26 +35814,25 @@
|
|
|
35853
35814
|
}
|
|
35854
35815
|
};
|
|
35855
35816
|
const moveOut = (graphic, options, animationParameters) => {
|
|
35856
|
-
var _a, _b, _c, _d;
|
|
35817
|
+
var _a, _b, _c, _d, _e, _f;
|
|
35857
35818
|
const {
|
|
35858
35819
|
offset = 0,
|
|
35859
35820
|
orient: orient,
|
|
35860
35821
|
direction: direction,
|
|
35861
35822
|
point: pointOpt
|
|
35862
35823
|
} = null != options ? options : {},
|
|
35863
|
-
|
|
35864
|
-
|
|
35865
|
-
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,
|
|
35866
35826
|
changedX = ("negative" === orient ? groupWidth : 0) + offset,
|
|
35867
35827
|
changedY = ("negative" === orient ? groupHeight : 0) + offset,
|
|
35868
|
-
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,
|
|
35869
35829
|
fromX = point && isValidNumber$1(point.x) ? point.x : changedX,
|
|
35870
35830
|
fromY = point && isValidNumber$1(point.y) ? point.y : changedY;
|
|
35871
35831
|
switch (direction) {
|
|
35872
35832
|
case "x":
|
|
35873
35833
|
return {
|
|
35874
35834
|
from: {
|
|
35875
|
-
x: graphic.
|
|
35835
|
+
x: graphic.attribute.x
|
|
35876
35836
|
},
|
|
35877
35837
|
to: {
|
|
35878
35838
|
x: fromX
|
|
@@ -35881,7 +35841,7 @@
|
|
|
35881
35841
|
case "y":
|
|
35882
35842
|
return {
|
|
35883
35843
|
from: {
|
|
35884
|
-
y: graphic.
|
|
35844
|
+
y: graphic.attribute.y
|
|
35885
35845
|
},
|
|
35886
35846
|
to: {
|
|
35887
35847
|
y: fromY
|
|
@@ -35890,8 +35850,8 @@
|
|
|
35890
35850
|
default:
|
|
35891
35851
|
return {
|
|
35892
35852
|
from: {
|
|
35893
|
-
x: graphic.
|
|
35894
|
-
y: graphic.
|
|
35853
|
+
x: graphic.attribute.x,
|
|
35854
|
+
y: graphic.attribute.y
|
|
35895
35855
|
},
|
|
35896
35856
|
to: {
|
|
35897
35857
|
x: fromX,
|
|
@@ -36038,9 +35998,6 @@
|
|
|
36038
35998
|
this.from[key] = null !== (_a = this.from[key]) && void 0 !== _a ? _a : startProps[key];
|
|
36039
35999
|
}), this.target.setAttributes(this.from);
|
|
36040
36000
|
}
|
|
36041
|
-
deleteSelfAttr(key) {
|
|
36042
|
-
super.deleteSelfAttr(key), delete this.from[key];
|
|
36043
|
-
}
|
|
36044
36001
|
update(end, ratio, out) {
|
|
36045
36002
|
if (this.onStart(), !this.props || !this.propKeys) return;
|
|
36046
36003
|
const easedRatio = this.easing(ratio);
|
|
@@ -36109,8 +36066,9 @@
|
|
|
36109
36066
|
w = Math.min(Math.min(currentX + maxLength, maxLength), streamLength - currentX),
|
|
36110
36067
|
width = w + x > parentWidth ? Math.max(parentWidth - x, 0) : w;
|
|
36111
36068
|
this.rect.setAttributes({
|
|
36112
|
-
x: x
|
|
36113
|
-
width: width
|
|
36069
|
+
x: x,
|
|
36070
|
+
width: width,
|
|
36071
|
+
dx: Math.min(parentAttr.x1 - parentAttr.x, 0)
|
|
36114
36072
|
}, !1, {
|
|
36115
36073
|
type: AttributeUpdateType.ANIMATE_PLAY,
|
|
36116
36074
|
animationState: {
|
|
@@ -36127,8 +36085,9 @@
|
|
|
36127
36085
|
const h = Math.min(parentHeight - currentY, maxLength);
|
|
36128
36086
|
let height;
|
|
36129
36087
|
y <= 0 ? (height = Math.max(y + h, 0), y = 0) : height = h, this.rect.setAttributes({
|
|
36130
|
-
y: y
|
|
36131
|
-
height: height
|
|
36088
|
+
y: y,
|
|
36089
|
+
height: height,
|
|
36090
|
+
dy: Math.min(parentAttr.y1 - parentAttr.y, 0)
|
|
36132
36091
|
}, !1, {
|
|
36133
36092
|
type: AttributeUpdateType.ANIMATE_PLAY,
|
|
36134
36093
|
animationState: {
|
|
@@ -38820,8 +38779,7 @@
|
|
|
38820
38779
|
prevText: prevText,
|
|
38821
38780
|
curText: curText,
|
|
38822
38781
|
prevLabelLine: prevLabelLine,
|
|
38823
|
-
curLabelLine: curLabelLine
|
|
38824
|
-
increaseEffect = !0
|
|
38782
|
+
curLabelLine: curLabelLine
|
|
38825
38783
|
} = this.params,
|
|
38826
38784
|
diff = {};
|
|
38827
38785
|
for (const key in curText.attribute) prevText.attribute[key] !== curText.attribute[key] && (diff[key] = curText.attribute[key]);
|
|
@@ -38831,7 +38789,7 @@
|
|
|
38831
38789
|
to: rest,
|
|
38832
38790
|
duration: duration,
|
|
38833
38791
|
easing: easing
|
|
38834
|
-
}),
|
|
38792
|
+
}), animator.animate(prevText, {
|
|
38835
38793
|
type: "increaseCount",
|
|
38836
38794
|
to: {
|
|
38837
38795
|
text: curText.attribute.text
|
|
@@ -39525,15 +39483,16 @@
|
|
|
39525
39483
|
} = currentLabel;
|
|
39526
39484
|
prevText.applyAnimationState(["update"], [{
|
|
39527
39485
|
name: "update",
|
|
39528
|
-
animation: {
|
|
39529
|
-
type: "labelUpdate"
|
|
39530
|
-
|
|
39486
|
+
animation: Object.assign(Object.assign({
|
|
39487
|
+
type: "labelUpdate"
|
|
39488
|
+
}, this._animationConfig.update), {
|
|
39489
|
+
customParameters: {
|
|
39531
39490
|
prevText: prevText,
|
|
39532
39491
|
curText: curText,
|
|
39533
39492
|
prevLabelLine: prevLabelLine,
|
|
39534
39493
|
curLabelLine: curLabelLine
|
|
39535
|
-
}
|
|
39536
|
-
}
|
|
39494
|
+
}
|
|
39495
|
+
})
|
|
39537
39496
|
}]);
|
|
39538
39497
|
}
|
|
39539
39498
|
_syncStateWithRelatedGraphic(relatedGraphic) {
|
|
@@ -47332,6 +47291,7 @@
|
|
|
47332
47291
|
SeriesTypeEnum["dot"] = "dot";
|
|
47333
47292
|
SeriesTypeEnum["geo"] = "geo";
|
|
47334
47293
|
SeriesTypeEnum["link"] = "link";
|
|
47294
|
+
SeriesTypeEnum["curveLink"] = "curveLink";
|
|
47335
47295
|
SeriesTypeEnum["map"] = "map";
|
|
47336
47296
|
SeriesTypeEnum["pie"] = "pie";
|
|
47337
47297
|
SeriesTypeEnum["radar"] = "radar";
|
|
@@ -47386,6 +47346,8 @@
|
|
|
47386
47346
|
SeriesMarkNameEnum["cell"] = "cell";
|
|
47387
47347
|
SeriesMarkNameEnum["cellBackground"] = "cellBackground";
|
|
47388
47348
|
SeriesMarkNameEnum["link"] = "link";
|
|
47349
|
+
SeriesMarkNameEnum["curveLink"] = "curveLink";
|
|
47350
|
+
SeriesMarkNameEnum["imageLabel"] = "imageLabel";
|
|
47389
47351
|
SeriesMarkNameEnum["arrow"] = "arrow";
|
|
47390
47352
|
SeriesMarkNameEnum["pie"] = "pie";
|
|
47391
47353
|
SeriesMarkNameEnum["labelLine"] = "labelLine";
|
|
@@ -49151,16 +49113,6 @@
|
|
|
49151
49113
|
}
|
|
49152
49114
|
return null;
|
|
49153
49115
|
};
|
|
49154
|
-
const getDiffAttributesOfGraphic = (g, newAttrs) => {
|
|
49155
|
-
const prevAttrs = g.getAttributes(true);
|
|
49156
|
-
const diffAttrs = {};
|
|
49157
|
-
Object.keys(newAttrs).forEach(key => {
|
|
49158
|
-
if (prevAttrs[key] !== newAttrs[key]) {
|
|
49159
|
-
diffAttrs[key] = newAttrs[key];
|
|
49160
|
-
}
|
|
49161
|
-
});
|
|
49162
|
-
return diffAttrs;
|
|
49163
|
-
};
|
|
49164
49116
|
|
|
49165
49117
|
let Event$1 = class Event {
|
|
49166
49118
|
getComposedEventMap() {
|
|
@@ -50062,28 +50014,6 @@
|
|
|
50062
50014
|
return attrs;
|
|
50063
50015
|
};
|
|
50064
50016
|
|
|
50065
|
-
function toRenderMode(mode) {
|
|
50066
|
-
switch (mode) {
|
|
50067
|
-
case exports.RenderModeEnum['desktop-browser']:
|
|
50068
|
-
case exports.RenderModeEnum['mobile-browser']:
|
|
50069
|
-
return 'browser';
|
|
50070
|
-
case exports.RenderModeEnum.node:
|
|
50071
|
-
case exports.RenderModeEnum.worker:
|
|
50072
|
-
return 'node';
|
|
50073
|
-
case exports.RenderModeEnum.miniApp:
|
|
50074
|
-
case exports.RenderModeEnum['desktop-miniApp']:
|
|
50075
|
-
return 'feishu';
|
|
50076
|
-
case exports.RenderModeEnum.lynx:
|
|
50077
|
-
return 'lynx';
|
|
50078
|
-
case exports.RenderModeEnum.wx:
|
|
50079
|
-
return 'wx';
|
|
50080
|
-
case exports.RenderModeEnum.tt:
|
|
50081
|
-
return 'tt';
|
|
50082
|
-
case exports.RenderModeEnum.harmony:
|
|
50083
|
-
return 'harmony';
|
|
50084
|
-
}
|
|
50085
|
-
return 'browser';
|
|
50086
|
-
}
|
|
50087
50017
|
function traverseGroupMark(group, apply, filter, leafFirst, stop) {
|
|
50088
50018
|
const traverse = (mark) => {
|
|
50089
50019
|
if (!leafFirst) {
|
|
@@ -50257,9 +50187,6 @@
|
|
|
50257
50187
|
this._container = container;
|
|
50258
50188
|
this._option = option;
|
|
50259
50189
|
}
|
|
50260
|
-
getChart() {
|
|
50261
|
-
return this._compileChart;
|
|
50262
|
-
}
|
|
50263
50190
|
getCanvas() {
|
|
50264
50191
|
var _a;
|
|
50265
50192
|
return (_a = this._stage) === null || _a === void 0 ? void 0 : _a.window.getNativeHandler().nativeCanvas;
|
|
@@ -50276,8 +50203,7 @@
|
|
|
50276
50203
|
if (this._stage) {
|
|
50277
50204
|
return;
|
|
50278
50205
|
}
|
|
50279
|
-
const { autoRefreshDpr, dpr, mode,
|
|
50280
|
-
vglobal.setEnv(toRenderMode(mode), modeParams !== null && modeParams !== void 0 ? modeParams : {});
|
|
50206
|
+
const { autoRefreshDpr, dpr, mode, gestureConfig, interactive, clickInterval, autoPreventDefault, background } = this._option;
|
|
50281
50207
|
this._stage =
|
|
50282
50208
|
(_a = this._option.stage) !== null && _a !== void 0 ? _a : new Stage({
|
|
50283
50209
|
background,
|
|
@@ -50288,13 +50214,8 @@
|
|
|
50288
50214
|
dpr,
|
|
50289
50215
|
viewBox: this._option.viewBox,
|
|
50290
50216
|
canvasControled: this._option.canvasControled,
|
|
50291
|
-
beforeRender:
|
|
50292
|
-
var _a, _b, _c;
|
|
50293
|
-
(_a = this._compileChart) === null || _a === void 0 ? void 0 : _a.onBeforeRender();
|
|
50294
|
-
(_c = (_b = this._option).beforeRender) === null || _c === void 0 ? void 0 : _c.call(_b, stage);
|
|
50295
|
-
},
|
|
50217
|
+
beforeRender: this._option.beforeRender,
|
|
50296
50218
|
afterRender: this._option.afterRender,
|
|
50297
|
-
afterClearScreen: this._option.afterClearScreen,
|
|
50298
50219
|
disableDirtyBounds: true,
|
|
50299
50220
|
autoRender: true,
|
|
50300
50221
|
ticker: this._option.ticker,
|
|
@@ -51140,8 +51061,6 @@
|
|
|
51140
51061
|
}
|
|
51141
51062
|
onEvaluateEnd(ctx) {
|
|
51142
51063
|
}
|
|
51143
|
-
onBeforeRender() {
|
|
51144
|
-
}
|
|
51145
51064
|
onDataUpdate() {
|
|
51146
51065
|
}
|
|
51147
51066
|
beforeRelease() {
|
|
@@ -51269,12 +51188,6 @@
|
|
|
51269
51188
|
}
|
|
51270
51189
|
return index;
|
|
51271
51190
|
}
|
|
51272
|
-
updateAnimateStateCallback(callback) {
|
|
51273
|
-
this._aniamtionStateCallback = callback;
|
|
51274
|
-
}
|
|
51275
|
-
getAnimationStateCallback() {
|
|
51276
|
-
return this._aniamtionStateCallback;
|
|
51277
|
-
}
|
|
51278
51191
|
}
|
|
51279
51192
|
|
|
51280
51193
|
class LayoutItem {
|
|
@@ -53298,39 +53211,26 @@
|
|
|
53298
53211
|
}
|
|
53299
53212
|
setAnimationConfig(config) {
|
|
53300
53213
|
const defaultPrams = this.type === 'group' ? { selfOnly: true } : {};
|
|
53301
|
-
const formatAnimationCfg = (cfg) => {
|
|
53302
|
-
var _a;
|
|
53303
|
-
const options = (_a = cfg.options) !== null && _a !== void 0 ? _a : {};
|
|
53304
|
-
return Object.assign(Object.assign(Object.assign({}, defaultPrams), cfg), { options: (datum, graphic, customParams) => {
|
|
53305
|
-
var _a, _b;
|
|
53306
|
-
const _options = typeof options === 'function' ? options(datum, graphic, customParams) : options;
|
|
53307
|
-
if (graphic && graphic.context && graphic.context.compiler && isValid$1(graphic.context.modelId)) {
|
|
53308
|
-
const model = (_a = graphic.context.compiler.getChart()) === null || _a === void 0 ? void 0 : _a.getModelById(graphic.context.modelId);
|
|
53309
|
-
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) });
|
|
53310
|
-
}
|
|
53311
|
-
return Object.assign({}, _options);
|
|
53312
|
-
} });
|
|
53313
|
-
};
|
|
53314
53214
|
const animationConfig = {};
|
|
53315
53215
|
Object.keys(config).forEach(key => {
|
|
53316
53216
|
const value = config[key];
|
|
53317
53217
|
if (isArray$1(value)) {
|
|
53318
|
-
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
|
+
});
|
|
53319
53227
|
}
|
|
53320
|
-
else
|
|
53321
|
-
animationConfig[key] =
|
|
53228
|
+
else {
|
|
53229
|
+
animationConfig[key] = Object.assign(Object.assign({}, defaultPrams), config[key]);
|
|
53322
53230
|
}
|
|
53323
53231
|
});
|
|
53324
53232
|
this._animationConfig = animationConfig;
|
|
53325
53233
|
}
|
|
53326
|
-
disableAnimationByState(state) {
|
|
53327
|
-
const states = array(state);
|
|
53328
|
-
this._disabledAnimationStates = [...new Set([...this._disabledAnimationStates, ...states])];
|
|
53329
|
-
}
|
|
53330
|
-
enableAnimationByState(state) {
|
|
53331
|
-
const states = array(state);
|
|
53332
|
-
this._disabledAnimationStates = this._disabledAnimationStates.filter(s => !states.includes(s));
|
|
53333
|
-
}
|
|
53334
53234
|
setSkipBeforeLayouted(skip) {
|
|
53335
53235
|
this._skipBeforeLayouted = skip;
|
|
53336
53236
|
}
|
|
@@ -53465,7 +53365,6 @@
|
|
|
53465
53365
|
this._visible = true;
|
|
53466
53366
|
this.stateStyle = {};
|
|
53467
53367
|
this._unCompileChannel = {};
|
|
53468
|
-
this._disabledAnimationStates = [];
|
|
53469
53368
|
this._skipBeforeLayouted = false;
|
|
53470
53369
|
this._extensionChannel = {};
|
|
53471
53370
|
this._computeExChannel = {};
|
|
@@ -53883,7 +53782,6 @@
|
|
|
53883
53782
|
}
|
|
53884
53783
|
_getCommonContext() {
|
|
53885
53784
|
return {
|
|
53886
|
-
compiler: this.getCompiler(),
|
|
53887
53785
|
markType: this.type,
|
|
53888
53786
|
markId: this.id,
|
|
53889
53787
|
modelId: this.model.id,
|
|
@@ -53957,19 +53855,17 @@
|
|
|
53957
53855
|
this._dataByGroup = groupData(data, this._groupKeyGetter);
|
|
53958
53856
|
}
|
|
53959
53857
|
createAnimationStateList(type, animationConfig) {
|
|
53960
|
-
var _a;
|
|
53961
53858
|
let config = animationConfig[type];
|
|
53962
53859
|
if (config && Array.isArray(config)) {
|
|
53963
53860
|
config = config.length === 1 ? config[0] : config;
|
|
53964
53861
|
}
|
|
53965
53862
|
if (Array.isArray(config)) {
|
|
53966
|
-
|
|
53863
|
+
config = config.map((item, index) => {
|
|
53967
53864
|
var _a;
|
|
53968
53865
|
return (Object.assign(Object.assign({}, item), { priority: (_a = item.priority) !== null && _a !== void 0 ? _a : Infinity }));
|
|
53969
53866
|
});
|
|
53970
53867
|
}
|
|
53971
|
-
return config
|
|
53972
|
-
? Object.assign(Object.assign({}, config), { priority: type === 'normal' ? (_a = config.priority) !== null && _a !== void 0 ? _a : Infinity : config.priority }) : config;
|
|
53868
|
+
return config;
|
|
53973
53869
|
}
|
|
53974
53870
|
tryRunMorphing(graphics) {
|
|
53975
53871
|
if (this._lastMark) {
|
|
@@ -54053,34 +53949,13 @@
|
|
|
54053
53949
|
this._product.applyAnimationState(['normal'], [normalConfig]);
|
|
54054
53950
|
}
|
|
54055
53951
|
}
|
|
54056
|
-
_setAnimationState(g) {
|
|
54057
|
-
var _a, _b, _c;
|
|
54058
|
-
const callback = (this.type === "component"
|
|
54059
|
-
? this.model.getAnimationStateCallback()
|
|
54060
|
-
: (_c = (_b = (_a = this.model).getRegion) === null || _b === void 0 ? void 0 : _b.call(_a)) === null || _c === void 0 ? void 0 : _c.getAnimationStateCallback()) ||
|
|
54061
|
-
((g) => {
|
|
54062
|
-
var _a;
|
|
54063
|
-
const diffState = (_a = g.context) === null || _a === void 0 ? void 0 : _a.diffState;
|
|
54064
|
-
return diffState === AnimationStateEnum.exit
|
|
54065
|
-
? AnimationStateEnum.exit
|
|
54066
|
-
: diffState === AnimationStateEnum.update
|
|
54067
|
-
? AnimationStateEnum.update
|
|
54068
|
-
: AnimationStateEnum.appear;
|
|
54069
|
-
});
|
|
54070
|
-
const customizedState = callback(g);
|
|
54071
|
-
g.context.animationState = customizedState !== null && customizedState !== void 0 ? customizedState : g.context.diffState;
|
|
54072
|
-
if (g.context.animationState === DiffState.exit) {
|
|
54073
|
-
g.context.reusing = true;
|
|
54074
|
-
g.animates && g.animates.forEach((a) => a.stop());
|
|
54075
|
-
}
|
|
54076
|
-
}
|
|
54077
53952
|
_runJoin(data) {
|
|
54078
53953
|
const newGroupedData = this._getDataByKey(data);
|
|
54079
53954
|
const prevGroupedData = this._prevDataByKey;
|
|
54080
|
-
const
|
|
53955
|
+
const newGraphics = [];
|
|
54081
53956
|
const enterGraphics = new Set(this._graphics.filter(g => g.context.diffState === DiffState.enter));
|
|
54082
53957
|
const callback = (key, newData, prevData) => {
|
|
54083
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
53958
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
54084
53959
|
let g;
|
|
54085
53960
|
let diffState;
|
|
54086
53961
|
if (isNil$1(newData)) {
|
|
@@ -54098,20 +53973,23 @@
|
|
|
54098
53973
|
}
|
|
54099
53974
|
diffState = DiffState.enter;
|
|
54100
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
|
+
}
|
|
54101
53980
|
this._graphicMap.set(key, g);
|
|
54102
|
-
|
|
53981
|
+
newGraphics.push(g);
|
|
54103
53982
|
}
|
|
54104
53983
|
else {
|
|
54105
53984
|
g = this._graphicMap.get(key);
|
|
54106
53985
|
if (g) {
|
|
54107
53986
|
diffState = DiffState.update;
|
|
54108
|
-
|
|
53987
|
+
newGraphics.push(g);
|
|
54109
53988
|
}
|
|
54110
53989
|
}
|
|
54111
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 });
|
|
54112
53992
|
enterGraphics.delete(g);
|
|
54113
|
-
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 });
|
|
54114
|
-
this._setAnimationState(g);
|
|
54115
53993
|
}
|
|
54116
53994
|
return g;
|
|
54117
53995
|
};
|
|
@@ -54149,13 +54027,13 @@
|
|
|
54149
54027
|
}
|
|
54150
54028
|
g.release();
|
|
54151
54029
|
});
|
|
54152
|
-
const graphicCount =
|
|
54153
|
-
|
|
54030
|
+
const graphicCount = newGraphics.length;
|
|
54031
|
+
newGraphics.forEach((g, index) => {
|
|
54154
54032
|
g.context.graphicCount = graphicCount;
|
|
54155
54033
|
g.context.graphicIndex = index;
|
|
54156
54034
|
});
|
|
54157
54035
|
this._dataByKey = newGroupedData;
|
|
54158
|
-
this._graphics =
|
|
54036
|
+
this._graphics = newGraphics;
|
|
54159
54037
|
this.needClear = true;
|
|
54160
54038
|
}
|
|
54161
54039
|
_runEncoderOfGraphic(styles, g, attrs = {}) {
|
|
@@ -54238,7 +54116,13 @@
|
|
|
54238
54116
|
}
|
|
54239
54117
|
}
|
|
54240
54118
|
else {
|
|
54241
|
-
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
|
+
});
|
|
54242
54126
|
g.context.diffAttrs = diffAttrs;
|
|
54243
54127
|
if (g.context.reusing) {
|
|
54244
54128
|
g.context.lastAttrs = g.attribute;
|
|
@@ -54407,24 +54291,23 @@
|
|
|
54407
54291
|
}
|
|
54408
54292
|
};
|
|
54409
54293
|
this._graphicMap.forEach((g, key) => {
|
|
54410
|
-
if (g.context.diffState
|
|
54411
|
-
|
|
54412
|
-
|
|
54413
|
-
|
|
54414
|
-
|
|
54415
|
-
|
|
54416
|
-
|
|
54417
|
-
|
|
54418
|
-
|
|
54419
|
-
|
|
54420
|
-
|
|
54421
|
-
|
|
54422
|
-
|
|
54423
|
-
|
|
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);
|
|
54424
54310
|
}
|
|
54425
|
-
}
|
|
54426
|
-
else {
|
|
54427
|
-
doRemove(g, key);
|
|
54428
54311
|
}
|
|
54429
54312
|
});
|
|
54430
54313
|
}
|
|
@@ -54570,11 +54453,15 @@
|
|
|
54570
54453
|
this._runProgressiveStep();
|
|
54571
54454
|
}
|
|
54572
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
|
+
}
|
|
54573
54463
|
hasAnimationByState(state) {
|
|
54574
|
-
if (!state ||
|
|
54575
|
-
!this._animationConfig ||
|
|
54576
|
-
!this._animationConfig[state] ||
|
|
54577
|
-
this._disabledAnimationStates.includes(state)) {
|
|
54464
|
+
if (!state || !this._animationConfig || !this._animationConfig[state]) {
|
|
54578
54465
|
return false;
|
|
54579
54466
|
}
|
|
54580
54467
|
const stateAnimationConfig = this._animationConfig[state];
|
|
@@ -54591,36 +54478,11 @@
|
|
|
54591
54478
|
}
|
|
54592
54479
|
}
|
|
54593
54480
|
|
|
54594
|
-
exports.MarkTypeEnum = void 0;
|
|
54595
|
-
(function (MarkTypeEnum) {
|
|
54596
|
-
MarkTypeEnum["group"] = "group";
|
|
54597
|
-
MarkTypeEnum["symbol"] = "symbol";
|
|
54598
|
-
MarkTypeEnum["rule"] = "rule";
|
|
54599
|
-
MarkTypeEnum["line"] = "line";
|
|
54600
|
-
MarkTypeEnum["text"] = "text";
|
|
54601
|
-
MarkTypeEnum["rect"] = "rect";
|
|
54602
|
-
MarkTypeEnum["image"] = "image";
|
|
54603
|
-
MarkTypeEnum["path"] = "path";
|
|
54604
|
-
MarkTypeEnum["area"] = "area";
|
|
54605
|
-
MarkTypeEnum["arc"] = "arc";
|
|
54606
|
-
MarkTypeEnum["polygon"] = "polygon";
|
|
54607
|
-
MarkTypeEnum["boxPlot"] = "boxPlot";
|
|
54608
|
-
MarkTypeEnum["linkPath"] = "linkPath";
|
|
54609
|
-
MarkTypeEnum["cell"] = "cell";
|
|
54610
|
-
MarkTypeEnum["ripple"] = "ripple";
|
|
54611
|
-
MarkTypeEnum["liquid"] = "liquid";
|
|
54612
|
-
MarkTypeEnum["component"] = "component";
|
|
54613
|
-
MarkTypeEnum["dataLabel"] = "dataLabel";
|
|
54614
|
-
MarkTypeEnum["label"] = "label";
|
|
54615
|
-
MarkTypeEnum["pictogram"] = "pictogram";
|
|
54616
|
-
})(exports.MarkTypeEnum || (exports.MarkTypeEnum = {}));
|
|
54617
|
-
|
|
54618
54481
|
class GroupMark extends BaseMark {
|
|
54619
54482
|
constructor() {
|
|
54620
54483
|
super(...arguments);
|
|
54621
54484
|
this.type = GroupMark.type;
|
|
54622
54485
|
this._marks = [];
|
|
54623
|
-
this._diffState = DiffState.enter;
|
|
54624
54486
|
}
|
|
54625
54487
|
getMarks() {
|
|
54626
54488
|
return this._marks;
|
|
@@ -54683,28 +54545,10 @@
|
|
|
54683
54545
|
return;
|
|
54684
54546
|
}
|
|
54685
54547
|
const style = (_a = this._simpleStyle) !== null && _a !== void 0 ? _a : this.getAttributesOfState({});
|
|
54686
|
-
this._product.context = Object.assign(Object.assign(
|
|
54687
|
-
this.
|
|
54688
|
-
const newAttrs = this._getAttrsFromConfig(style);
|
|
54689
|
-
if (this._product.context.diffState === DiffState.update) {
|
|
54690
|
-
const hasAnimation = this.hasAnimation();
|
|
54691
|
-
const diffAttrs = getDiffAttributesOfGraphic(this._product, newAttrs);
|
|
54692
|
-
this._product.context.diffAttrs = diffAttrs;
|
|
54693
|
-
if (!this.hasAnimationByState(this._product.context.animationState)) {
|
|
54694
|
-
hasAnimation ? this._product.setAttributesAndPreventAnimate(diffAttrs) : this._product.setAttributes(diffAttrs);
|
|
54695
|
-
}
|
|
54696
|
-
if (hasAnimation) {
|
|
54697
|
-
this._product.setFinalAttributes(newAttrs);
|
|
54698
|
-
}
|
|
54699
|
-
}
|
|
54700
|
-
else {
|
|
54701
|
-
this._product.setAttributes(newAttrs);
|
|
54702
|
-
}
|
|
54548
|
+
this._product.context = Object.assign(Object.assign({}, this._product.context), this._getCommonContext());
|
|
54549
|
+
this._product.setAttributes(this._getAttrsFromConfig(style));
|
|
54703
54550
|
this.needClear = true;
|
|
54704
54551
|
}
|
|
54705
|
-
clearExitGraphics() {
|
|
54706
|
-
this._diffState = DiffState.update;
|
|
54707
|
-
}
|
|
54708
54552
|
render() {
|
|
54709
54553
|
if (this._isCommited) {
|
|
54710
54554
|
log(`render mark: ${this.getProductId()}, type is ${this.type}`);
|
|
@@ -54715,6 +54559,16 @@
|
|
|
54715
54559
|
mark.render();
|
|
54716
54560
|
});
|
|
54717
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
|
+
}
|
|
54718
54572
|
release() {
|
|
54719
54573
|
super.release();
|
|
54720
54574
|
this.removeProduct();
|
|
@@ -55612,6 +55466,7 @@
|
|
|
55612
55466
|
if (!this._beforeRender(option)) {
|
|
55613
55467
|
return self;
|
|
55614
55468
|
}
|
|
55469
|
+
this._updateAnimateState(true);
|
|
55615
55470
|
(_a = this._compiler) === null || _a === void 0 ? void 0 : _a.render(option.morphConfig);
|
|
55616
55471
|
this._updateAnimateState(false);
|
|
55617
55472
|
this._afterRender();
|
|
@@ -55908,7 +55763,7 @@
|
|
|
55908
55763
|
return this._beforeRender(option);
|
|
55909
55764
|
}
|
|
55910
55765
|
_reCompile(updateResult, morphConfig) {
|
|
55911
|
-
var _a, _b, _c, _d, _e
|
|
55766
|
+
var _a, _b, _c, _d, _e;
|
|
55912
55767
|
if (updateResult.reMake) {
|
|
55913
55768
|
this._releaseData();
|
|
55914
55769
|
this._initDataSet();
|
|
@@ -55928,16 +55783,20 @@
|
|
|
55928
55783
|
if (updateResult.reMake) {
|
|
55929
55784
|
(_c = this._compiler) === null || _c === void 0 ? void 0 : _c.releaseGrammar();
|
|
55930
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
|
+
}
|
|
55931
55789
|
}
|
|
55932
|
-
else
|
|
55933
|
-
(
|
|
55934
|
-
|
|
55935
|
-
|
|
55936
|
-
|
|
55937
|
-
|
|
55938
|
-
|
|
55939
|
-
|
|
55940
|
-
|
|
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
|
+
}
|
|
55941
55800
|
}
|
|
55942
55801
|
}
|
|
55943
55802
|
_beforeRender(option = {}) {
|
|
@@ -55996,21 +55855,17 @@
|
|
|
55996
55855
|
});
|
|
55997
55856
|
}
|
|
55998
55857
|
_updateAnimateState(initial) {
|
|
55999
|
-
var _a, _b;
|
|
56000
55858
|
if (this._option.animation) {
|
|
56001
55859
|
const updateGraphicAnimationState = (graphic) => {
|
|
56002
55860
|
var _a;
|
|
56003
55861
|
const diffState = (_a = graphic.context) === null || _a === void 0 ? void 0 : _a.diffState;
|
|
56004
55862
|
if (initial) {
|
|
56005
|
-
return diffState === 'exit' ?
|
|
55863
|
+
return diffState === 'exit' ? undefined : AnimationStateEnum.appear;
|
|
56006
55864
|
}
|
|
56007
55865
|
return diffState;
|
|
56008
55866
|
};
|
|
56009
|
-
|
|
56010
|
-
|
|
56011
|
-
});
|
|
56012
|
-
(_b = this._chart) === null || _b === void 0 ? void 0 : _b.getAllComponents().forEach(component => {
|
|
56013
|
-
component.updateAnimateStateCallback(updateGraphicAnimationState);
|
|
55867
|
+
this._compiler.getRootMarks().forEach(mark => {
|
|
55868
|
+
mark.updateAnimationState(updateGraphicAnimationState);
|
|
56014
55869
|
});
|
|
56015
55870
|
}
|
|
56016
55871
|
}
|
|
@@ -56094,11 +55949,11 @@
|
|
|
56094
55949
|
}
|
|
56095
55950
|
if (this._chart) {
|
|
56096
55951
|
this._chart.updateData(id, data, true, parserOptions);
|
|
55952
|
+
this._compiler.render();
|
|
56097
55953
|
if (userUpdateOptions === null || userUpdateOptions === void 0 ? void 0 : userUpdateOptions.reAnimate) {
|
|
56098
55954
|
this.stopAnimation();
|
|
56099
55955
|
this._updateAnimateState(true);
|
|
56100
55956
|
}
|
|
56101
|
-
this._compiler.render();
|
|
56102
55957
|
return this;
|
|
56103
55958
|
}
|
|
56104
55959
|
this._spec.data = array(this._spec.data);
|
|
@@ -56109,11 +55964,11 @@
|
|
|
56109
55964
|
if (this._chart) {
|
|
56110
55965
|
this._chart.updateFullData(data);
|
|
56111
55966
|
if (reRender) {
|
|
55967
|
+
this._compiler.render();
|
|
56112
55968
|
if (userUpdateOptions === null || userUpdateOptions === void 0 ? void 0 : userUpdateOptions.reAnimate) {
|
|
56113
55969
|
this.stopAnimation();
|
|
56114
55970
|
this._updateAnimateState(true);
|
|
56115
55971
|
}
|
|
56116
|
-
this._compiler.render();
|
|
56117
55972
|
}
|
|
56118
55973
|
return this;
|
|
56119
55974
|
}
|
|
@@ -56633,20 +56488,10 @@
|
|
|
56633
56488
|
return (_a = this._chart) === null || _a === void 0 ? void 0 : _a.setDimensionIndex(value, opt);
|
|
56634
56489
|
}
|
|
56635
56490
|
stopAnimation() {
|
|
56636
|
-
var _a;
|
|
56637
|
-
(_a = this.getStage()) === null || _a === void 0 ? void 0 : _a.stopAnimation(true);
|
|
56638
|
-
}
|
|
56639
|
-
reRunNormalAnimation() {
|
|
56640
|
-
var _a;
|
|
56641
|
-
(_a = this.getStage()) === null || _a === void 0 ? void 0 : _a.reApplyAnimationState('normal', true);
|
|
56642
56491
|
}
|
|
56643
56492
|
pauseAnimation() {
|
|
56644
|
-
var _a;
|
|
56645
|
-
(_a = this.getStage()) === null || _a === void 0 ? void 0 : _a.pauseAnimation(true);
|
|
56646
56493
|
}
|
|
56647
56494
|
resumeAnimation() {
|
|
56648
|
-
var _a;
|
|
56649
|
-
(_a = this.getStage()) === null || _a === void 0 ? void 0 : _a.resumeAnimation(true);
|
|
56650
56495
|
}
|
|
56651
56496
|
convertDatumToPosition(datum, dataLinkInfo = {}, isRelativeToCanvas = false, checkInViewData) {
|
|
56652
56497
|
var _a;
|
|
@@ -56930,7 +56775,7 @@
|
|
|
56930
56775
|
});
|
|
56931
56776
|
};
|
|
56932
56777
|
|
|
56933
|
-
const version = "2.0.
|
|
56778
|
+
const version = "2.0.3-alpha.0";
|
|
56934
56779
|
|
|
56935
56780
|
const addVChartProperty = (data, op) => {
|
|
56936
56781
|
const context = op.beforeCall();
|
|
@@ -58743,11 +58588,14 @@
|
|
|
58743
58588
|
}
|
|
58744
58589
|
if (isNil$1(dataView)) {
|
|
58745
58590
|
m.setData(this._data);
|
|
58591
|
+
m.setSkipBeforeLayouted(true);
|
|
58746
58592
|
}
|
|
58747
58593
|
else if (dataView !== false) {
|
|
58748
58594
|
m.setDataView(dataView);
|
|
58749
58595
|
}
|
|
58750
|
-
|
|
58596
|
+
if (isBoolean$1(skipBeforeLayouted)) {
|
|
58597
|
+
m.setSkipBeforeLayouted(skipBeforeLayouted);
|
|
58598
|
+
}
|
|
58751
58599
|
if (!isNil$1(groupKey)) {
|
|
58752
58600
|
m.setGroupKey(groupKey);
|
|
58753
58601
|
}
|
|
@@ -59972,6 +59820,30 @@
|
|
|
59972
59820
|
|
|
59973
59821
|
const lineSeriesMark = Object.assign(Object.assign({}, baseSeriesMark), lineLikeSeriesMark);
|
|
59974
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
|
+
|
|
59975
59847
|
const isStopsEqual = (prev, next) => {
|
|
59976
59848
|
var _a, _b;
|
|
59977
59849
|
if (prev === next) {
|
|
@@ -63138,24 +63010,6 @@
|
|
|
63138
63010
|
};
|
|
63139
63011
|
}
|
|
63140
63012
|
}
|
|
63141
|
-
_updateData() {
|
|
63142
|
-
var _a, _b, _c;
|
|
63143
|
-
const tickTransformType = this.registerTicksTransform();
|
|
63144
|
-
if (this._spec.showAllGroupLayers && this._scales.length > 1) {
|
|
63145
|
-
const layers = (_a = this._spec.layers) !== null && _a !== void 0 ? _a : [];
|
|
63146
|
-
Object.keys(this._tickDataMap).forEach(layer => {
|
|
63147
|
-
const layerConfig = layers[this._scales.length - 1 - +layer] || {};
|
|
63148
|
-
const tickData = this._tickDataMap[layer];
|
|
63149
|
-
const tickTransform = tickData === null || tickData === void 0 ? void 0 : tickData.getDataView().transformsArr.find((t) => t.type === tickTransformType);
|
|
63150
|
-
tickTransform &&
|
|
63151
|
-
(tickTransform.options = Object.assign(Object.assign({}, this._tickTransformOption()), layerConfig));
|
|
63152
|
-
});
|
|
63153
|
-
}
|
|
63154
|
-
else {
|
|
63155
|
-
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);
|
|
63156
|
-
tickTransform && (tickTransform.options = this._tickTransformOption());
|
|
63157
|
-
}
|
|
63158
|
-
}
|
|
63159
63013
|
dataToPosition(values, cfg = {}) {
|
|
63160
63014
|
var _a, _b;
|
|
63161
63015
|
if (values.length === 0 || this._scales.length === 0) {
|
|
@@ -63248,7 +63102,7 @@
|
|
|
63248
63102
|
getLabelItems(length) {
|
|
63249
63103
|
const labelItems = [];
|
|
63250
63104
|
let preData = [];
|
|
63251
|
-
|
|
63105
|
+
this._scales.forEach((scale, index) => {
|
|
63252
63106
|
var _a;
|
|
63253
63107
|
const tickData = this._tickDataMap[index];
|
|
63254
63108
|
const isTickDataHaveData = (_a = tickData === null || tickData === void 0 ? void 0 : tickData.getLatestData()) === null || _a === void 0 ? void 0 : _a.length;
|
|
@@ -63430,20 +63284,6 @@
|
|
|
63430
63284
|
minBandSize
|
|
63431
63285
|
};
|
|
63432
63286
|
}
|
|
63433
|
-
_compareSpec(spec, prevSpec) {
|
|
63434
|
-
const result = super._compareSpec(spec, prevSpec);
|
|
63435
|
-
if (result.reMake) {
|
|
63436
|
-
return result;
|
|
63437
|
-
}
|
|
63438
|
-
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)) {
|
|
63439
|
-
result.reMake = true;
|
|
63440
|
-
}
|
|
63441
|
-
return result;
|
|
63442
|
-
}
|
|
63443
|
-
reInit(spec) {
|
|
63444
|
-
super.reInit();
|
|
63445
|
-
this === null || this === void 0 ? void 0 : this._updateData();
|
|
63446
|
-
}
|
|
63447
63287
|
}
|
|
63448
63288
|
CartesianBandAxis.type = ComponentTypeEnum.cartesianBandAxis;
|
|
63449
63289
|
CartesianBandAxis.specKey = 'axes';
|
|
@@ -65086,10 +64926,6 @@
|
|
|
65086
64926
|
const elements = [...this._components, ...this._regions, ...this._series];
|
|
65087
64927
|
elements.forEach(element => element.onEvaluateEnd(option));
|
|
65088
64928
|
}
|
|
65089
|
-
onBeforeRender() {
|
|
65090
|
-
const elements = [...this._components, ...this._regions, ...this._series];
|
|
65091
|
-
elements.forEach(element => element.onBeforeRender());
|
|
65092
|
-
}
|
|
65093
64929
|
getLayoutElements() {
|
|
65094
64930
|
return this.getAllModels()
|
|
65095
64931
|
.map(i => i.layout)
|
|
@@ -65555,11 +65391,17 @@
|
|
|
65555
65391
|
}
|
|
65556
65392
|
_enableMarkAnimation(states) {
|
|
65557
65393
|
const marks = this.getAllMarks();
|
|
65558
|
-
marks.forEach(mark =>
|
|
65394
|
+
marks.forEach(mark => {
|
|
65395
|
+
const product = mark.getProduct();
|
|
65396
|
+
if (product && product.animate) ;
|
|
65397
|
+
});
|
|
65559
65398
|
}
|
|
65560
65399
|
_disableMarkAnimation(states) {
|
|
65561
65400
|
const marks = this.getAllMarks();
|
|
65562
|
-
marks.forEach(mark =>
|
|
65401
|
+
marks.forEach(mark => {
|
|
65402
|
+
const product = mark.getProduct();
|
|
65403
|
+
if (product && product.animate) ;
|
|
65404
|
+
});
|
|
65563
65405
|
}
|
|
65564
65406
|
filterGraphicsByDatum(datum, opt = {}) {
|
|
65565
65407
|
var _a;
|
|
@@ -66442,7 +66284,7 @@
|
|
|
66442
66284
|
layoutStartPoint = { x: 0, y: 0 };
|
|
66443
66285
|
}
|
|
66444
66286
|
Object.keys(stateByField).forEach(field => {
|
|
66445
|
-
var _a, _b, _c, _d, _e
|
|
66287
|
+
var _a, _b, _c, _d, _e;
|
|
66446
66288
|
const { currentValue, cacheInfo, labelsComp, attributes, coordKey } = stateByField[field];
|
|
66447
66289
|
let axis = null;
|
|
66448
66290
|
let coord = 0;
|
|
@@ -66454,8 +66296,8 @@
|
|
|
66454
66296
|
item.axis.getLayoutStartPoint()[coordKey] -
|
|
66455
66297
|
layoutStartPoint[coordKey];
|
|
66456
66298
|
axis = item.axis;
|
|
66457
|
-
axisLabel = (
|
|
66458
|
-
.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];
|
|
66459
66301
|
}
|
|
66460
66302
|
const isVisible = !!currentValue.size && Number.isFinite(coord) && !Number.isNaN(coord);
|
|
66461
66303
|
const useCache = enableRemain && !isVisible && isValid$1(cacheInfo);
|
|
@@ -69833,7 +69675,8 @@
|
|
|
69833
69675
|
initMark() {
|
|
69834
69676
|
this._pathMark = this._createMark(MapSeries.mark.area, {
|
|
69835
69677
|
groupKey: this.getDimensionField()[0],
|
|
69836
|
-
isSeriesMark: true
|
|
69678
|
+
isSeriesMark: true,
|
|
69679
|
+
skipBeforeLayouted: true
|
|
69837
69680
|
}, {
|
|
69838
69681
|
morph: shouldMarkDoMorph(this._spec, MapSeries.mark.area.name),
|
|
69839
69682
|
morphElementKey: this.getDimensionField()[0]
|
|
@@ -73319,6 +73162,7 @@
|
|
|
73319
73162
|
this._pieMark = this._createMark(Object.assign(Object.assign({}, BasePieSeries.mark.pie), { name: this._pieMarkName, type: this._pieMarkType }), {
|
|
73320
73163
|
key: DEFAULT_DATA_KEY,
|
|
73321
73164
|
groupKey: this._seriesField,
|
|
73165
|
+
skipBeforeLayouted: true,
|
|
73322
73166
|
isSeriesMark: true
|
|
73323
73167
|
}, {
|
|
73324
73168
|
morph: shouldMarkDoMorph(this._spec, this._pieMarkName),
|
|
@@ -74783,16 +74627,17 @@
|
|
|
74783
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;
|
|
74784
74628
|
if (res && !userUpdateContent) {
|
|
74785
74629
|
res.updateContent = (prev, datum, params) => {
|
|
74630
|
+
var _a, _b;
|
|
74786
74631
|
const childrenContent = [];
|
|
74787
74632
|
const childrenPrev = prev.filter((p) => p.key === 'children');
|
|
74788
74633
|
childrenPrev.length > 0 &&
|
|
74789
|
-
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) => {
|
|
74790
74635
|
let flag = true;
|
|
74791
74636
|
for (const key in element) {
|
|
74792
74637
|
childrenContent.push(Object.assign(Object.assign({}, childrenPrev[0]), { shapeType: 'circle', hasShape: flag, key: key, value: element[key] + '' }));
|
|
74793
74638
|
flag = false;
|
|
74794
74639
|
}
|
|
74795
|
-
});
|
|
74640
|
+
}));
|
|
74796
74641
|
return prev.concat(childrenContent);
|
|
74797
74642
|
};
|
|
74798
74643
|
}
|
|
@@ -74815,13 +74660,21 @@
|
|
|
74815
74660
|
}
|
|
74816
74661
|
}
|
|
74817
74662
|
const dataOp = datum[op];
|
|
74818
|
-
dataOp
|
|
74819
|
-
|
|
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, {
|
|
74820
74674
|
[DEFAULT_DATA_INDEX]: index,
|
|
74821
|
-
[DEFAULT_DATA_KEY]:
|
|
74675
|
+
[DEFAULT_DATA_KEY]: dataKey
|
|
74822
74676
|
}));
|
|
74823
|
-
|
|
74824
|
-
});
|
|
74677
|
+
}
|
|
74825
74678
|
});
|
|
74826
74679
|
return result;
|
|
74827
74680
|
};
|
|
@@ -74914,7 +74767,7 @@
|
|
|
74914
74767
|
}
|
|
74915
74768
|
}
|
|
74916
74769
|
initData() {
|
|
74917
|
-
var _a;
|
|
74770
|
+
var _a, _b;
|
|
74918
74771
|
super.initData();
|
|
74919
74772
|
this._xDimensionStatisticsDomain = this.getRawData().latestData.map((d) => d[this._fieldY[0]]);
|
|
74920
74773
|
registerDataSetInstanceTransform(this._option.dataSet, 'objFlat', objFlat);
|
|
@@ -74925,9 +74778,31 @@
|
|
|
74925
74778
|
options: 'dots',
|
|
74926
74779
|
level: exports.TransformLevel.dotObjFlat
|
|
74927
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);
|
|
74928
74795
|
}
|
|
74929
74796
|
getStatisticFields() {
|
|
74930
|
-
|
|
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;
|
|
74931
74806
|
}
|
|
74932
74807
|
setAttrFromSpec() {
|
|
74933
74808
|
var _a;
|
|
@@ -74972,20 +74847,21 @@
|
|
|
74972
74847
|
});
|
|
74973
74848
|
}
|
|
74974
74849
|
initMarkStyle() {
|
|
74850
|
+
var _a, _b;
|
|
74975
74851
|
const clipMark = this._clipMark;
|
|
74976
74852
|
if (clipMark) {
|
|
74977
74853
|
this.setMarkStyle(clipMark, {
|
|
74978
|
-
x: -this._spec.leftAppendPadding,
|
|
74854
|
+
x: -((_a = this._spec.leftAppendPadding) !== null && _a !== void 0 ? _a : 0),
|
|
74979
74855
|
y: 0,
|
|
74980
74856
|
width: 10000,
|
|
74981
|
-
height: this._spec.clipHeight
|
|
74857
|
+
height: () => { var _a; return (_a = this._spec.clipHeight) !== null && _a !== void 0 ? _a : this._region.getLayoutRect().height; }
|
|
74982
74858
|
}, 'normal', exports.AttributeLevel.Series);
|
|
74983
74859
|
clipMark.setMarkConfig({ interactive: false, clip: true });
|
|
74984
74860
|
}
|
|
74985
74861
|
const containerMark = this._containerMark;
|
|
74986
74862
|
if (containerMark) {
|
|
74987
74863
|
this.setMarkStyle(containerMark, {
|
|
74988
|
-
x: this._spec.leftAppendPadding
|
|
74864
|
+
x: (_b = this._spec.leftAppendPadding) !== null && _b !== void 0 ? _b : 0
|
|
74989
74865
|
}, 'normal', exports.AttributeLevel.Series);
|
|
74990
74866
|
containerMark.setMarkConfig({ interactive: false });
|
|
74991
74867
|
}
|
|
@@ -75210,7 +75086,13 @@
|
|
|
75210
75086
|
}
|
|
75211
75087
|
}
|
|
75212
75088
|
|
|
75213
|
-
|
|
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" } });
|
|
75214
75096
|
|
|
75215
75097
|
const linkDotInfo = (data, op) => {
|
|
75216
75098
|
const { infoKey, fields, linkData, dotData } = op;
|
|
@@ -75252,6 +75134,7 @@
|
|
|
75252
75134
|
constructor() {
|
|
75253
75135
|
super(...arguments);
|
|
75254
75136
|
this.type = exports.SeriesTypeEnum.link;
|
|
75137
|
+
this._curveLinkCountMap = {};
|
|
75255
75138
|
}
|
|
75256
75139
|
getFromField() {
|
|
75257
75140
|
return this._fromField;
|
|
@@ -75322,11 +75205,12 @@
|
|
|
75322
75205
|
this.setDotSeriesSpec(this._spec.dotSeriesSpec);
|
|
75323
75206
|
}
|
|
75324
75207
|
initMark() {
|
|
75208
|
+
const { linkType = LinkType.line, imageLabelField } = this._spec;
|
|
75325
75209
|
this._clipMark = this._createMark(LinkSeries.mark.group);
|
|
75326
75210
|
this._containerMark = this._createMark(LinkSeries.mark.group, {
|
|
75327
75211
|
parent: this._clipMark
|
|
75328
75212
|
});
|
|
75329
|
-
this._linkMark = this._createMark(LinkSeries.mark.link, {
|
|
75213
|
+
this._linkMark = this._createMark(linkType === LinkType.curve ? LinkSeries.mark.curveLink : LinkSeries.mark.link, {
|
|
75330
75214
|
skipBeforeLayouted: false,
|
|
75331
75215
|
parent: this._containerMark
|
|
75332
75216
|
});
|
|
@@ -75335,16 +75219,23 @@
|
|
|
75335
75219
|
isSeriesMark: true,
|
|
75336
75220
|
parent: this._containerMark
|
|
75337
75221
|
});
|
|
75222
|
+
if (imageLabelField) {
|
|
75223
|
+
this._imageLabelMark = this._createMark(LinkSeries.mark.imageLabel, {
|
|
75224
|
+
skipBeforeLayouted: false,
|
|
75225
|
+
isSeriesMark: true,
|
|
75226
|
+
parent: this._containerMark
|
|
75227
|
+
});
|
|
75228
|
+
}
|
|
75338
75229
|
}
|
|
75339
75230
|
initMarkStyle() {
|
|
75340
|
-
var _a, _b, _c, _d;
|
|
75231
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
75341
75232
|
const clipMark = this._clipMark;
|
|
75342
75233
|
if (clipMark) {
|
|
75343
75234
|
this.setMarkStyle(clipMark, {
|
|
75344
|
-
x: -this._spec.leftAppendPadding,
|
|
75235
|
+
x: -((_a = this._spec.leftAppendPadding) !== null && _a !== void 0 ? _a : 0),
|
|
75345
75236
|
y: 0,
|
|
75346
75237
|
width: 10000,
|
|
75347
|
-
height: this._spec.clipHeight
|
|
75238
|
+
height: () => { var _a; return (_a = this._spec.clipHeight) !== null && _a !== void 0 ? _a : this._region.getLayoutRect().height; }
|
|
75348
75239
|
}, 'normal', exports.AttributeLevel.Series);
|
|
75349
75240
|
clipMark.setMarkConfig({ interactive: false, clip: true });
|
|
75350
75241
|
}
|
|
@@ -75357,19 +75248,43 @@
|
|
|
75357
75248
|
containerMark.setMarkConfig({ interactive: false });
|
|
75358
75249
|
}
|
|
75359
75250
|
const linkMark = this._linkMark;
|
|
75251
|
+
const { linkType = LinkType.line } = this._spec;
|
|
75360
75252
|
if (linkMark) {
|
|
75361
|
-
|
|
75362
|
-
|
|
75363
|
-
|
|
75364
|
-
|
|
75365
|
-
|
|
75366
|
-
|
|
75367
|
-
|
|
75368
|
-
|
|
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
|
+
}
|
|
75369
75284
|
}
|
|
75370
75285
|
const arrowMark = this._arrowMark;
|
|
75371
75286
|
if (arrowMark) {
|
|
75372
|
-
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;
|
|
75373
75288
|
this.setMarkStyle(arrowMark, {
|
|
75374
75289
|
x: this.dataToPositionXTo.bind(this),
|
|
75375
75290
|
y: (datum) => this.dataToPositionArrowYTo(datum, arrowSize),
|
|
@@ -75381,18 +75296,44 @@
|
|
|
75381
75296
|
}
|
|
75382
75297
|
}, 'normal', exports.AttributeLevel.Series);
|
|
75383
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
|
+
}
|
|
75384
75317
|
}
|
|
75385
75318
|
afterInitMark() {
|
|
75386
75319
|
super.afterInitMark();
|
|
75387
75320
|
}
|
|
75388
75321
|
dataToPositionXFrom(datum) {
|
|
75322
|
+
var _a, _b, _c, _d;
|
|
75389
75323
|
if (!this._xAxisHelper) {
|
|
75390
75324
|
return Number.NaN;
|
|
75391
75325
|
}
|
|
75392
75326
|
const { dataToPosition } = this._xAxisHelper;
|
|
75393
|
-
|
|
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'), {
|
|
75394
75332
|
bandPosition: this._bandPosition
|
|
75395
|
-
})
|
|
75333
|
+
}) +
|
|
75334
|
+
(allowExtend && (!datum.isExtend || datum.isExtend === 'left')
|
|
75335
|
+
? -(array(bandSize)[0] + dotSize) / 2
|
|
75336
|
+
: 0));
|
|
75396
75337
|
}
|
|
75397
75338
|
dataToPositionYFrom(datum) {
|
|
75398
75339
|
if (!this._yAxisHelper) {
|
|
@@ -75402,13 +75343,21 @@
|
|
|
75402
75343
|
return dataToPosition(this.getDatumPositionValues(datum, this._fromField + '_yField'));
|
|
75403
75344
|
}
|
|
75404
75345
|
dataToPositionXTo(datum) {
|
|
75346
|
+
var _a, _b, _c, _d;
|
|
75405
75347
|
if (!this._xAxisHelper) {
|
|
75406
75348
|
return Number.NaN;
|
|
75407
75349
|
}
|
|
75408
75350
|
const { dataToPosition } = this._xAxisHelper;
|
|
75409
|
-
|
|
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'), {
|
|
75410
75356
|
bandPosition: this._bandPosition
|
|
75411
|
-
})
|
|
75357
|
+
}) +
|
|
75358
|
+
(allowExtend && (!datum.isExtend || datum.isExtend === 'right')
|
|
75359
|
+
? (array(bandSize)[0] + dotSize) / 2
|
|
75360
|
+
: 0));
|
|
75412
75361
|
}
|
|
75413
75362
|
dataToPositionYTo(datum) {
|
|
75414
75363
|
if (!this._yAxisHelper) {
|
|
@@ -75430,9 +75379,10 @@
|
|
|
75430
75379
|
}) + offset);
|
|
75431
75380
|
}
|
|
75432
75381
|
dataToOpacity(datum) {
|
|
75433
|
-
if (this.
|
|
75434
|
-
this.isPositionXOuterRange(datum, this.
|
|
75435
|
-
|
|
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])) {
|
|
75436
75386
|
return 0;
|
|
75437
75387
|
}
|
|
75438
75388
|
return 1;
|
|
@@ -80977,6 +80927,7 @@
|
|
|
80977
80927
|
if (this._spec.isTransform) {
|
|
80978
80928
|
this._funnelTransformMark = this._createMark(Object.assign(Object.assign({}, FunnelSeries.mark.transform), { name: this._transformMarkName, type: this._transformMarkType }), {
|
|
80979
80929
|
themeSpec: (_b = this._theme) === null || _b === void 0 ? void 0 : _b.transform,
|
|
80930
|
+
skipBeforeLayouted: true,
|
|
80980
80931
|
noSeparateStyle: true
|
|
80981
80932
|
});
|
|
80982
80933
|
if (this._funnelTransformMark) {
|
|
@@ -80989,6 +80940,7 @@
|
|
|
80989
80940
|
this._funnelOuterLabelMark.label = this._createMark(FunnelSeries.mark.outerLabel, {
|
|
80990
80941
|
themeSpec: (_h = this._theme) === null || _h === void 0 ? void 0 : _h.outerLabel,
|
|
80991
80942
|
markSpec: this._spec.outerLabel,
|
|
80943
|
+
skipBeforeLayouted: true,
|
|
80992
80944
|
noSeparateStyle: true,
|
|
80993
80945
|
parent: false
|
|
80994
80946
|
});
|
|
@@ -89729,15 +89681,11 @@
|
|
|
89729
89681
|
});
|
|
89730
89682
|
};
|
|
89731
89683
|
this._handleClickToLock = (params) => {
|
|
89732
|
-
var _a, _b;
|
|
89733
89684
|
if (this._clickLock) {
|
|
89734
89685
|
this._handleChartMouseOut(params);
|
|
89735
89686
|
this._clickLock = false;
|
|
89736
89687
|
}
|
|
89737
89688
|
else {
|
|
89738
|
-
if (!this._isTooltipShown && !((_b = (_a = this.tooltipHandler) === null || _a === void 0 ? void 0 : _a.isTooltipShown) === null || _b === void 0 ? void 0 : _b.call(_a))) {
|
|
89739
|
-
return;
|
|
89740
|
-
}
|
|
89741
89689
|
this._clickLock = true;
|
|
89742
89690
|
}
|
|
89743
89691
|
};
|
|
@@ -90036,9 +89984,6 @@
|
|
|
90036
89984
|
return;
|
|
90037
89985
|
}
|
|
90038
89986
|
this._isEnterTooltip = false;
|
|
90039
|
-
if (this._spec.triggerOff === 'none') {
|
|
90040
|
-
return;
|
|
90041
|
-
}
|
|
90042
89987
|
if (this._cacheEnterableRect) {
|
|
90043
89988
|
const newRect = (_a = container.getBoundingClientRect) === null || _a === void 0 ? void 0 : _a.call(container);
|
|
90044
89989
|
if (newRect &&
|
|
@@ -90055,10 +90000,7 @@
|
|
|
90055
90000
|
const activeType = this._spec.activeType;
|
|
90056
90001
|
this.processor = {};
|
|
90057
90002
|
activeType.forEach(type => {
|
|
90058
|
-
|
|
90059
|
-
if (instance) {
|
|
90060
|
-
this.processor[type] = instance;
|
|
90061
|
-
}
|
|
90003
|
+
this.processor[type] = Factory.createTooltipProcessor(type, this);
|
|
90062
90004
|
});
|
|
90063
90005
|
}
|
|
90064
90006
|
_initEvent() {
|
|
@@ -90486,7 +90428,7 @@
|
|
|
90486
90428
|
this.event.off(eventName, handler);
|
|
90487
90429
|
}
|
|
90488
90430
|
}
|
|
90489
|
-
|
|
90431
|
+
updateLayoutAttribute() {
|
|
90490
90432
|
this._limitBounds = null;
|
|
90491
90433
|
this._showDefaultCrosshair();
|
|
90492
90434
|
}
|
|
@@ -91370,7 +91312,7 @@
|
|
|
91370
91312
|
return data.filter(filter);
|
|
91371
91313
|
};
|
|
91372
91314
|
const dataFilterComputeDomain = (data, op) => {
|
|
91373
|
-
const { stateFields, valueFields, dataCollection, isCategoryState } = op.input;
|
|
91315
|
+
const { stateFields, valueFields, dataCollection, isCategoryState, seriesTypes } = op.input;
|
|
91374
91316
|
const { stateField, valueField } = op.output;
|
|
91375
91317
|
const resultObj = {};
|
|
91376
91318
|
const resultData = [];
|
|
@@ -91391,7 +91333,8 @@
|
|
|
91391
91333
|
}
|
|
91392
91334
|
});
|
|
91393
91335
|
}
|
|
91394
|
-
dv.latestData
|
|
91336
|
+
const data = seriesTypes[i] === 'dot' ? objFlat(dv.latestData, 'dots') : dv.latestData;
|
|
91337
|
+
data.forEach((d) => {
|
|
91395
91338
|
array(stateFields[i]).forEach(state => {
|
|
91396
91339
|
if (!isNil$1(d[state])) {
|
|
91397
91340
|
if (isNil$1(resultObj[d[state]])) {
|
|
@@ -91476,30 +91419,39 @@
|
|
|
91476
91419
|
const axisScale = axis.getScale();
|
|
91477
91420
|
const reverse = this._isReverse();
|
|
91478
91421
|
const newRangeFactor = reverse ? [1 - this._end, 1 - this._start] : [this._start, this._end];
|
|
91422
|
+
const linkedAxis = this._linkedAxisComponent;
|
|
91479
91423
|
if (reverse) {
|
|
91480
91424
|
switch (tag) {
|
|
91481
91425
|
case 'startHandler':
|
|
91482
91426
|
axis.scaleRangeFactorEnd(newRangeFactor[1]);
|
|
91427
|
+
linkedAxis === null || linkedAxis === void 0 ? void 0 : linkedAxis.scaleRangeFactorEnd(newRangeFactor[1]);
|
|
91483
91428
|
break;
|
|
91484
91429
|
case 'endHandler':
|
|
91485
91430
|
axis.scaleRangeFactorStart(newRangeFactor[0]);
|
|
91431
|
+
linkedAxis === null || linkedAxis === void 0 ? void 0 : linkedAxis.scaleRangeFactorStart(newRangeFactor[0]);
|
|
91486
91432
|
break;
|
|
91487
91433
|
default:
|
|
91488
91434
|
axis.scaleRangeFactorStart(newRangeFactor[0], true);
|
|
91489
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]);
|
|
91490
91438
|
}
|
|
91491
91439
|
}
|
|
91492
91440
|
else {
|
|
91493
91441
|
switch (tag) {
|
|
91494
91442
|
case 'startHandler':
|
|
91495
91443
|
axis.scaleRangeFactorStart(newRangeFactor[0]);
|
|
91444
|
+
linkedAxis === null || linkedAxis === void 0 ? void 0 : linkedAxis.scaleRangeFactorStart(newRangeFactor[0]);
|
|
91496
91445
|
break;
|
|
91497
91446
|
case 'endHandler':
|
|
91498
91447
|
axis.scaleRangeFactorEnd(newRangeFactor[1]);
|
|
91448
|
+
linkedAxis === null || linkedAxis === void 0 ? void 0 : linkedAxis.scaleRangeFactorEnd(newRangeFactor[1]);
|
|
91499
91449
|
break;
|
|
91500
91450
|
default:
|
|
91501
91451
|
axis.scaleRangeFactorEnd(newRangeFactor[1], true);
|
|
91452
|
+
linkedAxis === null || linkedAxis === void 0 ? void 0 : linkedAxis.scaleRangeFactorEnd(newRangeFactor[1], true);
|
|
91502
91453
|
axis.scaleRangeFactorStart(newRangeFactor[0]);
|
|
91454
|
+
linkedAxis === null || linkedAxis === void 0 ? void 0 : linkedAxis.scaleRangeFactorStart(newRangeFactor[0]);
|
|
91503
91455
|
}
|
|
91504
91456
|
}
|
|
91505
91457
|
const newFactor = axisScale.rangeFactor();
|
|
@@ -91681,6 +91633,12 @@
|
|
|
91681
91633
|
else if (isValid$1(this._spec.axisIndex)) {
|
|
91682
91634
|
this._relatedAxisComponent = this._option.getComponentByIndex('axes', this._spec.axisIndex);
|
|
91683
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
|
+
}
|
|
91684
91642
|
if (isNil$1(this._spec.field) && !this._relatedAxisComponent) {
|
|
91685
91643
|
const axes = this._option.getComponentsByKey('axes');
|
|
91686
91644
|
const sameOrientAxis = axes.find((cm) => cm._orient === this._orient);
|
|
@@ -91763,11 +91721,15 @@
|
|
|
91763
91721
|
const dataCollection = [];
|
|
91764
91722
|
const stateFields = [];
|
|
91765
91723
|
const valueFields = [];
|
|
91724
|
+
const seriesTypes = [];
|
|
91766
91725
|
let isCategoryState;
|
|
91767
91726
|
if (this._relatedAxisComponent) {
|
|
91768
91727
|
const originalStateFields = {};
|
|
91769
91728
|
eachSeries(this._regions, s => {
|
|
91770
91729
|
var _a, _b;
|
|
91730
|
+
if (s.type === 'link') {
|
|
91731
|
+
return;
|
|
91732
|
+
}
|
|
91771
91733
|
const xAxisHelper = s.coordinate === 'cartesian'
|
|
91772
91734
|
? s.getXAxisHelper()
|
|
91773
91735
|
: s.coordinate === 'polar'
|
|
@@ -91790,6 +91752,7 @@
|
|
|
91790
91752
|
: yAxisHelper;
|
|
91791
91753
|
const valueAxisHelper = stateAxisHelper === xAxisHelper ? yAxisHelper : xAxisHelper;
|
|
91792
91754
|
dataCollection.push(s.getRawData());
|
|
91755
|
+
seriesTypes.push(s.type);
|
|
91793
91756
|
const seriesSpec = s.getSpec();
|
|
91794
91757
|
const xField = s.coordinate === 'cartesian'
|
|
91795
91758
|
? array(seriesSpec.xField)
|
|
@@ -91808,7 +91771,7 @@
|
|
|
91808
91771
|
}
|
|
91809
91772
|
if (this._valueField) {
|
|
91810
91773
|
const valueField = s.type === 'link' ? ['from_yField'] : valueAxisHelper === xAxisHelper ? xField : yField;
|
|
91811
|
-
if (isContinuous(valueAxisHelper.getScale(0).type)) {
|
|
91774
|
+
if (isContinuous(valueAxisHelper.getScale(0).type) || s.type === 'dot') {
|
|
91812
91775
|
valueFields.push(...valueField);
|
|
91813
91776
|
}
|
|
91814
91777
|
}
|
|
@@ -91841,7 +91804,8 @@
|
|
|
91841
91804
|
dataCollection: dataCollection,
|
|
91842
91805
|
stateFields,
|
|
91843
91806
|
valueFields,
|
|
91844
|
-
isCategoryState
|
|
91807
|
+
isCategoryState,
|
|
91808
|
+
seriesTypes
|
|
91845
91809
|
},
|
|
91846
91810
|
output: {
|
|
91847
91811
|
stateField: this._stateField,
|
|
@@ -91849,9 +91813,9 @@
|
|
|
91849
91813
|
}
|
|
91850
91814
|
}
|
|
91851
91815
|
}, false);
|
|
91852
|
-
this._data = new CompilableData(this._option, data);
|
|
91853
91816
|
data.reRunAllTransform();
|
|
91854
91817
|
dataSet.multipleDataViewAddListener(dataCollection, 'change', this._handleDataCollectionChange.bind(this));
|
|
91818
|
+
this._data = new CompilableData(this._option, data);
|
|
91855
91819
|
}
|
|
91856
91820
|
setAttrFromSpec() {
|
|
91857
91821
|
var _a;
|
|
@@ -92049,7 +92013,7 @@
|
|
|
92049
92013
|
_initCommonEvent() {
|
|
92050
92014
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
92051
92015
|
const delayType = (_b = (_a = this._spec) === null || _a === void 0 ? void 0 : _a.delayType) !== null && _b !== void 0 ? _b : 'throttle';
|
|
92052
|
-
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;
|
|
92053
92017
|
const realTime = (_g = (_f = this._spec) === null || _f === void 0 ? void 0 : _f.realTime) !== null && _g !== void 0 ? _g : true;
|
|
92054
92018
|
const option = { delayType, delayTime, realTime, allowComponentZoom: true };
|
|
92055
92019
|
if (this._zoomAttr.enable) {
|
|
@@ -95197,7 +95161,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
95197
95161
|
this._option.globalInstance.on(exports.ChartEvent.rendered, () => {
|
|
95198
95162
|
var _a;
|
|
95199
95163
|
if ((_a = this._spec) === null || _a === void 0 ? void 0 : _a.auto) {
|
|
95200
|
-
this._playerComponent.pause();
|
|
95201
95164
|
this._playerComponent.play();
|
|
95202
95165
|
}
|
|
95203
95166
|
});
|
|
@@ -96589,7 +96552,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
96589
96552
|
var _a;
|
|
96590
96553
|
this._setRegionMarkPickable(region, true);
|
|
96591
96554
|
const { operateMask } = e.detail;
|
|
96592
|
-
const { updateElementsState = true } = this._spec;
|
|
96593
96555
|
if ((_a = this._spec) === null || _a === void 0 ? void 0 : _a.onBrushEnd) {
|
|
96594
96556
|
if (this._spec.onBrushEnd(e) === true) {
|
|
96595
96557
|
this.clearGraphic();
|
|
@@ -96603,7 +96565,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
96603
96565
|
}
|
|
96604
96566
|
else {
|
|
96605
96567
|
const inBrushData = this._extendDataInBrush(this._inBrushElementsMap);
|
|
96606
|
-
if (
|
|
96568
|
+
if (!this._spec.zoomWhenEmpty && inBrushData.length > 0) {
|
|
96607
96569
|
this._setAxisAndDataZoom(operateMask, region);
|
|
96608
96570
|
}
|
|
96609
96571
|
this._emitEvent(exports.ChartEvent.brushEnd, region);
|
|
@@ -96612,9 +96574,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
96612
96574
|
brush.addEventListener(IOperateType.moveEnd, (e) => {
|
|
96613
96575
|
this._setRegionMarkPickable(region, true);
|
|
96614
96576
|
const { operateMask } = e.detail;
|
|
96615
|
-
const { updateElementsState = true } = this._spec;
|
|
96616
96577
|
const inBrushData = this._extendDataInBrush(this._inBrushElementsMap);
|
|
96617
|
-
if (
|
|
96578
|
+
if (!this._spec.zoomWhenEmpty && inBrushData.length > 0) {
|
|
96618
96579
|
this._setAxisAndDataZoom(operateMask, region);
|
|
96619
96580
|
}
|
|
96620
96581
|
this._emitEvent(exports.ChartEvent.brushEnd, region);
|
|
@@ -96656,11 +96617,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
96656
96617
|
}
|
|
96657
96618
|
_handleBrushChange(region, e) {
|
|
96658
96619
|
const { operateMask } = e.detail;
|
|
96659
|
-
|
|
96660
|
-
|
|
96661
|
-
this._reconfigItem(operateMask, region);
|
|
96662
|
-
this._reconfigLinkedItem(operateMask, region);
|
|
96663
|
-
}
|
|
96620
|
+
this._reconfigItem(operateMask, region);
|
|
96621
|
+
this._reconfigLinkedItem(operateMask, region);
|
|
96664
96622
|
}
|
|
96665
96623
|
_extendDataInBrush(elementsMap) {
|
|
96666
96624
|
var _a, _b;
|
|
@@ -97911,15 +97869,14 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
97911
97869
|
const marginKey = align === 'right' ? 'marginLeft' : 'marginRight';
|
|
97912
97870
|
if (align === 'right') {
|
|
97913
97871
|
panelStyle.direction = 'rtl';
|
|
97872
|
+
titleStyle.textAlign = 'right';
|
|
97873
|
+
keyStyle.textAlign = 'right';
|
|
97874
|
+
valueStyle.textAlign = 'left';
|
|
97914
97875
|
}
|
|
97915
|
-
|
|
97916
|
-
titleStyle.textAlign =
|
|
97917
|
-
|
|
97918
|
-
|
|
97919
|
-
keyStyle.textAlign = align === 'right' ? 'right' : 'left';
|
|
97920
|
-
}
|
|
97921
|
-
if (isNil$1(valueStyle.textAlign)) {
|
|
97922
|
-
valueStyle.textAlign = align === 'right' ? 'left' : 'right';
|
|
97876
|
+
else {
|
|
97877
|
+
titleStyle.textAlign = 'left';
|
|
97878
|
+
keyStyle.textAlign = 'left';
|
|
97879
|
+
valueStyle.textAlign = 'right';
|
|
97923
97880
|
}
|
|
97924
97881
|
shapeStyle[marginKey] = getPixelPropertyStr((_b = shape.spacing) !== null && _b !== void 0 ? _b : DEFAULT_SHAPE_SPACING);
|
|
97925
97882
|
keyStyle[marginKey] = getPixelPropertyStr((_c = keyLabel.spacing) !== null && _c !== void 0 ? _c : DEFAULT_KEY_SPACING);
|
|
@@ -100465,7 +100422,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
100465
100422
|
exports.getCombinedSizeOfRegions = getCombinedSizeOfRegions;
|
|
100466
100423
|
exports.getDataScheme = getDataScheme;
|
|
100467
100424
|
exports.getDatumOfGraphic = getDatumOfGraphic;
|
|
100468
|
-
exports.getDiffAttributesOfGraphic = getDiffAttributesOfGraphic;
|
|
100469
100425
|
exports.getDimensionInfoByValue = getDimensionInfoByValue;
|
|
100470
100426
|
exports.getFieldAlias = getFieldAlias;
|
|
100471
100427
|
exports.getFunnelTheme = getFunnelTheme;
|