@visactor/vchart 2.0.3-alpha.0 → 2.0.3-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/es5/index.js +1 -1
- package/build/index.es.js +980 -897
- package/build/index.js +981 -896
- package/build/index.min.js +2 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/animation/index.js +2 -1
- package/cjs/animation/interface.js +1 -2
- package/cjs/animation/utils.js +1 -1
- package/cjs/animation/utils.js.map +1 -1
- package/cjs/chart/base/base-chart-transformer.js +3 -3
- package/cjs/chart/base/base-chart-transformer.js.map +1 -1
- package/cjs/chart/base/base-chart.d.ts +1 -0
- package/cjs/chart/base/base-chart.js +5 -8
- package/cjs/chart/base/base-chart.js.map +1 -1
- package/cjs/chart/index.d.ts +2 -2
- package/cjs/chart/index.js +7 -2
- package/cjs/chart/index.js.map +1 -1
- package/cjs/chart/interface/chart.d.ts +1 -0
- package/cjs/chart/interface/chart.js.map +1 -1
- package/cjs/chart/interface/common.d.ts +1 -1
- package/cjs/chart/interface/common.js.map +1 -1
- package/cjs/chart/util.js +2 -1
- package/cjs/compile/compiler.d.ts +1 -0
- package/cjs/compile/compiler.js +13 -5
- package/cjs/compile/compiler.js.map +1 -1
- package/cjs/compile/interface/compilable-item.d.ts +1 -0
- package/cjs/compile/interface/compilable-item.js.map +1 -1
- package/cjs/compile/interface/compiler.d.ts +5 -0
- package/cjs/compile/interface/compiler.js.map +1 -1
- package/cjs/component/axis/base-axis.js +14 -13
- package/cjs/component/axis/base-axis.js.map +1 -1
- package/cjs/component/axis/cartesian/band-axis.d.ts +8 -0
- package/cjs/component/axis/cartesian/band-axis.js +9 -0
- 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 +2 -0
- package/cjs/component/axis/mixin/band-axis-mixin.js +15 -1
- 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 +1 -0
- 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/custom-mark/custom-mark.js +6 -9
- package/cjs/component/custom-mark/custom-mark.js.map +1 -1
- package/cjs/component/data-zoom/data-filter-base-component.d.ts +0 -1
- package/cjs/component/data-zoom/data-filter-base-component.js +13 -19
- package/cjs/component/data-zoom/data-filter-base-component.js.map +1 -1
- package/cjs/component/data-zoom/interface.d.ts +0 -3
- package/cjs/component/data-zoom/interface.js.map +1 -1
- package/cjs/component/data-zoom/util.d.ts +0 -1
- package/cjs/component/data-zoom/util.js +3 -4
- package/cjs/component/data-zoom/util.js.map +1 -1
- package/cjs/component/player/player.js +2 -1
- package/cjs/component/player/player.js.map +1 -1
- package/cjs/component/tooltip/tooltip.js +8 -3
- package/cjs/component/tooltip/tooltip.js.map +1 -1
- package/cjs/constant/attribute.js +1 -2
- package/cjs/constant/sunburst.js +2 -1
- package/cjs/constant/waterfall.js +1 -2
- package/cjs/core/index.d.ts +1 -1
- package/cjs/core/index.js +1 -1
- package/cjs/core/index.js.map +1 -1
- package/cjs/core/interface.d.ts +1 -0
- package/cjs/core/interface.js.map +1 -1
- package/cjs/core/util.js +1 -1
- package/cjs/core/vchart.d.ts +2 -0
- package/cjs/core/vchart.js +42 -22
- package/cjs/core/vchart.js.map +1 -1
- package/cjs/data/transforms/obj-flat.js +1 -4
- package/cjs/data/transforms/obj-flat.js.map +1 -1
- package/cjs/mark/base/base-line.d.ts +1 -1
- package/cjs/mark/base/base-line.js.map +1 -1
- package/cjs/mark/base/base-mark.d.ts +6 -2
- package/cjs/mark/base/base-mark.js +69 -51
- package/cjs/mark/base/base-mark.js.map +1 -1
- package/cjs/mark/group.d.ts +3 -2
- package/cjs/mark/group.js +15 -13
- package/cjs/mark/group.js.map +1 -1
- package/cjs/mark/interface/common.d.ts +5 -2
- package/cjs/mark/interface/common.js.map +1 -1
- package/cjs/model/base-model.d.ts +5 -1
- package/cjs/model/base-model.js +7 -0
- package/cjs/model/base-model.js.map +1 -1
- package/cjs/model/interface.d.ts +5 -2
- package/cjs/model/interface.js.map +1 -1
- package/cjs/plugin/components/tooltip-handler/dom-tooltip-handler.d.ts +1 -1
- package/cjs/plugin/components/tooltip-handler/dom-tooltip-handler.js +4 -3
- package/cjs/plugin/components/tooltip-handler/dom-tooltip-handler.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-transformer.js +1 -1
- package/cjs/series/base/base-series-transformer.js.map +1 -1
- package/cjs/series/base/base-series.js +2 -3
- package/cjs/series/base/base-series.js.map +1 -1
- package/cjs/series/dot/dot.d.ts +0 -1
- package/cjs/series/dot/dot.js +6 -29
- package/cjs/series/dot/dot.js.map +1 -1
- package/cjs/series/dot/interface.d.ts +0 -1
- package/cjs/series/dot/interface.js.map +1 -1
- package/cjs/series/dot/tooltip-helper.js +2 -3
- package/cjs/series/dot/tooltip-helper.js.map +1 -1
- package/cjs/series/funnel/funnel.js +0 -2
- package/cjs/series/funnel/funnel.js.map +1 -1
- package/cjs/series/interface/type.d.ts +0 -3
- package/cjs/series/interface/type.js +3 -5
- package/cjs/series/interface/type.js.map +1 -1
- package/cjs/series/link/constant.js +0 -8
- package/cjs/series/link/constant.js.map +1 -1
- package/cjs/series/link/interface.d.ts +1 -10
- package/cjs/series/link/interface.js +1 -5
- package/cjs/series/link/interface.js.map +1 -1
- package/cjs/series/link/link.d.ts +1 -3
- package/cjs/series/link/link.js +16 -46
- package/cjs/series/link/link.js.map +1 -1
- package/cjs/series/map/map.js +1 -2
- package/cjs/series/map/map.js.map +1 -1
- package/cjs/series/pie/pie.js +0 -1
- package/cjs/series/pie/pie.js.map +1 -1
- package/cjs/series/sankey/sankey.d.ts +10 -10
- package/cjs/series/sankey/sankey.js +199 -194
- package/cjs/series/sankey/sankey.js.map +1 -1
- package/cjs/util/mark.d.ts +1 -0
- package/cjs/util/mark.js +10 -1
- package/cjs/util/mark.js.map +1 -1
- package/cjs/util/object.d.ts +1 -0
- package/cjs/util/object.js +13 -2
- package/cjs/util/object.js.map +1 -1
- package/esm/animation/index.js +2 -1
- package/esm/animation/interface.js +1 -2
- package/esm/animation/utils.js +1 -1
- package/esm/animation/utils.js.map +1 -1
- package/esm/chart/base/base-chart-transformer.js +3 -3
- package/esm/chart/base/base-chart-transformer.js.map +1 -1
- package/esm/chart/base/base-chart.d.ts +1 -0
- package/esm/chart/base/base-chart.js +5 -8
- package/esm/chart/base/base-chart.js.map +1 -1
- package/esm/chart/index.d.ts +2 -2
- package/esm/chart/index.js +2 -2
- package/esm/chart/index.js.map +1 -1
- package/esm/chart/interface/chart.d.ts +1 -0
- package/esm/chart/interface/chart.js.map +1 -1
- package/esm/chart/interface/common.d.ts +1 -1
- package/esm/chart/interface/common.js.map +1 -1
- package/esm/chart/util.js +2 -1
- package/esm/compile/compiler.d.ts +1 -0
- package/esm/compile/compiler.js +13 -6
- package/esm/compile/compiler.js.map +1 -1
- package/esm/compile/interface/compilable-item.d.ts +1 -0
- package/esm/compile/interface/compilable-item.js.map +1 -1
- package/esm/compile/interface/compiler.d.ts +5 -0
- package/esm/compile/interface/compiler.js.map +1 -1
- package/esm/component/axis/base-axis.js +8 -8
- package/esm/component/axis/base-axis.js.map +1 -1
- package/esm/component/axis/cartesian/band-axis.d.ts +8 -0
- package/esm/component/axis/cartesian/band-axis.js +9 -1
- 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 +2 -0
- package/esm/component/axis/mixin/band-axis-mixin.js +15 -1
- 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 +1 -0
- 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/custom-mark/custom-mark.js +6 -9
- package/esm/component/custom-mark/custom-mark.js.map +1 -1
- package/esm/component/data-zoom/data-filter-base-component.d.ts +0 -1
- package/esm/component/data-zoom/data-filter-base-component.js +13 -18
- package/esm/component/data-zoom/data-filter-base-component.js.map +1 -1
- package/esm/component/data-zoom/interface.d.ts +0 -3
- package/esm/component/data-zoom/interface.js.map +1 -1
- package/esm/component/data-zoom/util.d.ts +0 -1
- package/esm/component/data-zoom/util.js +2 -5
- package/esm/component/data-zoom/util.js.map +1 -1
- package/esm/component/player/player.js +2 -1
- package/esm/component/player/player.js.map +1 -1
- package/esm/component/tooltip/tooltip.js +8 -3
- package/esm/component/tooltip/tooltip.js.map +1 -1
- package/esm/constant/attribute.js +1 -2
- package/esm/constant/sunburst.js +2 -1
- package/esm/constant/waterfall.js +1 -2
- package/esm/core/index.d.ts +1 -1
- package/esm/core/index.js +1 -1
- package/esm/core/index.js.map +1 -1
- package/esm/core/interface.d.ts +1 -0
- package/esm/core/interface.js.map +1 -1
- package/esm/core/util.js +1 -1
- package/esm/core/vchart.d.ts +2 -0
- package/esm/core/vchart.js +42 -22
- package/esm/core/vchart.js.map +1 -1
- package/esm/data/transforms/obj-flat.js +1 -4
- package/esm/data/transforms/obj-flat.js.map +1 -1
- package/esm/mark/base/base-line.d.ts +1 -1
- package/esm/mark/base/base-line.js.map +1 -1
- package/esm/mark/base/base-mark.d.ts +6 -2
- package/esm/mark/base/base-mark.js +69 -50
- package/esm/mark/base/base-mark.js.map +1 -1
- package/esm/mark/group.d.ts +3 -2
- package/esm/mark/group.js +18 -12
- package/esm/mark/group.js.map +1 -1
- package/esm/mark/interface/common.d.ts +5 -2
- package/esm/mark/interface/common.js.map +1 -1
- package/esm/model/base-model.d.ts +5 -1
- package/esm/model/base-model.js +7 -0
- package/esm/model/base-model.js.map +1 -1
- package/esm/model/interface.d.ts +5 -2
- package/esm/model/interface.js.map +1 -1
- package/esm/plugin/components/tooltip-handler/dom-tooltip-handler.d.ts +1 -1
- package/esm/plugin/components/tooltip-handler/dom-tooltip-handler.js +4 -3
- package/esm/plugin/components/tooltip-handler/dom-tooltip-handler.js.map +1 -1
- package/esm/plugin/components/tooltip-handler/utils/style.js +5 -4
- 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-transformer.js +1 -1
- package/esm/series/base/base-series-transformer.js.map +1 -1
- package/esm/series/base/base-series.js +2 -3
- package/esm/series/base/base-series.js.map +1 -1
- package/esm/series/dot/dot.d.ts +0 -1
- package/esm/series/dot/dot.js +6 -29
- package/esm/series/dot/dot.js.map +1 -1
- package/esm/series/dot/interface.d.ts +0 -1
- package/esm/series/dot/interface.js.map +1 -1
- package/esm/series/dot/tooltip-helper.js +2 -3
- package/esm/series/dot/tooltip-helper.js.map +1 -1
- package/esm/series/funnel/funnel.js +0 -2
- package/esm/series/funnel/funnel.js.map +1 -1
- package/esm/series/interface/type.d.ts +0 -3
- package/esm/series/interface/type.js +3 -5
- package/esm/series/interface/type.js.map +1 -1
- package/esm/series/link/constant.js +0 -8
- package/esm/series/link/constant.js.map +1 -1
- package/esm/series/link/interface.d.ts +1 -10
- package/esm/series/link/interface.js +1 -5
- package/esm/series/link/interface.js.map +1 -1
- package/esm/series/link/link.d.ts +1 -3
- package/esm/series/link/link.js +16 -48
- package/esm/series/link/link.js.map +1 -1
- package/esm/series/map/map.js +1 -2
- package/esm/series/map/map.js.map +1 -1
- package/esm/series/pie/pie.js +0 -1
- package/esm/series/pie/pie.js.map +1 -1
- package/esm/series/sankey/sankey.d.ts +10 -10
- package/esm/series/sankey/sankey.js +192 -187
- package/esm/series/sankey/sankey.js.map +1 -1
- package/esm/util/mark.d.ts +1 -0
- package/esm/util/mark.js +7 -0
- package/esm/util/mark.js.map +1 -1
- package/esm/util/object.d.ts +1 -0
- package/esm/util/object.js +11 -0
- package/esm/util/object.js.map +1 -1
- package/package.json +12 -12
- package/cjs/animation/animate-manager.d.ts +0 -1
- package/cjs/animation/animate-manager.js +0 -2
- package/cjs/animation/animate-manager.js.map +0 -1
- package/esm/animation/animate-manager.d.ts +0 -1
- package/esm/animation/animate-manager.js +0 -2
- package/esm/animation/animate-manager.js.map +0 -1
package/build/index.es.js
CHANGED
|
@@ -14167,9 +14167,9 @@ class Graphic extends Node {
|
|
|
14167
14167
|
setWidthHeightWithoutTransform(aabbBounds) {
|
|
14168
14168
|
this.widthWithoutTransform = aabbBounds.x2 - aabbBounds.x1, this.heightWithoutTransform = aabbBounds.y2 - aabbBounds.y1;
|
|
14169
14169
|
}
|
|
14170
|
-
setAttributesAndPreventAnimate(params, forceUpdateTag = !1, context) {
|
|
14170
|
+
setAttributesAndPreventAnimate(params, forceUpdateTag = !1, context, ignorePriority) {
|
|
14171
14171
|
this.setAttributes(params, forceUpdateTag, context), this.animates && this.animates.forEach(animate => {
|
|
14172
|
-
Object.keys(params).forEach(key => {
|
|
14172
|
+
(animate.priority !== 1 / 0 || ignorePriority) && Object.keys(params).forEach(key => {
|
|
14173
14173
|
animate.preventAttr(key);
|
|
14174
14174
|
});
|
|
14175
14175
|
});
|
|
@@ -14340,7 +14340,7 @@ class Graphic extends Node {
|
|
|
14340
14340
|
});
|
|
14341
14341
|
} else this.stopStateAnimates(), this.setAttributesAndPreventAnimate(attrs, !1, {
|
|
14342
14342
|
type: AttributeUpdateType.STATE
|
|
14343
|
-
});
|
|
14343
|
+
}), this.finalAttribute && Object.assign(this.finalAttribute, attrs);
|
|
14344
14344
|
this._emitCustomEvent("afterStateUpdate", {
|
|
14345
14345
|
type: AttributeUpdateType.STATE
|
|
14346
14346
|
});
|
|
@@ -14733,7 +14733,7 @@ let Group$1 = class Group extends Graphic {
|
|
|
14733
14733
|
}
|
|
14734
14734
|
removeChild(child) {
|
|
14735
14735
|
const data = super.removeChild(child);
|
|
14736
|
-
return
|
|
14736
|
+
return this.getGraphicService().onRemove(child), child.stage = null, this.addUpdateBoundTag(), data;
|
|
14737
14737
|
}
|
|
14738
14738
|
removeAllChild(deep = !1) {
|
|
14739
14739
|
this.forEachChildren(child => {
|
|
@@ -16371,14 +16371,10 @@ class Glyph extends Graphic {
|
|
|
16371
16371
|
attrs && (Object.assign(stateAttrs, attrs.attributes), (null === (_a = attrs.subAttributes) || void 0 === _a ? void 0 : _a.length) && subAttrs.forEach((subAttrs, index) => {
|
|
16372
16372
|
Object.assign(subAttrs, attrs.subAttributes[index]);
|
|
16373
16373
|
}));
|
|
16374
|
-
}), this.subGraphic.forEach((graphic, index) => {
|
|
16375
|
-
graphic.updateNormalAttrs(subAttrs[index]), graphic.applyStateAttrs(subAttrs[index], states, hasAnimation);
|
|
16376
16374
|
}), this.updateNormalAttrs(stateAttrs), this.currentStates = states, this.applyStateAttrs(stateAttrs, states, hasAnimation);
|
|
16377
16375
|
}
|
|
16378
16376
|
clearStates(hasAnimation) {
|
|
16379
|
-
this.stopStateAnimates(), this.hasState() && this.normalAttrs ? (this.currentStates = [], this.
|
|
16380
|
-
graphic.applyStateAttrs(graphic.normalAttrs, this.currentStates, hasAnimation, !0), graphic.normalAttrs = null;
|
|
16381
|
-
}), this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, !0)) : this.currentStates = [], this.normalAttrs = null;
|
|
16377
|
+
this.stopStateAnimates(), this.hasState() && this.normalAttrs ? (this.currentStates = [], this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, !0)) : this.currentStates = [], this.normalAttrs = null;
|
|
16382
16378
|
}
|
|
16383
16379
|
clone() {
|
|
16384
16380
|
const glyph = new Glyph(Object.assign({}, this.attribute));
|
|
@@ -17747,9 +17743,10 @@ class Polygon extends Graphic {
|
|
|
17747
17743
|
return super.needUpdateTag(key, POLYGON_UPDATE_TAG_KEY);
|
|
17748
17744
|
}
|
|
17749
17745
|
toCustomPath() {
|
|
17750
|
-
|
|
17751
|
-
|
|
17752
|
-
|
|
17746
|
+
let path = super.toCustomPath();
|
|
17747
|
+
if (path) return path;
|
|
17748
|
+
const points = this.attribute.points;
|
|
17749
|
+
return path = new CustomPath2D(), points.forEach((point, index) => {
|
|
17753
17750
|
0 === index ? path.moveTo(point.x, point.y) : path.lineTo(point.x, point.y);
|
|
17754
17751
|
}), path.closePath(), path;
|
|
17755
17752
|
}
|
|
@@ -21014,6 +21011,7 @@ let DefaultDrawContribution = class {
|
|
|
21014
21011
|
drawContext.updateBounds ? this.useDirtyBounds = !0 : this.useDirtyBounds = !drawContext.stage.params.optimize.disableCheckGraphicWidthOutRange;
|
|
21015
21012
|
}
|
|
21016
21013
|
draw(renderService, drawContext) {
|
|
21014
|
+
var _a;
|
|
21017
21015
|
this.prepareForDraw(renderService, drawContext), drawContext.drawContribution = this, this.currentRenderMap = this.styleRenderMap.get(drawContext.renderStyle) || this.defaultRenderMap, this.currentRenderService = renderService;
|
|
21018
21016
|
const {
|
|
21019
21017
|
context: context,
|
|
@@ -21028,7 +21026,7 @@ let DefaultDrawContribution = class {
|
|
|
21028
21026
|
dirtyBounds.x1 = Math.floor(b.x1), dirtyBounds.y1 = Math.floor(b.y1), dirtyBounds.x2 = Math.ceil(b.x2), dirtyBounds.y2 = Math.ceil(b.y2);
|
|
21029
21027
|
}
|
|
21030
21028
|
const d = context.dpr % 1;
|
|
21031
|
-
(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) => {
|
|
21029
|
+
(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), (null === (_a = renderService.drawParams) || void 0 === _a ? void 0 : _a.stage) && renderService.drawParams.stage.hooks.afterClearScreen.call(renderService.drawParams), renderService.renderTreeRoots.sort((a, b) => {
|
|
21032
21030
|
var _a, _b;
|
|
21033
21031
|
return (null !== (_a = a.attribute.zIndex) && void 0 !== _a ? _a : DefaultAttribute.zIndex) - (null !== (_b = b.attribute.zIndex) && void 0 !== _b ? _b : DefaultAttribute.zIndex);
|
|
21034
21032
|
}).forEach(group => {
|
|
@@ -21164,7 +21162,7 @@ let DefaultDrawContribution = class {
|
|
|
21164
21162
|
return data || this.currentRenderMap.get(type) || this.defaultRenderMap.get(type);
|
|
21165
21163
|
}
|
|
21166
21164
|
clearScreen(renderService, context, drawContext) {
|
|
21167
|
-
var _a, _b;
|
|
21165
|
+
var _a, _b, _c;
|
|
21168
21166
|
const {
|
|
21169
21167
|
clear: clear,
|
|
21170
21168
|
viewBox: viewBox
|
|
@@ -21172,9 +21170,9 @@ let DefaultDrawContribution = class {
|
|
|
21172
21170
|
width = viewBox.width(),
|
|
21173
21171
|
height = viewBox.height();
|
|
21174
21172
|
if (clear) {
|
|
21175
|
-
context.clearRect(0, 0, width, height);
|
|
21176
|
-
const stage = null === (
|
|
21177
|
-
if (stage && (context.globalAlpha = null !== (
|
|
21173
|
+
context.clearRect(0, 0, width, height), (null === (_a = renderService.drawParams) || void 0 === _a ? void 0 : _a.stage) && renderService.drawParams.stage.hooks.afterClearRect.call(renderService.drawParams);
|
|
21174
|
+
const stage = null === (_b = renderService.drawParams) || void 0 === _b ? void 0 : _b.stage;
|
|
21175
|
+
if (stage && (context.globalAlpha = null !== (_c = stage.attribute.opacity) && void 0 !== _c ? _c : 1), stage && stage.backgroundImg && stage.resources) {
|
|
21178
21176
|
const res = stage.resources.get(clear);
|
|
21179
21177
|
res && "success" === res.state && res.data && context.drawImage(res.data, 0, 0, width, height);
|
|
21180
21178
|
} else context.fillStyle = createColor(context, clear, {
|
|
@@ -21702,13 +21700,19 @@ class Stage extends Group$1 {
|
|
|
21702
21700
|
} else this._skipRender = 1;
|
|
21703
21701
|
}, this.beforeRender = stage => {
|
|
21704
21702
|
this._beforeRender && this._beforeRender(stage);
|
|
21703
|
+
}, this.afterClearScreen = drawParams => {
|
|
21704
|
+
this._afterClearScreen && this._afterClearScreen(drawParams);
|
|
21705
|
+
}, this.afterClearRect = drawParams => {
|
|
21706
|
+
this._afterClearRect && this._afterClearRect(drawParams);
|
|
21705
21707
|
}, this.afterRender = stage => {
|
|
21706
21708
|
this.renderCount++, this._afterRender && this._afterRender(stage), this._afterNextRenderCbs && this._afterNextRenderCbs.forEach(cb => cb(stage)), this._afterNextRenderCbs = null, this.tickedBeforeRender = !1;
|
|
21707
21709
|
}, this.afterTickCb = () => {
|
|
21708
21710
|
this.tickedBeforeRender = !0, "rendering" !== this.state && this.renderNextFrame();
|
|
21709
21711
|
}, this.params = params, this.theme = new Theme(), this.hooks = {
|
|
21710
21712
|
beforeRender: new SyncHook(["stage"]),
|
|
21711
|
-
afterRender: new SyncHook(["stage"])
|
|
21713
|
+
afterRender: new SyncHook(["stage"]),
|
|
21714
|
+
afterClearScreen: new SyncHook(["stage"]),
|
|
21715
|
+
afterClearRect: new SyncHook(["stage"])
|
|
21712
21716
|
}, 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({
|
|
21713
21717
|
width: params.width,
|
|
21714
21718
|
height: params.height,
|
|
@@ -21720,7 +21724,7 @@ class Stage extends Group$1 {
|
|
|
21720
21724
|
canvas: params.canvas
|
|
21721
21725
|
}), 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, {
|
|
21722
21726
|
main: !0
|
|
21723
|
-
})), 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 = {
|
|
21727
|
+
})), 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.hooks.afterClearScreen.tap("constructor", this.afterClearScreen), this.hooks.afterClearRect.tap("constructor", this.afterClearRect), this._beforeRender = params.beforeRender, this._afterRender = params.afterRender, this._afterClearScreen = params.afterClearScreen, this._afterClearRect = params.afterClearRect, this.supportInteractiveLayer = !1 !== params.interactiveLayer, params.optimize || (params.optimize = {
|
|
21724
21728
|
tickRenderMode: "effect"
|
|
21725
21729
|
}), this.optmize(params.optimize), params.background && isString$1(this._background) && this._background.includes("/") && this.setAttributes({
|
|
21726
21730
|
background: this._background
|
|
@@ -22115,7 +22119,7 @@ class Stage extends Group$1 {
|
|
|
22115
22119
|
return this._cursor;
|
|
22116
22120
|
}
|
|
22117
22121
|
eventPointTransform(e) {
|
|
22118
|
-
const point = this.global.mapToCanvasPoint(e, this.window
|
|
22122
|
+
const point = this.global.mapToCanvasPoint(e, this.window);
|
|
22119
22123
|
return this.stage.window.pointTransform(point.x, point.y);
|
|
22120
22124
|
}
|
|
22121
22125
|
pauseTriggerEvent() {
|
|
@@ -31728,7 +31732,7 @@ class DefaultTimeline extends EventEmitter {
|
|
|
31728
31732
|
return this._animateCount;
|
|
31729
31733
|
}
|
|
31730
31734
|
constructor() {
|
|
31731
|
-
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;
|
|
31735
|
+
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._animationEndFlag = !0, this.id = Generator.GenAutoIncrementId(), this.paused = !1;
|
|
31732
31736
|
}
|
|
31733
31737
|
isRunning() {
|
|
31734
31738
|
return !this.paused && this._animateCount > 0;
|
|
@@ -31757,10 +31761,11 @@ class DefaultTimeline extends EventEmitter {
|
|
|
31757
31761
|
}
|
|
31758
31762
|
tick(delta) {
|
|
31759
31763
|
if (this.paused) return;
|
|
31764
|
+
this._animationEndFlag && (this._animationEndFlag = !1, this.emit("animationStart"));
|
|
31760
31765
|
const scaledDelta = delta * this._playSpeed;
|
|
31761
31766
|
this._currentTime += scaledDelta, this.forEachAccessAnimate((animate, i) => {
|
|
31762
31767
|
animate.status === AnimateStatus.END ? this.removeAnimate(animate, !0) : animate.status !== AnimateStatus.RUNNING && animate.status !== AnimateStatus.INITIAL || animate.advance(scaledDelta);
|
|
31763
|
-
}), 0 === this._animateCount && this.emit("animationEnd");
|
|
31768
|
+
}), 0 === this._animateCount && (this._animationEndFlag = !0, this.emit("animationEnd"));
|
|
31764
31769
|
}
|
|
31765
31770
|
clear() {
|
|
31766
31771
|
this.forEachAccessAnimate(animate => {
|
|
@@ -31824,7 +31829,9 @@ class Animate {
|
|
|
31824
31829
|
return this._timeline;
|
|
31825
31830
|
}
|
|
31826
31831
|
bind(target) {
|
|
31827
|
-
return this.target = target, this.target.
|
|
31832
|
+
return this.target = target, this.target.animates || (this.target.animates = new Map()), this.target.animates.set(this.id, this), this.onRemove(() => {
|
|
31833
|
+
this.stop(), this.target.animates.delete(this.id);
|
|
31834
|
+
}), this.target.onAnimateBind && !this.slience && this.target.onAnimateBind(this), this.target.animationAttribute || (this.target.animationAttribute = {}), this;
|
|
31828
31835
|
}
|
|
31829
31836
|
to(props, duration = 300, easing = "linear") {
|
|
31830
31837
|
const step = new Step(AnimateStepType.to, props, duration, easing);
|
|
@@ -32038,8 +32045,8 @@ class DefaultTicker extends EventEmitter {
|
|
|
32038
32045
|
}
|
|
32039
32046
|
init() {
|
|
32040
32047
|
this.interval = 16, this.status = STATUS$1.INITIAL, application.global.hooks.onSetEnv.tap("graph-ticker", () => {
|
|
32041
|
-
this.initHandler();
|
|
32042
|
-
}), application.global.env && this.initHandler();
|
|
32048
|
+
this.initHandler(!1);
|
|
32049
|
+
}), application.global.env && this.initHandler(!1);
|
|
32043
32050
|
}
|
|
32044
32051
|
addTimeline(timeline) {
|
|
32045
32052
|
this.timelines.push(timeline);
|
|
@@ -32050,10 +32057,11 @@ class DefaultTicker extends EventEmitter {
|
|
|
32050
32057
|
getTimelines() {
|
|
32051
32058
|
return this.timelines;
|
|
32052
32059
|
}
|
|
32053
|
-
initHandler() {
|
|
32054
|
-
this.setupTickHandler();
|
|
32060
|
+
initHandler(force = !1) {
|
|
32061
|
+
this.setupTickHandler(force);
|
|
32055
32062
|
}
|
|
32056
|
-
setupTickHandler() {
|
|
32063
|
+
setupTickHandler(force = !1) {
|
|
32064
|
+
if (!force && this.tickerHandler) return !0;
|
|
32057
32065
|
const handler = new RAFTickHandler();
|
|
32058
32066
|
return this.tickerHandler && this.tickerHandler.release(), this.tickerHandler = handler, !0;
|
|
32059
32067
|
}
|
|
@@ -32104,7 +32112,7 @@ class DefaultTicker extends EventEmitter {
|
|
|
32104
32112
|
return this.status = STATUS$1.RUNNING, this.tickerHandler.tick(0, this.handleTick), !0;
|
|
32105
32113
|
}
|
|
32106
32114
|
stop() {
|
|
32107
|
-
this.status = STATUS$1.INITIAL, this.setupTickHandler(), this.lastFrameTime = -1;
|
|
32115
|
+
this.status = STATUS$1.INITIAL, this.setupTickHandler(!0), this.lastFrameTime = -1;
|
|
32108
32116
|
}
|
|
32109
32117
|
trySyncTickStatus() {
|
|
32110
32118
|
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();
|
|
@@ -32114,7 +32122,8 @@ class DefaultTicker extends EventEmitter {
|
|
|
32114
32122
|
this.stop(), this.timelines = [], null === (_a = this.tickerHandler) || void 0 === _a || _a.release(), this.tickerHandler = null, this.lastFrameTime = -1;
|
|
32115
32123
|
}
|
|
32116
32124
|
checkSkip(delta) {
|
|
32117
|
-
|
|
32125
|
+
var _a, _b, _c;
|
|
32126
|
+
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;
|
|
32118
32127
|
return delta < this.interval + 2 * (Math.random() - .5) * this._jitter;
|
|
32119
32128
|
}
|
|
32120
32129
|
}
|
|
@@ -32412,10 +32421,11 @@ class AnimateExecutor {
|
|
|
32412
32421
|
_handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic) {
|
|
32413
32422
|
var _a, _b, _c, _d;
|
|
32414
32423
|
if (custom && customType) {
|
|
32415
|
-
const customParams =
|
|
32424
|
+
const customParams = Object.assign({
|
|
32416
32425
|
width: graphic.stage.width,
|
|
32417
|
-
height: graphic.stage.height
|
|
32418
|
-
|
|
32426
|
+
height: graphic.stage.height,
|
|
32427
|
+
group: this._target.parent
|
|
32428
|
+
}, this.resolveValue(customParameters, graphic)),
|
|
32419
32429
|
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;
|
|
32420
32430
|
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);
|
|
32421
32431
|
} else "to" === type ? animate.to(props, duration, easing) : "from" === type && animate.from(props, duration, easing);
|
|
@@ -32633,6 +32643,14 @@ class AnimationStateManager {
|
|
|
32633
32643
|
state.executor.stop();
|
|
32634
32644
|
}), this.stateList = null;
|
|
32635
32645
|
}
|
|
32646
|
+
reApplyState(state) {
|
|
32647
|
+
var _a;
|
|
32648
|
+
const stateInfo = null === (_a = this.stateList) || void 0 === _a ? void 0 : _a.find(stateInfo => stateInfo.state === state);
|
|
32649
|
+
if (stateInfo) {
|
|
32650
|
+
const stateList = this.stateList.slice();
|
|
32651
|
+
stateInfo.executor.stop(), this.stateList = stateList, stateInfo.executor.execute(stateInfo.animationConfig);
|
|
32652
|
+
}
|
|
32653
|
+
}
|
|
32636
32654
|
}
|
|
32637
32655
|
|
|
32638
32656
|
class GraphicStateExtension {
|
|
@@ -32663,11 +32681,20 @@ class GraphicStateExtension {
|
|
|
32663
32681
|
applyUnhighlightState(animationConfig, callback) {
|
|
32664
32682
|
return this._getAnimationStateManager(this).applyUnhighlightState(animationConfig, callback), this;
|
|
32665
32683
|
}
|
|
32666
|
-
stopAnimationState(state, type) {
|
|
32667
|
-
return this._getAnimationStateManager(this).stopState(state, type), this
|
|
32684
|
+
stopAnimationState(state, type, deep = !1) {
|
|
32685
|
+
return this._getAnimationStateManager(this).stopState(state, type), deep && this.isContainer && this.forEachChildren(child => {
|
|
32686
|
+
child.stopAnimationState(state, type, deep);
|
|
32687
|
+
}), this;
|
|
32668
32688
|
}
|
|
32669
32689
|
clearAnimationStates() {
|
|
32670
|
-
|
|
32690
|
+
const stateManager = this._animationStateManager;
|
|
32691
|
+
return stateManager && stateManager.clearState(), this;
|
|
32692
|
+
}
|
|
32693
|
+
reApplyAnimationState(state, deep = !1) {
|
|
32694
|
+
const stateManager = this._animationStateManager;
|
|
32695
|
+
return stateManager && stateManager.reApplyState(state), deep && this.isContainer && this.forEachChildren(child => {
|
|
32696
|
+
child.reApplyAnimationState(state, deep);
|
|
32697
|
+
}), this;
|
|
32671
32698
|
}
|
|
32672
32699
|
static extend(graphic) {
|
|
32673
32700
|
return new GraphicStateExtension()._getAnimationStateManager(graphic), graphic;
|
|
@@ -32680,7 +32707,6 @@ class AnimateExtension {
|
|
|
32680
32707
|
}
|
|
32681
32708
|
animate(params) {
|
|
32682
32709
|
var _a, _b, _c;
|
|
32683
|
-
this.animates || (this.animates = new Map());
|
|
32684
32710
|
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);
|
|
32685
32711
|
if (animate.bind(this), params) {
|
|
32686
32712
|
const {
|
|
@@ -32690,9 +32716,7 @@ class AnimateExtension {
|
|
|
32690
32716
|
} = params;
|
|
32691
32717
|
null != onStart && animate.onStart(onStart), null != onEnd && animate.onEnd(onEnd), null != onRemove && animate.onRemove(onRemove);
|
|
32692
32718
|
}
|
|
32693
|
-
return this.
|
|
32694
|
-
animate.stop(), this.animates.delete(animate.id);
|
|
32695
|
-
}), null === (_c = this.stage) || void 0 === _c || _c.ticker.start(), animate;
|
|
32719
|
+
return null === (_c = this.stage) || void 0 === _c || _c.ticker.start(), animate;
|
|
32696
32720
|
}
|
|
32697
32721
|
createTimeline() {
|
|
32698
32722
|
return new DefaultTimeline();
|
|
@@ -32723,6 +32747,21 @@ class AnimateExtension {
|
|
|
32723
32747
|
getGraphicAttribute(key, prev = !1) {
|
|
32724
32748
|
return !prev && this.finalAttribute ? this.finalAttribute[key] : this.attribute[key];
|
|
32725
32749
|
}
|
|
32750
|
+
pauseAnimation(deep = !1) {
|
|
32751
|
+
this.animates && this.animates.forEach(animate => animate.pause()), deep && this.isContainer && this.forEachChildren(child => {
|
|
32752
|
+
child.pauseAnimation(deep);
|
|
32753
|
+
});
|
|
32754
|
+
}
|
|
32755
|
+
resumeAnimation(deep = !1) {
|
|
32756
|
+
this.animates && this.animates.forEach(animate => animate.resume()), deep && this.isContainer && this.forEachChildren(child => {
|
|
32757
|
+
child.resumeAnimation(deep);
|
|
32758
|
+
});
|
|
32759
|
+
}
|
|
32760
|
+
stopAnimation(deep = !1) {
|
|
32761
|
+
this.animates && this.animates.forEach(animate => animate.stop()), deep && this.isContainer && this.forEachChildren(child => {
|
|
32762
|
+
child.stopAnimation(deep);
|
|
32763
|
+
});
|
|
32764
|
+
}
|
|
32726
32765
|
}
|
|
32727
32766
|
|
|
32728
32767
|
function registerAnimate$1() {
|
|
@@ -32731,7 +32770,7 @@ function registerAnimate$1() {
|
|
|
32731
32770
|
|
|
32732
32771
|
class ACustomAnimate extends Step {
|
|
32733
32772
|
constructor(customFrom, customTo, duration, easing, params) {
|
|
32734
|
-
super("customAnimate", customTo, duration, easing), this.type = "customAnimate", this.customFrom = customFrom, this.params = params;
|
|
32773
|
+
super("customAnimate", customTo, duration, easing), this.type = "customAnimate", this.customFrom = customFrom, this.params = params, this.from = customFrom, this.to = customTo;
|
|
32735
32774
|
}
|
|
32736
32775
|
update(end, ratio, out) {
|
|
32737
32776
|
if (this.onStart(), !this.props || !this.propKeys) return;
|
|
@@ -33651,7 +33690,7 @@ class GrowAngleBase extends ACustomAnimate {
|
|
|
33651
33690
|
}
|
|
33652
33691
|
class GrowAngleIn extends GrowAngleBase {
|
|
33653
33692
|
onBind() {
|
|
33654
|
-
var _a, _b;
|
|
33693
|
+
var _a, _b, _c;
|
|
33655
33694
|
super.onBind();
|
|
33656
33695
|
const {
|
|
33657
33696
|
from: from,
|
|
@@ -33660,7 +33699,7 @@ class GrowAngleIn extends GrowAngleBase {
|
|
|
33660
33699
|
fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
|
|
33661
33700
|
this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to;
|
|
33662
33701
|
const finalAttribute = this.target.getFinalAttribute();
|
|
33663
|
-
finalAttribute && this.target.setAttributes(finalAttribute), this.target.setAttributes(fromAttrs), this.determineUpdateFunction();
|
|
33702
|
+
finalAttribute && this.target.setAttributes(finalAttribute), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && this.target.setAttributes(fromAttrs), this.determineUpdateFunction();
|
|
33664
33703
|
}
|
|
33665
33704
|
}
|
|
33666
33705
|
class GrowAngleOut extends GrowAngleBase {
|
|
@@ -33803,7 +33842,7 @@ class GrowCenterIn extends ACustomAnimate {
|
|
|
33803
33842
|
super(from, to, duration, easing, params);
|
|
33804
33843
|
}
|
|
33805
33844
|
onBind() {
|
|
33806
|
-
var _a, _b;
|
|
33845
|
+
var _a, _b, _c;
|
|
33807
33846
|
super.onBind();
|
|
33808
33847
|
const {
|
|
33809
33848
|
from: from,
|
|
@@ -33812,7 +33851,7 @@ class GrowCenterIn extends ACustomAnimate {
|
|
|
33812
33851
|
fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
|
|
33813
33852
|
this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to;
|
|
33814
33853
|
const finalAttribute = this.target.getFinalAttribute();
|
|
33815
|
-
finalAttribute && this.target.setAttributes(finalAttribute), this.target.setAttributes(fromAttrs);
|
|
33854
|
+
finalAttribute && this.target.setAttributes(finalAttribute), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && this.target.setAttributes(fromAttrs);
|
|
33816
33855
|
}
|
|
33817
33856
|
onEnd(cb) {
|
|
33818
33857
|
super.onEnd(cb);
|
|
@@ -33910,7 +33949,7 @@ class GrowHeightIn extends ACustomAnimate {
|
|
|
33910
33949
|
super(from, to, duration, easing, params);
|
|
33911
33950
|
}
|
|
33912
33951
|
onBind() {
|
|
33913
|
-
var _a, _b;
|
|
33952
|
+
var _a, _b, _c;
|
|
33914
33953
|
super.onBind();
|
|
33915
33954
|
const {
|
|
33916
33955
|
from: from,
|
|
@@ -33919,7 +33958,7 @@ class GrowHeightIn extends ACustomAnimate {
|
|
|
33919
33958
|
fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
|
|
33920
33959
|
this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to;
|
|
33921
33960
|
const finalAttribute = this.target.getFinalAttribute();
|
|
33922
|
-
finalAttribute && this.target.setAttributes(finalAttribute), this.target.setAttributes(fromAttrs);
|
|
33961
|
+
finalAttribute && this.target.setAttributes(finalAttribute), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && this.target.setAttributes(fromAttrs);
|
|
33923
33962
|
}
|
|
33924
33963
|
onEnd(cb) {
|
|
33925
33964
|
super.onEnd(cb);
|
|
@@ -34268,7 +34307,7 @@ class GrowPointsBase extends ACustomAnimate {
|
|
|
34268
34307
|
}
|
|
34269
34308
|
class GrowRadiusIn extends GrowPointsBase {
|
|
34270
34309
|
onBind() {
|
|
34271
|
-
var _a, _b;
|
|
34310
|
+
var _a, _b, _c;
|
|
34272
34311
|
super.onBind();
|
|
34273
34312
|
const {
|
|
34274
34313
|
from: from,
|
|
@@ -34277,7 +34316,7 @@ class GrowRadiusIn extends GrowPointsBase {
|
|
|
34277
34316
|
fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
|
|
34278
34317
|
this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to;
|
|
34279
34318
|
const finalAttribute = this.target.getFinalAttribute();
|
|
34280
|
-
finalAttribute && this.target.setAttributes(finalAttribute), this.target.setAttributes(fromAttrs);
|
|
34319
|
+
finalAttribute && this.target.setAttributes(finalAttribute), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && this.target.setAttributes(fromAttrs);
|
|
34281
34320
|
}
|
|
34282
34321
|
}
|
|
34283
34322
|
class GrowRadiusOut extends GrowPointsBase {
|
|
@@ -34392,7 +34431,7 @@ class GrowWidthIn extends ACustomAnimate {
|
|
|
34392
34431
|
super(from, to, duration, easing, params);
|
|
34393
34432
|
}
|
|
34394
34433
|
onBind() {
|
|
34395
|
-
var _a, _b;
|
|
34434
|
+
var _a, _b, _c;
|
|
34396
34435
|
super.onBind();
|
|
34397
34436
|
const {
|
|
34398
34437
|
from: from,
|
|
@@ -34401,7 +34440,7 @@ class GrowWidthIn extends ACustomAnimate {
|
|
|
34401
34440
|
fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
|
|
34402
34441
|
this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to;
|
|
34403
34442
|
const finalAttribute = this.target.getFinalAttribute();
|
|
34404
|
-
finalAttribute && this.target.setAttributes(finalAttribute), this.target.setAttributes(fromAttrs);
|
|
34443
|
+
finalAttribute && this.target.setAttributes(finalAttribute), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && this.target.setAttributes(fromAttrs);
|
|
34405
34444
|
}
|
|
34406
34445
|
onEnd(cb) {
|
|
34407
34446
|
super.onEnd(cb);
|
|
@@ -35770,16 +35809,15 @@ const moveIn = (graphic, options, animationParameters) => {
|
|
|
35770
35809
|
changedY = 0;
|
|
35771
35810
|
"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;
|
|
35772
35811
|
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,
|
|
35773
|
-
|
|
35774
|
-
|
|
35775
|
-
|
|
35776
|
-
|
|
35777
|
-
finalAttrsY = excludeChannels.includes("y") ? graphic.attribute.y : finalAttrs.y;
|
|
35812
|
+
finalAttrsX = graphic.getGraphicAttribute("x"),
|
|
35813
|
+
finalAttrsY = graphic.getGraphicAttribute("y"),
|
|
35814
|
+
fromX = excludeChannels.includes("x") ? finalAttrsX : point && isValidNumber$1(point.x) ? point.x : changedX,
|
|
35815
|
+
fromY = excludeChannels.includes("y") ? finalAttrsY : point && isValidNumber$1(point.y) ? point.y : changedY;
|
|
35778
35816
|
switch (direction) {
|
|
35779
35817
|
case "x":
|
|
35780
35818
|
return {
|
|
35781
35819
|
from: {
|
|
35782
|
-
x: fromX
|
|
35820
|
+
x: excludeChannels.includes("x") ? finalAttrsX : fromX
|
|
35783
35821
|
},
|
|
35784
35822
|
to: {
|
|
35785
35823
|
x: finalAttrsX
|
|
@@ -35808,25 +35846,26 @@ const moveIn = (graphic, options, animationParameters) => {
|
|
|
35808
35846
|
}
|
|
35809
35847
|
};
|
|
35810
35848
|
const moveOut = (graphic, options, animationParameters) => {
|
|
35811
|
-
var _a, _b, _c, _d
|
|
35849
|
+
var _a, _b, _c, _d;
|
|
35812
35850
|
const {
|
|
35813
35851
|
offset = 0,
|
|
35814
35852
|
orient: orient,
|
|
35815
35853
|
direction: direction,
|
|
35816
35854
|
point: pointOpt
|
|
35817
35855
|
} = null != options ? options : {},
|
|
35818
|
-
|
|
35819
|
-
|
|
35856
|
+
groupBounds = animationParameters.group ? animationParameters.group.AABBBounds : null,
|
|
35857
|
+
groupWidth = null !== (_a = groupBounds.width()) && void 0 !== _a ? _a : animationParameters.width,
|
|
35858
|
+
groupHeight = null !== (_b = groupBounds.height()) && void 0 !== _b ? _b : animationParameters.height,
|
|
35820
35859
|
changedX = ("negative" === orient ? groupWidth : 0) + offset,
|
|
35821
35860
|
changedY = ("negative" === orient ? groupHeight : 0) + offset,
|
|
35822
|
-
point = isFunction$1(pointOpt) ? pointOpt.call(null, null === (
|
|
35861
|
+
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,
|
|
35823
35862
|
fromX = point && isValidNumber$1(point.x) ? point.x : changedX,
|
|
35824
35863
|
fromY = point && isValidNumber$1(point.y) ? point.y : changedY;
|
|
35825
35864
|
switch (direction) {
|
|
35826
35865
|
case "x":
|
|
35827
35866
|
return {
|
|
35828
35867
|
from: {
|
|
35829
|
-
x: graphic.
|
|
35868
|
+
x: graphic.getGraphicAttribute("x")
|
|
35830
35869
|
},
|
|
35831
35870
|
to: {
|
|
35832
35871
|
x: fromX
|
|
@@ -35835,7 +35874,7 @@ const moveOut = (graphic, options, animationParameters) => {
|
|
|
35835
35874
|
case "y":
|
|
35836
35875
|
return {
|
|
35837
35876
|
from: {
|
|
35838
|
-
y: graphic.
|
|
35877
|
+
y: graphic.getGraphicAttribute("y")
|
|
35839
35878
|
},
|
|
35840
35879
|
to: {
|
|
35841
35880
|
y: fromY
|
|
@@ -35844,8 +35883,8 @@ const moveOut = (graphic, options, animationParameters) => {
|
|
|
35844
35883
|
default:
|
|
35845
35884
|
return {
|
|
35846
35885
|
from: {
|
|
35847
|
-
x: graphic.
|
|
35848
|
-
y: graphic.
|
|
35886
|
+
x: graphic.getGraphicAttribute("x"),
|
|
35887
|
+
y: graphic.getGraphicAttribute("y")
|
|
35849
35888
|
},
|
|
35850
35889
|
to: {
|
|
35851
35890
|
x: fromX,
|
|
@@ -35992,6 +36031,9 @@ class FromTo extends ACustomAnimate {
|
|
|
35992
36031
|
this.from[key] = null !== (_a = this.from[key]) && void 0 !== _a ? _a : startProps[key];
|
|
35993
36032
|
}), this.target.setAttributes(this.from);
|
|
35994
36033
|
}
|
|
36034
|
+
deleteSelfAttr(key) {
|
|
36035
|
+
super.deleteSelfAttr(key), delete this.from[key];
|
|
36036
|
+
}
|
|
35995
36037
|
update(end, ratio, out) {
|
|
35996
36038
|
if (this.onStart(), !this.props || !this.propKeys) return;
|
|
35997
36039
|
const easedRatio = this.easing(ratio);
|
|
@@ -36060,9 +36102,8 @@ class StreamLight extends ACustomAnimate {
|
|
|
36060
36102
|
w = Math.min(Math.min(currentX + maxLength, maxLength), streamLength - currentX),
|
|
36061
36103
|
width = w + x > parentWidth ? Math.max(parentWidth - x, 0) : w;
|
|
36062
36104
|
this.rect.setAttributes({
|
|
36063
|
-
x: x,
|
|
36064
|
-
width: width
|
|
36065
|
-
dx: Math.min(parentAttr.x1 - parentAttr.x, 0)
|
|
36105
|
+
x: x + Math.min(parentAttr.x1 - parentAttr.x, 0),
|
|
36106
|
+
width: width
|
|
36066
36107
|
}, !1, {
|
|
36067
36108
|
type: AttributeUpdateType.ANIMATE_PLAY,
|
|
36068
36109
|
animationState: {
|
|
@@ -36079,9 +36120,8 @@ class StreamLight extends ACustomAnimate {
|
|
|
36079
36120
|
const h = Math.min(parentHeight - currentY, maxLength);
|
|
36080
36121
|
let height;
|
|
36081
36122
|
y <= 0 ? (height = Math.max(y + h, 0), y = 0) : height = h, this.rect.setAttributes({
|
|
36082
|
-
y: y,
|
|
36083
|
-
height: height
|
|
36084
|
-
dy: Math.min(parentAttr.y1 - parentAttr.y, 0)
|
|
36123
|
+
y: y + Math.min(parentAttr.y1 - parentAttr.y, 0),
|
|
36124
|
+
height: height
|
|
36085
36125
|
}, !1, {
|
|
36086
36126
|
type: AttributeUpdateType.ANIMATE_PLAY,
|
|
36087
36127
|
animationState: {
|
|
@@ -37298,7 +37338,9 @@ class BandScale extends OrdinalScale {
|
|
|
37298
37338
|
space = bandSpace(n, this._paddingInner, this._paddingOuter);
|
|
37299
37339
|
return this._step = (stop - start) / Math.max(1, space || 1), this._round && (this._step = Math.floor(this._step)), start += (stop - start - this._step * (n - this._paddingInner)) * this._align, this.isBandwidthFixed() || (this._bandwidth = this._step * (1 - this._paddingInner)), this._round && (start = Math.round(start), this.isBandwidthFixed() || (this._bandwidth = Math.round(this._bandwidth))), this._bandRangeState = {
|
|
37300
37340
|
reverse: reverse,
|
|
37301
|
-
start: reverse ? start + this._step * (n - 1) : start,
|
|
37341
|
+
start: reverse ? clamp$1(start + this._step * (n - 1), wholeRange[1], wholeRange[0]) : clamp$1(start, wholeRange[0], wholeRange[1]),
|
|
37342
|
+
min: reverse ? wholeRange[1] : wholeRange[0],
|
|
37343
|
+
max: stop,
|
|
37302
37344
|
count: n
|
|
37303
37345
|
}, this.generateFishEyeTransform(), this;
|
|
37304
37346
|
}
|
|
@@ -37315,10 +37357,12 @@ class BandScale extends OrdinalScale {
|
|
|
37315
37357
|
const {
|
|
37316
37358
|
count: count,
|
|
37317
37359
|
start: start,
|
|
37318
|
-
reverse: reverse
|
|
37360
|
+
reverse: reverse,
|
|
37361
|
+
min: min,
|
|
37362
|
+
max: max
|
|
37319
37363
|
} = this._bandRangeState,
|
|
37320
37364
|
output = start + (reverse ? -1 : 1) * ((i - 1) % count) * this._step;
|
|
37321
|
-
return this._fishEyeTransform ? this._fishEyeTransform(output) : output;
|
|
37365
|
+
return clamp$1(this._fishEyeTransform ? this._fishEyeTransform(output) : output, min, max);
|
|
37322
37366
|
}
|
|
37323
37367
|
_calculateWholeRange(range, changeProperty) {
|
|
37324
37368
|
if (this._wholeRange) return this._wholeRange;
|
|
@@ -38773,7 +38817,8 @@ class LabelUpdate extends AComponentAnimate {
|
|
|
38773
38817
|
prevText: prevText,
|
|
38774
38818
|
curText: curText,
|
|
38775
38819
|
prevLabelLine: prevLabelLine,
|
|
38776
|
-
curLabelLine: curLabelLine
|
|
38820
|
+
curLabelLine: curLabelLine,
|
|
38821
|
+
increaseEffect = !0
|
|
38777
38822
|
} = this.params,
|
|
38778
38823
|
diff = {};
|
|
38779
38824
|
for (const key in curText.attribute) prevText.attribute[key] !== curText.attribute[key] && (diff[key] = curText.attribute[key]);
|
|
@@ -38783,7 +38828,7 @@ class LabelUpdate extends AComponentAnimate {
|
|
|
38783
38828
|
to: rest,
|
|
38784
38829
|
duration: duration,
|
|
38785
38830
|
easing: easing
|
|
38786
|
-
}), animator.animate(prevText, {
|
|
38831
|
+
}), !1 !== increaseEffect && animator.animate(prevText, {
|
|
38787
38832
|
type: "increaseCount",
|
|
38788
38833
|
to: {
|
|
38789
38834
|
text: curText.attribute.text
|
|
@@ -39477,16 +39522,15 @@ class LabelBase extends AnimateComponent {
|
|
|
39477
39522
|
} = currentLabel;
|
|
39478
39523
|
prevText.applyAnimationState(["update"], [{
|
|
39479
39524
|
name: "update",
|
|
39480
|
-
animation:
|
|
39481
|
-
type: "labelUpdate"
|
|
39482
|
-
|
|
39483
|
-
customParameters: {
|
|
39525
|
+
animation: {
|
|
39526
|
+
type: "labelUpdate",
|
|
39527
|
+
customParameters: Object.assign(Object.assign({}, this._animationConfig.update), {
|
|
39484
39528
|
prevText: prevText,
|
|
39485
39529
|
curText: curText,
|
|
39486
39530
|
prevLabelLine: prevLabelLine,
|
|
39487
39531
|
curLabelLine: curLabelLine
|
|
39488
|
-
}
|
|
39489
|
-
}
|
|
39532
|
+
})
|
|
39533
|
+
}
|
|
39490
39534
|
}]);
|
|
39491
39535
|
}
|
|
39492
39536
|
_syncStateWithRelatedGraphic(relatedGraphic) {
|
|
@@ -47245,6 +47289,22 @@ function field$1(f) {
|
|
|
47245
47289
|
return value;
|
|
47246
47290
|
};
|
|
47247
47291
|
}
|
|
47292
|
+
function removeUndefined(obj, deep = false) {
|
|
47293
|
+
if (obj === null || typeof obj !== 'object') {
|
|
47294
|
+
return obj;
|
|
47295
|
+
}
|
|
47296
|
+
for (const key in obj) {
|
|
47297
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
47298
|
+
if (obj[key] === undefined) {
|
|
47299
|
+
delete obj[key];
|
|
47300
|
+
continue;
|
|
47301
|
+
}
|
|
47302
|
+
if (deep) {
|
|
47303
|
+
removeUndefined(obj[key], deep);
|
|
47304
|
+
}
|
|
47305
|
+
}
|
|
47306
|
+
}
|
|
47307
|
+
}
|
|
47248
47308
|
|
|
47249
47309
|
var SeriesTypeForThemeEnum;
|
|
47250
47310
|
(function (SeriesTypeForThemeEnum) {
|
|
@@ -47285,7 +47345,6 @@ var SeriesTypeEnum;
|
|
|
47285
47345
|
SeriesTypeEnum["dot"] = "dot";
|
|
47286
47346
|
SeriesTypeEnum["geo"] = "geo";
|
|
47287
47347
|
SeriesTypeEnum["link"] = "link";
|
|
47288
|
-
SeriesTypeEnum["curveLink"] = "curveLink";
|
|
47289
47348
|
SeriesTypeEnum["map"] = "map";
|
|
47290
47349
|
SeriesTypeEnum["pie"] = "pie";
|
|
47291
47350
|
SeriesTypeEnum["radar"] = "radar";
|
|
@@ -47340,8 +47399,6 @@ var SeriesMarkNameEnum;
|
|
|
47340
47399
|
SeriesMarkNameEnum["cell"] = "cell";
|
|
47341
47400
|
SeriesMarkNameEnum["cellBackground"] = "cellBackground";
|
|
47342
47401
|
SeriesMarkNameEnum["link"] = "link";
|
|
47343
|
-
SeriesMarkNameEnum["curveLink"] = "curveLink";
|
|
47344
|
-
SeriesMarkNameEnum["imageLabel"] = "imageLabel";
|
|
47345
47402
|
SeriesMarkNameEnum["arrow"] = "arrow";
|
|
47346
47403
|
SeriesMarkNameEnum["pie"] = "pie";
|
|
47347
47404
|
SeriesMarkNameEnum["labelLine"] = "labelLine";
|
|
@@ -49107,6 +49164,16 @@ const findMarkGraphic = (rootGroup, target) => {
|
|
|
49107
49164
|
}
|
|
49108
49165
|
return null;
|
|
49109
49166
|
};
|
|
49167
|
+
const getDiffAttributesOfGraphic = (g, newAttrs) => {
|
|
49168
|
+
const prevAttrs = g.getAttributes(true);
|
|
49169
|
+
const diffAttrs = {};
|
|
49170
|
+
Object.keys(newAttrs).forEach(key => {
|
|
49171
|
+
if (prevAttrs[key] !== newAttrs[key]) {
|
|
49172
|
+
diffAttrs[key] = newAttrs[key];
|
|
49173
|
+
}
|
|
49174
|
+
});
|
|
49175
|
+
return diffAttrs;
|
|
49176
|
+
};
|
|
49110
49177
|
|
|
49111
49178
|
let Event$1 = class Event {
|
|
49112
49179
|
getComposedEventMap() {
|
|
@@ -50008,6 +50075,28 @@ const runEncoder = (styles, datum, attrs = {}) => {
|
|
|
50008
50075
|
return attrs;
|
|
50009
50076
|
};
|
|
50010
50077
|
|
|
50078
|
+
function toRenderMode(mode) {
|
|
50079
|
+
switch (mode) {
|
|
50080
|
+
case RenderModeEnum['desktop-browser']:
|
|
50081
|
+
case RenderModeEnum['mobile-browser']:
|
|
50082
|
+
return 'browser';
|
|
50083
|
+
case RenderModeEnum.node:
|
|
50084
|
+
case RenderModeEnum.worker:
|
|
50085
|
+
return 'node';
|
|
50086
|
+
case RenderModeEnum.miniApp:
|
|
50087
|
+
case RenderModeEnum['desktop-miniApp']:
|
|
50088
|
+
return 'feishu';
|
|
50089
|
+
case RenderModeEnum.lynx:
|
|
50090
|
+
return 'lynx';
|
|
50091
|
+
case RenderModeEnum.wx:
|
|
50092
|
+
return 'wx';
|
|
50093
|
+
case RenderModeEnum.tt:
|
|
50094
|
+
return 'tt';
|
|
50095
|
+
case RenderModeEnum.harmony:
|
|
50096
|
+
return 'harmony';
|
|
50097
|
+
}
|
|
50098
|
+
return 'browser';
|
|
50099
|
+
}
|
|
50011
50100
|
function traverseGroupMark(group, apply, filter, leafFirst, stop) {
|
|
50012
50101
|
const traverse = (mark) => {
|
|
50013
50102
|
if (!leafFirst) {
|
|
@@ -50181,6 +50270,9 @@ class Compiler {
|
|
|
50181
50270
|
this._container = container;
|
|
50182
50271
|
this._option = option;
|
|
50183
50272
|
}
|
|
50273
|
+
getChart() {
|
|
50274
|
+
return this._compileChart;
|
|
50275
|
+
}
|
|
50184
50276
|
getCanvas() {
|
|
50185
50277
|
var _a;
|
|
50186
50278
|
return (_a = this._stage) === null || _a === void 0 ? void 0 : _a.window.getNativeHandler().nativeCanvas;
|
|
@@ -50189,7 +50281,7 @@ class Compiler {
|
|
|
50189
50281
|
return this._stage;
|
|
50190
50282
|
}
|
|
50191
50283
|
initView() {
|
|
50192
|
-
var _a, _b, _c;
|
|
50284
|
+
var _a, _b, _c, _d;
|
|
50193
50285
|
if (this._released) {
|
|
50194
50286
|
return;
|
|
50195
50287
|
}
|
|
@@ -50197,34 +50289,17 @@ class Compiler {
|
|
|
50197
50289
|
if (this._stage) {
|
|
50198
50290
|
return;
|
|
50199
50291
|
}
|
|
50200
|
-
const { autoRefreshDpr, dpr, mode, gestureConfig, interactive, clickInterval, autoPreventDefault, background } = this._option;
|
|
50292
|
+
const { autoRefreshDpr, dpr, mode, modeParams, gestureConfig, interactive, clickInterval, autoPreventDefault, background } = this._option;
|
|
50293
|
+
vglobal.setEnv(toRenderMode(mode), modeParams !== null && modeParams !== void 0 ? modeParams : {});
|
|
50201
50294
|
this._stage =
|
|
50202
|
-
(_a = this._option.stage) !== null && _a !== void 0 ? _a : new Stage({
|
|
50203
|
-
|
|
50204
|
-
|
|
50205
|
-
|
|
50206
|
-
|
|
50207
|
-
canvas: (_c = this._container.canvas) !== null && _c !== void 0 ? _c : null,
|
|
50208
|
-
dpr,
|
|
50209
|
-
viewBox: this._option.viewBox,
|
|
50210
|
-
canvasControled: this._option.canvasControled,
|
|
50211
|
-
beforeRender: this._option.beforeRender,
|
|
50212
|
-
afterRender: this._option.afterRender,
|
|
50213
|
-
disableDirtyBounds: true,
|
|
50214
|
-
autoRender: true,
|
|
50215
|
-
ticker: this._option.ticker,
|
|
50216
|
-
pluginList: this._option.pluginList,
|
|
50217
|
-
enableHtmlAttribute: this._option.enableHtmlAttribute,
|
|
50218
|
-
optimize: this._option.optimize,
|
|
50219
|
-
supportsTouchEvents: this._option.supportsTouchEvents,
|
|
50220
|
-
supportsPointerEvents: this._option.supportsPointerEvents,
|
|
50221
|
-
event: {
|
|
50295
|
+
(_a = this._option.stage) !== null && _a !== void 0 ? _a : new Stage(Object.assign({ background, width: this._width, height: this._height, container: (_b = this._container.dom) !== null && _b !== void 0 ? _b : null, canvas: (_c = this._container.canvas) !== null && _c !== void 0 ? _c : null, dpr, viewBox: this._option.viewBox, canvasControled: this._option.canvasControled, beforeRender: (stage) => {
|
|
50296
|
+
var _a, _b, _c;
|
|
50297
|
+
(_a = this._compileChart) === null || _a === void 0 ? void 0 : _a.onBeforeRender();
|
|
50298
|
+
(_c = (_b = this._option).beforeRender) === null || _c === void 0 ? void 0 : _c.call(_b, stage);
|
|
50299
|
+
}, afterRender: this._option.afterRender, disableDirtyBounds: true, autoRender: true, ticker: this._option.ticker, pluginList: this._option.pluginList, enableHtmlAttribute: this._option.enableHtmlAttribute, optimize: this._option.optimize, supportsTouchEvents: this._option.supportsTouchEvents, supportsPointerEvents: this._option.supportsPointerEvents, event: {
|
|
50222
50300
|
clickInterval: clickInterval,
|
|
50223
50301
|
autoPreventDefault: autoPreventDefault
|
|
50224
|
-
},
|
|
50225
|
-
ReactDOM: this._option.ReactDOM,
|
|
50226
|
-
autoRefresh: isValid$1(autoRefreshDpr) ? autoRefreshDpr : !isValid$1(dpr)
|
|
50227
|
-
});
|
|
50302
|
+
}, ReactDOM: this._option.ReactDOM, autoRefresh: isValid$1(autoRefreshDpr) ? autoRefreshDpr : !isValid$1(dpr) }, ((_d = this._option.renderHooks) !== null && _d !== void 0 ? _d : {})));
|
|
50228
50303
|
this._stage.enableIncrementalAutoRender();
|
|
50229
50304
|
this._stage.setTheme({
|
|
50230
50305
|
symbol: {
|
|
@@ -51055,6 +51130,8 @@ class BaseModel extends CompilableBase {
|
|
|
51055
51130
|
}
|
|
51056
51131
|
onEvaluateEnd(ctx) {
|
|
51057
51132
|
}
|
|
51133
|
+
onBeforeRender() {
|
|
51134
|
+
}
|
|
51058
51135
|
onDataUpdate() {
|
|
51059
51136
|
}
|
|
51060
51137
|
beforeRelease() {
|
|
@@ -51182,6 +51259,12 @@ class BaseModel extends CompilableBase {
|
|
|
51182
51259
|
}
|
|
51183
51260
|
return index;
|
|
51184
51261
|
}
|
|
51262
|
+
updateAnimateStateCallback(callback) {
|
|
51263
|
+
this._aniamtionStateCallback = callback;
|
|
51264
|
+
}
|
|
51265
|
+
getAnimationStateCallback() {
|
|
51266
|
+
return this._aniamtionStateCallback;
|
|
51267
|
+
}
|
|
51185
51268
|
}
|
|
51186
51269
|
|
|
51187
51270
|
class LayoutItem {
|
|
@@ -53205,26 +53288,39 @@ class BaseMark extends GrammarItem {
|
|
|
53205
53288
|
}
|
|
53206
53289
|
setAnimationConfig(config) {
|
|
53207
53290
|
const defaultPrams = this.type === 'group' ? { selfOnly: true } : {};
|
|
53291
|
+
const formatAnimationCfg = (cfg) => {
|
|
53292
|
+
var _a;
|
|
53293
|
+
const options = (_a = cfg.options) !== null && _a !== void 0 ? _a : {};
|
|
53294
|
+
return Object.assign(Object.assign(Object.assign({}, defaultPrams), cfg), { options: (datum, graphic, customParams) => {
|
|
53295
|
+
var _a, _b;
|
|
53296
|
+
const _options = typeof options === 'function' ? options(datum, graphic, customParams) : options;
|
|
53297
|
+
if (graphic && graphic.context && graphic.context.compiler && isValid$1(graphic.context.modelId)) {
|
|
53298
|
+
const model = (_a = graphic.context.compiler.getChart()) === null || _a === void 0 ? void 0 : _a.getModelById(graphic.context.modelId);
|
|
53299
|
+
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) });
|
|
53300
|
+
}
|
|
53301
|
+
return Object.assign({}, _options);
|
|
53302
|
+
} });
|
|
53303
|
+
};
|
|
53208
53304
|
const animationConfig = {};
|
|
53209
53305
|
Object.keys(config).forEach(key => {
|
|
53210
53306
|
const value = config[key];
|
|
53211
53307
|
if (isArray$1(value)) {
|
|
53212
|
-
animationConfig[key] = value.map(
|
|
53213
|
-
var _a;
|
|
53214
|
-
const options = (_a = item.options) !== null && _a !== void 0 ? _a : {};
|
|
53215
|
-
return Object.assign(Object.assign(Object.assign({}, defaultPrams), item), { options: (...args) => {
|
|
53216
|
-
var _a, _b;
|
|
53217
|
-
const _options = typeof options === 'function' ? options(...args) : options;
|
|
53218
|
-
return Object.assign(Object.assign({}, _options), { layoutRect: (_b = (_a = this.model).getLayoutRect) === null || _b === void 0 ? void 0 : _b.call(_a) });
|
|
53219
|
-
} });
|
|
53220
|
-
});
|
|
53308
|
+
animationConfig[key] = value.map(formatAnimationCfg);
|
|
53221
53309
|
}
|
|
53222
|
-
else {
|
|
53223
|
-
animationConfig[key] =
|
|
53310
|
+
else if (isValid$1(value)) {
|
|
53311
|
+
animationConfig[key] = formatAnimationCfg(value);
|
|
53224
53312
|
}
|
|
53225
53313
|
});
|
|
53226
53314
|
this._animationConfig = animationConfig;
|
|
53227
53315
|
}
|
|
53316
|
+
disableAnimationByState(state) {
|
|
53317
|
+
const states = array(state);
|
|
53318
|
+
this._disabledAnimationStates = [...new Set([...this._disabledAnimationStates, ...states])];
|
|
53319
|
+
}
|
|
53320
|
+
enableAnimationByState(state) {
|
|
53321
|
+
const states = array(state);
|
|
53322
|
+
this._disabledAnimationStates = this._disabledAnimationStates.filter(s => !states.includes(s));
|
|
53323
|
+
}
|
|
53228
53324
|
setSkipBeforeLayouted(skip) {
|
|
53229
53325
|
this._skipBeforeLayouted = skip;
|
|
53230
53326
|
}
|
|
@@ -53359,6 +53455,7 @@ class BaseMark extends GrammarItem {
|
|
|
53359
53455
|
this._visible = true;
|
|
53360
53456
|
this.stateStyle = {};
|
|
53361
53457
|
this._unCompileChannel = {};
|
|
53458
|
+
this._disabledAnimationStates = [];
|
|
53362
53459
|
this._skipBeforeLayouted = false;
|
|
53363
53460
|
this._extensionChannel = {};
|
|
53364
53461
|
this._computeExChannel = {};
|
|
@@ -53776,6 +53873,7 @@ class BaseMark extends GrammarItem {
|
|
|
53776
53873
|
}
|
|
53777
53874
|
_getCommonContext() {
|
|
53778
53875
|
return {
|
|
53876
|
+
compiler: this.getCompiler(),
|
|
53779
53877
|
markType: this.type,
|
|
53780
53878
|
markId: this.id,
|
|
53781
53879
|
modelId: this.model.id,
|
|
@@ -53849,17 +53947,19 @@ class BaseMark extends GrammarItem {
|
|
|
53849
53947
|
this._dataByGroup = groupData(data, this._groupKeyGetter);
|
|
53850
53948
|
}
|
|
53851
53949
|
createAnimationStateList(type, animationConfig) {
|
|
53950
|
+
var _a;
|
|
53852
53951
|
let config = animationConfig[type];
|
|
53853
53952
|
if (config && Array.isArray(config)) {
|
|
53854
53953
|
config = config.length === 1 ? config[0] : config;
|
|
53855
53954
|
}
|
|
53856
53955
|
if (Array.isArray(config)) {
|
|
53857
|
-
|
|
53956
|
+
return config.map((item, index) => {
|
|
53858
53957
|
var _a;
|
|
53859
53958
|
return (Object.assign(Object.assign({}, item), { priority: (_a = item.priority) !== null && _a !== void 0 ? _a : Infinity }));
|
|
53860
53959
|
});
|
|
53861
53960
|
}
|
|
53862
|
-
return config
|
|
53961
|
+
return config
|
|
53962
|
+
? Object.assign(Object.assign({}, config), { priority: type === 'normal' ? (_a = config.priority) !== null && _a !== void 0 ? _a : Infinity : config.priority }) : config;
|
|
53863
53963
|
}
|
|
53864
53964
|
tryRunMorphing(graphics) {
|
|
53865
53965
|
if (this._lastMark) {
|
|
@@ -53943,13 +54043,34 @@ class BaseMark extends GrammarItem {
|
|
|
53943
54043
|
this._product.applyAnimationState(['normal'], [normalConfig]);
|
|
53944
54044
|
}
|
|
53945
54045
|
}
|
|
54046
|
+
_setAnimationState(g) {
|
|
54047
|
+
var _a, _b, _c;
|
|
54048
|
+
const callback = (this.type === "component"
|
|
54049
|
+
? this.model.getAnimationStateCallback()
|
|
54050
|
+
: (_c = (_b = (_a = this.model).getRegion) === null || _b === void 0 ? void 0 : _b.call(_a)) === null || _c === void 0 ? void 0 : _c.getAnimationStateCallback()) ||
|
|
54051
|
+
((g) => {
|
|
54052
|
+
var _a;
|
|
54053
|
+
const diffState = (_a = g.context) === null || _a === void 0 ? void 0 : _a.diffState;
|
|
54054
|
+
return diffState === AnimationStateEnum.exit
|
|
54055
|
+
? AnimationStateEnum.exit
|
|
54056
|
+
: diffState === AnimationStateEnum.update
|
|
54057
|
+
? AnimationStateEnum.update
|
|
54058
|
+
: AnimationStateEnum.appear;
|
|
54059
|
+
});
|
|
54060
|
+
const customizedState = callback(g);
|
|
54061
|
+
g.context.animationState = customizedState !== null && customizedState !== void 0 ? customizedState : g.context.diffState;
|
|
54062
|
+
if (g.context.animationState === DiffState.exit) {
|
|
54063
|
+
g.context.reusing = true;
|
|
54064
|
+
g.animates && g.animates.forEach((a) => a.stop());
|
|
54065
|
+
}
|
|
54066
|
+
}
|
|
53946
54067
|
_runJoin(data) {
|
|
53947
54068
|
const newGroupedData = this._getDataByKey(data);
|
|
53948
54069
|
const prevGroupedData = this._prevDataByKey;
|
|
53949
|
-
const
|
|
54070
|
+
const allGraphics = [];
|
|
53950
54071
|
const enterGraphics = new Set(this._graphics.filter(g => g.context.diffState === DiffState.enter));
|
|
53951
54072
|
const callback = (key, newData, prevData) => {
|
|
53952
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j
|
|
54073
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
53953
54074
|
let g;
|
|
53954
54075
|
let diffState;
|
|
53955
54076
|
if (isNil$1(newData)) {
|
|
@@ -53967,23 +54088,20 @@ class BaseMark extends GrammarItem {
|
|
|
53967
54088
|
}
|
|
53968
54089
|
diffState = DiffState.enter;
|
|
53969
54090
|
g.isExiting = false;
|
|
53970
|
-
if (((_a = g.context) === null || _a === void 0 ? void 0 : _a.diffState) === DiffState.exit) {
|
|
53971
|
-
g.context.reusing = true;
|
|
53972
|
-
g.animates && g.animates.forEach((a) => a.stop());
|
|
53973
|
-
}
|
|
53974
54091
|
this._graphicMap.set(key, g);
|
|
53975
|
-
|
|
54092
|
+
allGraphics.push(g);
|
|
53976
54093
|
}
|
|
53977
54094
|
else {
|
|
53978
54095
|
g = this._graphicMap.get(key);
|
|
53979
54096
|
if (g) {
|
|
53980
54097
|
diffState = DiffState.update;
|
|
53981
|
-
|
|
54098
|
+
allGraphics.push(g);
|
|
53982
54099
|
}
|
|
53983
54100
|
}
|
|
53984
54101
|
if (g) {
|
|
53985
|
-
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 });
|
|
53986
54102
|
enterGraphics.delete(g);
|
|
54103
|
+
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 });
|
|
54104
|
+
this._setAnimationState(g);
|
|
53987
54105
|
}
|
|
53988
54106
|
return g;
|
|
53989
54107
|
};
|
|
@@ -54021,13 +54139,13 @@ class BaseMark extends GrammarItem {
|
|
|
54021
54139
|
}
|
|
54022
54140
|
g.release();
|
|
54023
54141
|
});
|
|
54024
|
-
const graphicCount =
|
|
54025
|
-
|
|
54142
|
+
const graphicCount = allGraphics.length;
|
|
54143
|
+
allGraphics.forEach((g, index) => {
|
|
54026
54144
|
g.context.graphicCount = graphicCount;
|
|
54027
54145
|
g.context.graphicIndex = index;
|
|
54028
54146
|
});
|
|
54029
54147
|
this._dataByKey = newGroupedData;
|
|
54030
|
-
this._graphics =
|
|
54148
|
+
this._graphics = allGraphics;
|
|
54031
54149
|
this.needClear = true;
|
|
54032
54150
|
}
|
|
54033
54151
|
_runEncoderOfGraphic(styles, g, attrs = {}) {
|
|
@@ -54110,13 +54228,7 @@ class BaseMark extends GrammarItem {
|
|
|
54110
54228
|
}
|
|
54111
54229
|
}
|
|
54112
54230
|
else {
|
|
54113
|
-
const
|
|
54114
|
-
const diffAttrs = {};
|
|
54115
|
-
Object.keys(finalAttrs).forEach(key => {
|
|
54116
|
-
if (prevAttrs[key] !== finalAttrs[key]) {
|
|
54117
|
-
diffAttrs[key] = finalAttrs[key];
|
|
54118
|
-
}
|
|
54119
|
-
});
|
|
54231
|
+
const diffAttrs = getDiffAttributesOfGraphic(g, finalAttrs);
|
|
54120
54232
|
g.context.diffAttrs = diffAttrs;
|
|
54121
54233
|
if (g.context.reusing) {
|
|
54122
54234
|
g.context.lastAttrs = g.attribute;
|
|
@@ -54285,24 +54397,25 @@ class BaseMark extends GrammarItem {
|
|
|
54285
54397
|
}
|
|
54286
54398
|
};
|
|
54287
54399
|
this._graphicMap.forEach((g, key) => {
|
|
54288
|
-
if (g.context.diffState
|
|
54289
|
-
|
|
54290
|
-
|
|
54291
|
-
|
|
54292
|
-
|
|
54293
|
-
|
|
54294
|
-
|
|
54295
|
-
|
|
54296
|
-
}
|
|
54297
|
-
|
|
54298
|
-
|
|
54299
|
-
|
|
54300
|
-
|
|
54301
|
-
|
|
54302
|
-
else {
|
|
54303
|
-
doRemove(g, key);
|
|
54400
|
+
if (g.context.diffState !== DiffState.exit || g.isExiting) {
|
|
54401
|
+
return;
|
|
54402
|
+
}
|
|
54403
|
+
if (g.context.animationState === DiffState.exit && this.hasAnimationByState('exit')) {
|
|
54404
|
+
g.isExiting = true;
|
|
54405
|
+
const animationConfig = this.getAnimationConfig();
|
|
54406
|
+
if (animationConfig.exit && animationConfig.exit.length) {
|
|
54407
|
+
const exitConfigList = animationConfig.exit.map((item, index) => ({
|
|
54408
|
+
name: `exit_${index}`,
|
|
54409
|
+
animation: Object.assign(Object.assign({}, item), { customParameters: g.context })
|
|
54410
|
+
}));
|
|
54411
|
+
g.applyAnimationState(['exit'], [exitConfigList.length === 1 ? exitConfigList[0] : exitConfigList], () => {
|
|
54412
|
+
doRemove(g, key);
|
|
54413
|
+
});
|
|
54304
54414
|
}
|
|
54305
54415
|
}
|
|
54416
|
+
else {
|
|
54417
|
+
doRemove(g, key);
|
|
54418
|
+
}
|
|
54306
54419
|
});
|
|
54307
54420
|
}
|
|
54308
54421
|
isProgressive() {
|
|
@@ -54447,15 +54560,11 @@ class BaseMark extends GrammarItem {
|
|
|
54447
54560
|
this._runProgressiveStep();
|
|
54448
54561
|
}
|
|
54449
54562
|
}
|
|
54450
|
-
updateAnimationState(callback) {
|
|
54451
|
-
if (this._graphics && this._graphics.length) {
|
|
54452
|
-
this._graphics.forEach(g => {
|
|
54453
|
-
g.context.animationState = callback(g);
|
|
54454
|
-
});
|
|
54455
|
-
}
|
|
54456
|
-
}
|
|
54457
54563
|
hasAnimationByState(state) {
|
|
54458
|
-
if (!state ||
|
|
54564
|
+
if (!state ||
|
|
54565
|
+
!this._animationConfig ||
|
|
54566
|
+
!this._animationConfig[state] ||
|
|
54567
|
+
this._disabledAnimationStates.includes(state)) {
|
|
54459
54568
|
return false;
|
|
54460
54569
|
}
|
|
54461
54570
|
const stateAnimationConfig = this._animationConfig[state];
|
|
@@ -54472,11 +54581,36 @@ class BaseMark extends GrammarItem {
|
|
|
54472
54581
|
}
|
|
54473
54582
|
}
|
|
54474
54583
|
|
|
54584
|
+
var MarkTypeEnum;
|
|
54585
|
+
(function (MarkTypeEnum) {
|
|
54586
|
+
MarkTypeEnum["group"] = "group";
|
|
54587
|
+
MarkTypeEnum["symbol"] = "symbol";
|
|
54588
|
+
MarkTypeEnum["rule"] = "rule";
|
|
54589
|
+
MarkTypeEnum["line"] = "line";
|
|
54590
|
+
MarkTypeEnum["text"] = "text";
|
|
54591
|
+
MarkTypeEnum["rect"] = "rect";
|
|
54592
|
+
MarkTypeEnum["image"] = "image";
|
|
54593
|
+
MarkTypeEnum["path"] = "path";
|
|
54594
|
+
MarkTypeEnum["area"] = "area";
|
|
54595
|
+
MarkTypeEnum["arc"] = "arc";
|
|
54596
|
+
MarkTypeEnum["polygon"] = "polygon";
|
|
54597
|
+
MarkTypeEnum["boxPlot"] = "boxPlot";
|
|
54598
|
+
MarkTypeEnum["linkPath"] = "linkPath";
|
|
54599
|
+
MarkTypeEnum["cell"] = "cell";
|
|
54600
|
+
MarkTypeEnum["ripple"] = "ripple";
|
|
54601
|
+
MarkTypeEnum["liquid"] = "liquid";
|
|
54602
|
+
MarkTypeEnum["component"] = "component";
|
|
54603
|
+
MarkTypeEnum["dataLabel"] = "dataLabel";
|
|
54604
|
+
MarkTypeEnum["label"] = "label";
|
|
54605
|
+
MarkTypeEnum["pictogram"] = "pictogram";
|
|
54606
|
+
})(MarkTypeEnum || (MarkTypeEnum = {}));
|
|
54607
|
+
|
|
54475
54608
|
class GroupMark extends BaseMark {
|
|
54476
54609
|
constructor() {
|
|
54477
54610
|
super(...arguments);
|
|
54478
54611
|
this.type = GroupMark.type;
|
|
54479
54612
|
this._marks = [];
|
|
54613
|
+
this._diffState = DiffState.enter;
|
|
54480
54614
|
}
|
|
54481
54615
|
getMarks() {
|
|
54482
54616
|
return this._marks;
|
|
@@ -54539,10 +54673,28 @@ class GroupMark extends BaseMark {
|
|
|
54539
54673
|
return;
|
|
54540
54674
|
}
|
|
54541
54675
|
const style = (_a = this._simpleStyle) !== null && _a !== void 0 ? _a : this.getAttributesOfState({});
|
|
54542
|
-
this._product.context = Object.assign(Object.assign({}, this._product.context), this._getCommonContext());
|
|
54543
|
-
this.
|
|
54676
|
+
this._product.context = Object.assign(Object.assign(Object.assign({}, this._product.context), this._getCommonContext()), { diffState: this._diffState });
|
|
54677
|
+
this._setAnimationState(this._product);
|
|
54678
|
+
const newAttrs = this._getAttrsFromConfig(style);
|
|
54679
|
+
if (this._product.context.diffState === DiffState.update) {
|
|
54680
|
+
const hasAnimation = this.hasAnimation();
|
|
54681
|
+
const diffAttrs = getDiffAttributesOfGraphic(this._product, newAttrs);
|
|
54682
|
+
this._product.context.diffAttrs = diffAttrs;
|
|
54683
|
+
if (!this.hasAnimationByState(this._product.context.animationState)) {
|
|
54684
|
+
hasAnimation ? this._product.setAttributesAndPreventAnimate(diffAttrs) : this._product.setAttributes(diffAttrs);
|
|
54685
|
+
}
|
|
54686
|
+
if (hasAnimation) {
|
|
54687
|
+
this._product.setFinalAttributes(newAttrs);
|
|
54688
|
+
}
|
|
54689
|
+
}
|
|
54690
|
+
else {
|
|
54691
|
+
this._product.setAttributes(newAttrs);
|
|
54692
|
+
}
|
|
54544
54693
|
this.needClear = true;
|
|
54545
54694
|
}
|
|
54695
|
+
clearExitGraphics() {
|
|
54696
|
+
this._diffState = DiffState.update;
|
|
54697
|
+
}
|
|
54546
54698
|
render() {
|
|
54547
54699
|
if (this._isCommited) {
|
|
54548
54700
|
log(`render mark: ${this.getProductId()}, type is ${this.type}`);
|
|
@@ -54553,16 +54705,6 @@ class GroupMark extends BaseMark {
|
|
|
54553
54705
|
mark.render();
|
|
54554
54706
|
});
|
|
54555
54707
|
}
|
|
54556
|
-
updateAnimationState(callback) {
|
|
54557
|
-
this.getGraphics().forEach(g => {
|
|
54558
|
-
if (g) {
|
|
54559
|
-
g.context = Object.assign(Object.assign({}, g.context), { animationState: callback(g) });
|
|
54560
|
-
}
|
|
54561
|
-
});
|
|
54562
|
-
this.getMarks().forEach(mark => {
|
|
54563
|
-
mark.updateAnimationState(callback);
|
|
54564
|
-
});
|
|
54565
|
-
}
|
|
54566
54708
|
release() {
|
|
54567
54709
|
super.release();
|
|
54568
54710
|
this.removeProduct();
|
|
@@ -55460,7 +55602,6 @@ class VChart {
|
|
|
55460
55602
|
if (!this._beforeRender(option)) {
|
|
55461
55603
|
return self;
|
|
55462
55604
|
}
|
|
55463
|
-
this._updateAnimateState(true);
|
|
55464
55605
|
(_a = this._compiler) === null || _a === void 0 ? void 0 : _a.render(option.morphConfig);
|
|
55465
55606
|
this._updateAnimateState(false);
|
|
55466
55607
|
this._afterRender();
|
|
@@ -55532,7 +55673,8 @@ class VChart {
|
|
|
55532
55673
|
this._cachedProcessedTheme[cacheKey] = theme;
|
|
55533
55674
|
return theme;
|
|
55534
55675
|
};
|
|
55535
|
-
|
|
55676
|
+
removeUndefined(options);
|
|
55677
|
+
this._option = Object.assign(Object.assign({}, this._option), options);
|
|
55536
55678
|
if (options === null || options === void 0 ? void 0 : options.optimize) {
|
|
55537
55679
|
this._option.optimize = Object.assign(Object.assign({}, this._option.optimize), options.optimize);
|
|
55538
55680
|
}
|
|
@@ -55757,7 +55899,7 @@ class VChart {
|
|
|
55757
55899
|
return this._beforeRender(option);
|
|
55758
55900
|
}
|
|
55759
55901
|
_reCompile(updateResult, morphConfig) {
|
|
55760
|
-
var _a, _b, _c, _d, _e;
|
|
55902
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
55761
55903
|
if (updateResult.reMake) {
|
|
55762
55904
|
this._releaseData();
|
|
55763
55905
|
this._initDataSet();
|
|
@@ -55777,20 +55919,16 @@ class VChart {
|
|
|
55777
55919
|
if (updateResult.reMake) {
|
|
55778
55920
|
(_c = this._compiler) === null || _c === void 0 ? void 0 : _c.releaseGrammar();
|
|
55779
55921
|
this._userEvents.forEach(e => { var _a; return (_a = this._event) === null || _a === void 0 ? void 0 : _a.on(e.eType, e.query, e.handler); });
|
|
55780
|
-
if (updateResult.reSize) {
|
|
55781
|
-
this._doResize();
|
|
55782
|
-
}
|
|
55783
55922
|
}
|
|
55784
|
-
else {
|
|
55785
|
-
|
|
55786
|
-
|
|
55787
|
-
|
|
55788
|
-
|
|
55789
|
-
|
|
55790
|
-
|
|
55791
|
-
|
|
55792
|
-
|
|
55793
|
-
}
|
|
55923
|
+
else if (updateResult.reCompile) {
|
|
55924
|
+
(_d = this._compiler) === null || _d === void 0 ? void 0 : _d.clear({ chart: this._chart, vChart: this });
|
|
55925
|
+
(_e = this._compiler) === null || _e === void 0 ? void 0 : _e.compile({ chart: this._chart, vChart: this });
|
|
55926
|
+
}
|
|
55927
|
+
if (updateResult.reSize) {
|
|
55928
|
+
const { width, height } = this.getCurrentSize();
|
|
55929
|
+
this._currentSize = { width, height };
|
|
55930
|
+
(_f = this._chart) === null || _f === void 0 ? void 0 : _f.onResize(width, height, false);
|
|
55931
|
+
(_g = this._compiler) === null || _g === void 0 ? void 0 : _g.resize(width, height, false);
|
|
55794
55932
|
}
|
|
55795
55933
|
}
|
|
55796
55934
|
_beforeRender(option = {}) {
|
|
@@ -55849,17 +55987,21 @@ class VChart {
|
|
|
55849
55987
|
});
|
|
55850
55988
|
}
|
|
55851
55989
|
_updateAnimateState(initial) {
|
|
55852
|
-
|
|
55990
|
+
var _a, _b;
|
|
55991
|
+
if (this.isAnimationEnable()) {
|
|
55853
55992
|
const updateGraphicAnimationState = (graphic) => {
|
|
55854
55993
|
var _a;
|
|
55855
55994
|
const diffState = (_a = graphic.context) === null || _a === void 0 ? void 0 : _a.diffState;
|
|
55856
55995
|
if (initial) {
|
|
55857
|
-
return diffState === 'exit' ?
|
|
55996
|
+
return diffState === 'exit' ? AnimationStateEnum.none : AnimationStateEnum.appear;
|
|
55858
55997
|
}
|
|
55859
55998
|
return diffState;
|
|
55860
55999
|
};
|
|
55861
|
-
this.
|
|
55862
|
-
|
|
56000
|
+
(_a = this._chart) === null || _a === void 0 ? void 0 : _a.getAllRegions().forEach(region => {
|
|
56001
|
+
region.updateAnimateStateCallback(updateGraphicAnimationState);
|
|
56002
|
+
});
|
|
56003
|
+
(_b = this._chart) === null || _b === void 0 ? void 0 : _b.getAllComponents().forEach(component => {
|
|
56004
|
+
component.updateAnimateStateCallback(updateGraphicAnimationState);
|
|
55863
56005
|
});
|
|
55864
56006
|
}
|
|
55865
56007
|
}
|
|
@@ -55943,11 +56085,11 @@ class VChart {
|
|
|
55943
56085
|
}
|
|
55944
56086
|
if (this._chart) {
|
|
55945
56087
|
this._chart.updateData(id, data, true, parserOptions);
|
|
55946
|
-
this._compiler.render();
|
|
55947
56088
|
if (userUpdateOptions === null || userUpdateOptions === void 0 ? void 0 : userUpdateOptions.reAnimate) {
|
|
55948
56089
|
this.stopAnimation();
|
|
55949
56090
|
this._updateAnimateState(true);
|
|
55950
56091
|
}
|
|
56092
|
+
this._compiler.render();
|
|
55951
56093
|
return this;
|
|
55952
56094
|
}
|
|
55953
56095
|
this._spec.data = array(this._spec.data);
|
|
@@ -55958,11 +56100,11 @@ class VChart {
|
|
|
55958
56100
|
if (this._chart) {
|
|
55959
56101
|
this._chart.updateFullData(data);
|
|
55960
56102
|
if (reRender) {
|
|
55961
|
-
this._compiler.render();
|
|
55962
56103
|
if (userUpdateOptions === null || userUpdateOptions === void 0 ? void 0 : userUpdateOptions.reAnimate) {
|
|
55963
56104
|
this.stopAnimation();
|
|
55964
56105
|
this._updateAnimateState(true);
|
|
55965
56106
|
}
|
|
56107
|
+
this._compiler.render();
|
|
55966
56108
|
}
|
|
55967
56109
|
return this;
|
|
55968
56110
|
}
|
|
@@ -56482,10 +56624,20 @@ class VChart {
|
|
|
56482
56624
|
return (_a = this._chart) === null || _a === void 0 ? void 0 : _a.setDimensionIndex(value, opt);
|
|
56483
56625
|
}
|
|
56484
56626
|
stopAnimation() {
|
|
56627
|
+
var _a;
|
|
56628
|
+
(_a = this.getStage()) === null || _a === void 0 ? void 0 : _a.stopAnimation(true);
|
|
56629
|
+
}
|
|
56630
|
+
reRunNormalAnimation() {
|
|
56631
|
+
var _a;
|
|
56632
|
+
(_a = this.getStage()) === null || _a === void 0 ? void 0 : _a.reApplyAnimationState('normal', true);
|
|
56485
56633
|
}
|
|
56486
56634
|
pauseAnimation() {
|
|
56635
|
+
var _a;
|
|
56636
|
+
(_a = this.getStage()) === null || _a === void 0 ? void 0 : _a.pauseAnimation(true);
|
|
56487
56637
|
}
|
|
56488
56638
|
resumeAnimation() {
|
|
56639
|
+
var _a;
|
|
56640
|
+
(_a = this.getStage()) === null || _a === void 0 ? void 0 : _a.resumeAnimation(true);
|
|
56489
56641
|
}
|
|
56490
56642
|
convertDatumToPosition(datum, dataLinkInfo = {}, isRelativeToCanvas = false, checkInViewData) {
|
|
56491
56643
|
var _a;
|
|
@@ -56632,6 +56784,12 @@ class VChart {
|
|
|
56632
56784
|
_getMode() {
|
|
56633
56785
|
return this._option.mode || RenderModeEnum['desktop-browser'];
|
|
56634
56786
|
}
|
|
56787
|
+
isAnimationEnable() {
|
|
56788
|
+
if ('animation' in this._option) {
|
|
56789
|
+
return !!this._option.animation;
|
|
56790
|
+
}
|
|
56791
|
+
return this._spec.animation !== false;
|
|
56792
|
+
}
|
|
56635
56793
|
_getChartOption(type) {
|
|
56636
56794
|
return {
|
|
56637
56795
|
type,
|
|
@@ -56645,7 +56803,6 @@ class VChart {
|
|
|
56645
56803
|
modeParams: this._option.modeParams,
|
|
56646
56804
|
getCompiler: () => this._compiler,
|
|
56647
56805
|
viewBox: this._viewBox,
|
|
56648
|
-
animation: this._option.animation,
|
|
56649
56806
|
getTheme: this.getTheme,
|
|
56650
56807
|
getSpecInfo: () => { var _a; return (_a = this._specInfo) !== null && _a !== void 0 ? _a : {}; },
|
|
56651
56808
|
layout: this._option.layout,
|
|
@@ -56769,7 +56926,7 @@ const lookup = (data, opt) => {
|
|
|
56769
56926
|
});
|
|
56770
56927
|
};
|
|
56771
56928
|
|
|
56772
|
-
const version = "2.0.3-alpha.
|
|
56929
|
+
const version = "2.0.3-alpha.1";
|
|
56773
56930
|
|
|
56774
56931
|
const addVChartProperty = (data, op) => {
|
|
56775
56932
|
const context = op.beforeCall();
|
|
@@ -57533,7 +57690,7 @@ function isAnimationEnabledForSeries(series) {
|
|
|
57533
57690
|
if (seriesSpec.animation === false) {
|
|
57534
57691
|
return false;
|
|
57535
57692
|
}
|
|
57536
|
-
if (((_b = (_a = series.
|
|
57693
|
+
if (((_b = (_a = series.getOption()) === null || _a === void 0 ? void 0 : _a.globalInstance) === null || _b === void 0 ? void 0 : _b.isAnimationEnable()) === false) {
|
|
57537
57694
|
return false;
|
|
57538
57695
|
}
|
|
57539
57696
|
let animationThreshold = (_c = seriesSpec.animationThreshold) !== null && _c !== void 0 ? _c : Number.MAX_SAFE_INTEGER;
|
|
@@ -57617,7 +57774,7 @@ class BaseSeriesSpecTransformer extends BaseModelSpecTransformer {
|
|
|
57617
57774
|
if (labelSpec && labelSpec.visible) {
|
|
57618
57775
|
const { animation = true, animationUpdate: labelAnimationUpdate = true, animationEnter: labelAnimationEnter = true, animationExit: labelAnimationExit = true } = labelSpec;
|
|
57619
57776
|
const { animationUpdate = true, animationEnter = true, animationExit = true } = spec;
|
|
57620
|
-
const animationEnabled = (_c = (_b = (_a = this._option) === null || _a === void 0 ? void 0 : _a.
|
|
57777
|
+
const animationEnabled = (_c = (_b = (_a = this._option.globalInstance) === null || _a === void 0 ? void 0 : _a.isAnimationEnable()) !== null && _b !== void 0 ? _b : spec.animation) !== null && _c !== void 0 ? _c : labelSpec.animation;
|
|
57621
57778
|
const labelAnimationEnabled = !!animationEnabled && !!hasAnimation;
|
|
57622
57779
|
this.addLabelSpec(isFunction$1(markName) ? markName(labelSpec) : markName, Object.assign(Object.assign({}, labelSpec), { animation: labelAnimationEnabled ? animation : false, animationUpdate: labelAnimationEnabled && animationUpdate && labelAnimationUpdate ? animationUpdate : false, animationEnter: labelAnimationEnabled && animationEnter && labelAnimationEnter ? animationEnter : false, animationExit: labelAnimationEnabled && animationEnter && labelAnimationExit ? animationExit : false, getStyleHandler: (series) => { var _a; return (_a = series[styleHandlerName]) === null || _a === void 0 ? void 0 : _a.bind(series); } }), head);
|
|
57623
57780
|
}
|
|
@@ -58582,14 +58739,11 @@ class BaseSeries extends BaseModel {
|
|
|
58582
58739
|
}
|
|
58583
58740
|
if (isNil$1(dataView)) {
|
|
58584
58741
|
m.setData(this._data);
|
|
58585
|
-
m.setSkipBeforeLayouted(true);
|
|
58586
58742
|
}
|
|
58587
58743
|
else if (dataView !== false) {
|
|
58588
58744
|
m.setDataView(dataView);
|
|
58589
58745
|
}
|
|
58590
|
-
|
|
58591
|
-
m.setSkipBeforeLayouted(skipBeforeLayouted);
|
|
58592
|
-
}
|
|
58746
|
+
m.setSkipBeforeLayouted(skipBeforeLayouted !== false);
|
|
58593
58747
|
if (!isNil$1(groupKey)) {
|
|
58594
58748
|
m.setGroupKey(groupKey);
|
|
58595
58749
|
}
|
|
@@ -59814,30 +59968,6 @@ class LineLikeSeriesMixin {
|
|
|
59814
59968
|
|
|
59815
59969
|
const lineSeriesMark = Object.assign(Object.assign({}, baseSeriesMark), lineLikeSeriesMark);
|
|
59816
59970
|
|
|
59817
|
-
var MarkTypeEnum;
|
|
59818
|
-
(function (MarkTypeEnum) {
|
|
59819
|
-
MarkTypeEnum["group"] = "group";
|
|
59820
|
-
MarkTypeEnum["symbol"] = "symbol";
|
|
59821
|
-
MarkTypeEnum["rule"] = "rule";
|
|
59822
|
-
MarkTypeEnum["line"] = "line";
|
|
59823
|
-
MarkTypeEnum["text"] = "text";
|
|
59824
|
-
MarkTypeEnum["rect"] = "rect";
|
|
59825
|
-
MarkTypeEnum["image"] = "image";
|
|
59826
|
-
MarkTypeEnum["path"] = "path";
|
|
59827
|
-
MarkTypeEnum["area"] = "area";
|
|
59828
|
-
MarkTypeEnum["arc"] = "arc";
|
|
59829
|
-
MarkTypeEnum["polygon"] = "polygon";
|
|
59830
|
-
MarkTypeEnum["boxPlot"] = "boxPlot";
|
|
59831
|
-
MarkTypeEnum["linkPath"] = "linkPath";
|
|
59832
|
-
MarkTypeEnum["cell"] = "cell";
|
|
59833
|
-
MarkTypeEnum["ripple"] = "ripple";
|
|
59834
|
-
MarkTypeEnum["liquid"] = "liquid";
|
|
59835
|
-
MarkTypeEnum["component"] = "component";
|
|
59836
|
-
MarkTypeEnum["dataLabel"] = "dataLabel";
|
|
59837
|
-
MarkTypeEnum["label"] = "label";
|
|
59838
|
-
MarkTypeEnum["pictogram"] = "pictogram";
|
|
59839
|
-
})(MarkTypeEnum || (MarkTypeEnum = {}));
|
|
59840
|
-
|
|
59841
59971
|
const isStopsEqual = (prev, next) => {
|
|
59842
59972
|
var _a, _b;
|
|
59843
59973
|
if (prev === next) {
|
|
@@ -61092,7 +61222,7 @@ class AxisComponent extends BaseComponent {
|
|
|
61092
61222
|
return [(_a = this._axisMark) === null || _a === void 0 ? void 0 : _a.getProduct(), (_b = this._gridMark) === null || _b === void 0 ? void 0 : _b.getProduct()].filter(isValid$1);
|
|
61093
61223
|
}
|
|
61094
61224
|
created() {
|
|
61095
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
61225
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
61096
61226
|
super.created();
|
|
61097
61227
|
this.setSeriesAndRegionsFromSpec();
|
|
61098
61228
|
this.initEvent();
|
|
@@ -61129,15 +61259,15 @@ class AxisComponent extends BaseComponent {
|
|
|
61129
61259
|
this._marks.addMark(gridMark);
|
|
61130
61260
|
this._gridMark = gridMark;
|
|
61131
61261
|
}
|
|
61132
|
-
if (this._option.
|
|
61262
|
+
if (((_h = this._option.globalInstance) === null || _h === void 0 ? void 0 : _h.isAnimationEnable()) &&
|
|
61133
61263
|
get$1(this._option.getChart().getSpec(), 'animation') !== false &&
|
|
61134
61264
|
this._spec.animation === true) {
|
|
61135
|
-
const axisAnimateConfig = animationConfig((
|
|
61136
|
-
appear: (
|
|
61137
|
-
disappear: (
|
|
61138
|
-
enter: (
|
|
61139
|
-
exit: (
|
|
61140
|
-
update: (
|
|
61265
|
+
const axisAnimateConfig = animationConfig((_j = Factory.getAnimationInKey('axis')) === null || _j === void 0 ? void 0 : _j(), {
|
|
61266
|
+
appear: (_l = (_k = this._spec.animationAppear) !== null && _k !== void 0 ? _k : get$1(this._option.getChart().getSpec(), 'animationAppear.axis')) !== null && _l !== void 0 ? _l : get$1(this._option.getChart().getSpec(), 'animationAppear'),
|
|
61267
|
+
disappear: (_o = (_m = this._spec.animationDisappear) !== null && _m !== void 0 ? _m : get$1(this._option.getChart().getSpec(), 'animationDisappear.axis')) !== null && _o !== void 0 ? _o : get$1(this._option.getChart().getSpec(), 'animationDisappear'),
|
|
61268
|
+
enter: (_q = (_p = this._spec.animationEnter) !== null && _p !== void 0 ? _p : get$1(this._option.getChart().getSpec(), 'animationEnter.axis')) !== null && _q !== void 0 ? _q : get$1(this._option.getChart().getSpec(), 'animationEnter'),
|
|
61269
|
+
exit: (_s = (_r = this._spec.animationExit) !== null && _r !== void 0 ? _r : get$1(this._option.getChart().getSpec(), 'animationExit.axis')) !== null && _s !== void 0 ? _s : get$1(this._option.getChart().getSpec(), 'animationExit'),
|
|
61270
|
+
update: (_u = (_t = this._spec.animationUpdate) !== null && _t !== void 0 ? _t : get$1(this._option.getChart().getSpec(), 'animationUpdate.axis')) !== null && _u !== void 0 ? _u : get$1(this._option.getChart().getSpec(), 'animationUpdate')
|
|
61141
61271
|
});
|
|
61142
61272
|
if (axisAnimateConfig.enter) {
|
|
61143
61273
|
axisAnimateConfig.update[0].customParameters = {
|
|
@@ -63004,6 +63134,24 @@ class BandAxisMixin {
|
|
|
63004
63134
|
};
|
|
63005
63135
|
}
|
|
63006
63136
|
}
|
|
63137
|
+
_updateData() {
|
|
63138
|
+
var _a, _b, _c;
|
|
63139
|
+
const tickTransformType = this.registerTicksTransform();
|
|
63140
|
+
if (this._spec.showAllGroupLayers && this._scales.length > 1) {
|
|
63141
|
+
const layers = (_a = this._spec.layers) !== null && _a !== void 0 ? _a : [];
|
|
63142
|
+
Object.keys(this._tickDataMap).forEach(layer => {
|
|
63143
|
+
const layerConfig = layers[this._scales.length - 1 - +layer] || {};
|
|
63144
|
+
const tickData = this._tickDataMap[layer];
|
|
63145
|
+
const tickTransform = tickData === null || tickData === void 0 ? void 0 : tickData.getDataView().transformsArr.find((t) => t.type === tickTransformType);
|
|
63146
|
+
tickTransform &&
|
|
63147
|
+
(tickTransform.options = Object.assign(Object.assign({}, this._tickTransformOption()), layerConfig));
|
|
63148
|
+
});
|
|
63149
|
+
}
|
|
63150
|
+
else {
|
|
63151
|
+
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);
|
|
63152
|
+
tickTransform && (tickTransform.options = this._tickTransformOption());
|
|
63153
|
+
}
|
|
63154
|
+
}
|
|
63007
63155
|
dataToPosition(values, cfg = {}) {
|
|
63008
63156
|
var _a, _b;
|
|
63009
63157
|
if (values.length === 0 || this._scales.length === 0) {
|
|
@@ -63096,7 +63244,7 @@ class BandAxisMixin {
|
|
|
63096
63244
|
getLabelItems(length) {
|
|
63097
63245
|
const labelItems = [];
|
|
63098
63246
|
let preData = [];
|
|
63099
|
-
this._scales.forEach((scale, index) => {
|
|
63247
|
+
(this._spec.showAllGroupLayers ? this._scales : [this._scales[0]]).forEach((scale, index) => {
|
|
63100
63248
|
var _a;
|
|
63101
63249
|
const tickData = this._tickDataMap[index];
|
|
63102
63250
|
const isTickDataHaveData = (_a = tickData === null || tickData === void 0 ? void 0 : tickData.getLatestData()) === null || _a === void 0 ? void 0 : _a.length;
|
|
@@ -63278,6 +63426,20 @@ class CartesianBandAxis extends CartesianAxis {
|
|
|
63278
63426
|
minBandSize
|
|
63279
63427
|
};
|
|
63280
63428
|
}
|
|
63429
|
+
_compareSpec(spec, prevSpec) {
|
|
63430
|
+
const result = super._compareSpec(spec, prevSpec);
|
|
63431
|
+
if (result.reMake) {
|
|
63432
|
+
return result;
|
|
63433
|
+
}
|
|
63434
|
+
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)) {
|
|
63435
|
+
result.reMake = true;
|
|
63436
|
+
}
|
|
63437
|
+
return result;
|
|
63438
|
+
}
|
|
63439
|
+
reInit(spec) {
|
|
63440
|
+
super.reInit();
|
|
63441
|
+
this === null || this === void 0 ? void 0 : this._updateData();
|
|
63442
|
+
}
|
|
63281
63443
|
}
|
|
63282
63444
|
CartesianBandAxis.type = ComponentTypeEnum.cartesianBandAxis;
|
|
63283
63445
|
CartesianBandAxis.specKey = 'axes';
|
|
@@ -64920,6 +65082,10 @@ class BaseChart extends CompilableBase {
|
|
|
64920
65082
|
const elements = [...this._components, ...this._regions, ...this._series];
|
|
64921
65083
|
elements.forEach(element => element.onEvaluateEnd(option));
|
|
64922
65084
|
}
|
|
65085
|
+
onBeforeRender() {
|
|
65086
|
+
const elements = [...this._components, ...this._regions, ...this._series];
|
|
65087
|
+
elements.forEach(element => element.onBeforeRender());
|
|
65088
|
+
}
|
|
64923
65089
|
getLayoutElements() {
|
|
64924
65090
|
return this.getAllModels()
|
|
64925
65091
|
.map(i => i.layout)
|
|
@@ -65385,17 +65551,11 @@ class BaseChart extends CompilableBase {
|
|
|
65385
65551
|
}
|
|
65386
65552
|
_enableMarkAnimation(states) {
|
|
65387
65553
|
const marks = this.getAllMarks();
|
|
65388
|
-
marks.forEach(mark =>
|
|
65389
|
-
const product = mark.getProduct();
|
|
65390
|
-
if (product && product.animate) ;
|
|
65391
|
-
});
|
|
65554
|
+
marks.forEach(mark => mark.enableAnimationByState(states));
|
|
65392
65555
|
}
|
|
65393
65556
|
_disableMarkAnimation(states) {
|
|
65394
65557
|
const marks = this.getAllMarks();
|
|
65395
|
-
marks.forEach(mark =>
|
|
65396
|
-
const product = mark.getProduct();
|
|
65397
|
-
if (product && product.animate) ;
|
|
65398
|
-
});
|
|
65558
|
+
marks.forEach(mark => mark.disableAnimationByState(states));
|
|
65399
65559
|
}
|
|
65400
65560
|
filterGraphicsByDatum(datum, opt = {}) {
|
|
65401
65561
|
var _a;
|
|
@@ -65650,15 +65810,15 @@ class BaseChartSpecTransformer {
|
|
|
65650
65810
|
return true;
|
|
65651
65811
|
}
|
|
65652
65812
|
_getDefaultSeriesSpec(chartSpec, pickKeys, pickKeys2) {
|
|
65653
|
-
var _a, _b, _c, _d;
|
|
65813
|
+
var _a, _b, _c, _d, _e;
|
|
65654
65814
|
const series = {
|
|
65655
65815
|
dataKey: chartSpec.dataKey,
|
|
65656
65816
|
hover: chartSpec.hover,
|
|
65657
65817
|
select: chartSpec.select,
|
|
65658
65818
|
label: chartSpec.label,
|
|
65659
65819
|
seriesStyle: chartSpec.seriesStyle,
|
|
65660
|
-
animation: (_a = chartSpec.animation) !== null && _a !== void 0 ? _a : this._option.
|
|
65661
|
-
animationThreshold: (
|
|
65820
|
+
animation: (_a = chartSpec.animation) !== null && _a !== void 0 ? _a : (_b = this._option.globalInstance) === null || _b === void 0 ? void 0 : _b.isAnimationEnable(),
|
|
65821
|
+
animationThreshold: (_c = chartSpec.animationThreshold) !== null && _c !== void 0 ? _c : (_e = (_d = this._option).getTheme) === null || _e === void 0 ? void 0 : _e.call(_d, 'animationThreshold'),
|
|
65662
65822
|
animationAppear: chartSpec.animationAppear,
|
|
65663
65823
|
animationDisappear: chartSpec.animationDisappear,
|
|
65664
65824
|
animationEnter: chartSpec.animationEnter,
|
|
@@ -66278,7 +66438,7 @@ const layoutByValue$1 = (stateByField, series, layoutStartPoint, enableRemain =
|
|
|
66278
66438
|
layoutStartPoint = { x: 0, y: 0 };
|
|
66279
66439
|
}
|
|
66280
66440
|
Object.keys(stateByField).forEach(field => {
|
|
66281
|
-
var _a, _b, _c, _d, _e;
|
|
66441
|
+
var _a, _b, _c, _d, _e, _f;
|
|
66282
66442
|
const { currentValue, cacheInfo, labelsComp, attributes, coordKey } = stateByField[field];
|
|
66283
66443
|
let axis = null;
|
|
66284
66444
|
let coord = 0;
|
|
@@ -66290,8 +66450,8 @@ const layoutByValue$1 = (stateByField, series, layoutStartPoint, enableRemain =
|
|
|
66290
66450
|
item.axis.getLayoutStartPoint()[coordKey] -
|
|
66291
66451
|
layoutStartPoint[coordKey];
|
|
66292
66452
|
axis = item.axis;
|
|
66293
|
-
axisLabel = (_e = (_d = (_c = (_b = (_a = axis
|
|
66294
|
-
.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 ||
|
|
66453
|
+
axisLabel = (_f = (_e = (_d = (_c = (_b = (_a = axis
|
|
66454
|
+
.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.children[0]) === null || _d === void 0 ? void 0 : _d.getChildByName('axis-label-container')) === null || _e === void 0 ? void 0 : _e.getChildByName('axis-label-container-layer-0')) === null || _f === void 0 ? void 0 : _f.children[0];
|
|
66295
66455
|
}
|
|
66296
66456
|
const isVisible = !!currentValue.size && Number.isFinite(coord) && !Number.isNaN(coord);
|
|
66297
66457
|
const useCache = enableRemain && !isVisible && isValid$1(cacheInfo);
|
|
@@ -69669,8 +69829,7 @@ class MapSeries extends GeoSeries {
|
|
|
69669
69829
|
initMark() {
|
|
69670
69830
|
this._pathMark = this._createMark(MapSeries.mark.area, {
|
|
69671
69831
|
groupKey: this.getDimensionField()[0],
|
|
69672
|
-
isSeriesMark: true
|
|
69673
|
-
skipBeforeLayouted: true
|
|
69832
|
+
isSeriesMark: true
|
|
69674
69833
|
}, {
|
|
69675
69834
|
morph: shouldMarkDoMorph(this._spec, MapSeries.mark.area.name),
|
|
69676
69835
|
morphElementKey: this.getDimensionField()[0]
|
|
@@ -73156,7 +73315,6 @@ class BasePieSeries extends PolarSeries {
|
|
|
73156
73315
|
this._pieMark = this._createMark(Object.assign(Object.assign({}, BasePieSeries.mark.pie), { name: this._pieMarkName, type: this._pieMarkType }), {
|
|
73157
73316
|
key: DEFAULT_DATA_KEY,
|
|
73158
73317
|
groupKey: this._seriesField,
|
|
73159
|
-
skipBeforeLayouted: true,
|
|
73160
73318
|
isSeriesMark: true
|
|
73161
73319
|
}, {
|
|
73162
73320
|
morph: shouldMarkDoMorph(this._spec, this._pieMarkName),
|
|
@@ -74621,17 +74779,16 @@ class DotSeriesTooltipHelper extends BaseSeriesTooltipHelper {
|
|
|
74621
74779
|
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;
|
|
74622
74780
|
if (res && !userUpdateContent) {
|
|
74623
74781
|
res.updateContent = (prev, datum, params) => {
|
|
74624
|
-
var _a, _b;
|
|
74625
74782
|
const childrenContent = [];
|
|
74626
74783
|
const childrenPrev = prev.filter((p) => p.key === 'children');
|
|
74627
74784
|
childrenPrev.length > 0 &&
|
|
74628
|
-
|
|
74785
|
+
childrenPrev[0].value.forEach((element) => {
|
|
74629
74786
|
let flag = true;
|
|
74630
74787
|
for (const key in element) {
|
|
74631
74788
|
childrenContent.push(Object.assign(Object.assign({}, childrenPrev[0]), { shapeType: 'circle', hasShape: flag, key: key, value: element[key] + '' }));
|
|
74632
74789
|
flag = false;
|
|
74633
74790
|
}
|
|
74634
|
-
})
|
|
74791
|
+
});
|
|
74635
74792
|
return prev.concat(childrenContent);
|
|
74636
74793
|
};
|
|
74637
74794
|
}
|
|
@@ -74654,21 +74811,13 @@ const objFlat = (data, op) => {
|
|
|
74654
74811
|
}
|
|
74655
74812
|
}
|
|
74656
74813
|
const dataOp = datum[op];
|
|
74657
|
-
|
|
74658
|
-
|
|
74659
|
-
result.push(Object.assign({}, dataKeyObj, d, {
|
|
74660
|
-
[DEFAULT_DATA_INDEX]: index,
|
|
74661
|
-
[DEFAULT_DATA_KEY]: `${dataKey}_${i}`
|
|
74662
|
-
}));
|
|
74663
|
-
index++;
|
|
74664
|
-
});
|
|
74665
|
-
}
|
|
74666
|
-
else {
|
|
74667
|
-
result.push(Object.assign({}, dataKeyObj, {
|
|
74814
|
+
dataOp === null || dataOp === void 0 ? void 0 : dataOp.forEach((d, i) => {
|
|
74815
|
+
result.push(Object.assign({}, dataKeyObj, d, {
|
|
74668
74816
|
[DEFAULT_DATA_INDEX]: index,
|
|
74669
|
-
[DEFAULT_DATA_KEY]: dataKey
|
|
74817
|
+
[DEFAULT_DATA_KEY]: `${dataKey}_${i}`
|
|
74670
74818
|
}));
|
|
74671
|
-
|
|
74819
|
+
index++;
|
|
74820
|
+
});
|
|
74672
74821
|
});
|
|
74673
74822
|
return result;
|
|
74674
74823
|
};
|
|
@@ -74761,7 +74910,7 @@ class DotSeries extends CartesianSeries {
|
|
|
74761
74910
|
}
|
|
74762
74911
|
}
|
|
74763
74912
|
initData() {
|
|
74764
|
-
var _a
|
|
74913
|
+
var _a;
|
|
74765
74914
|
super.initData();
|
|
74766
74915
|
this._xDimensionStatisticsDomain = this.getRawData().latestData.map((d) => d[this._fieldY[0]]);
|
|
74767
74916
|
registerDataSetInstanceTransform(this._option.dataSet, 'objFlat', objFlat);
|
|
@@ -74772,31 +74921,9 @@ class DotSeries extends CartesianSeries {
|
|
|
74772
74921
|
options: 'dots',
|
|
74773
74922
|
level: TransformLevel.dotObjFlat
|
|
74774
74923
|
}, false);
|
|
74775
|
-
(_b = this.getRawData()) === null || _b === void 0 ? void 0 : _b.transform({
|
|
74776
|
-
type: 'objFlat',
|
|
74777
|
-
options: 'dots',
|
|
74778
|
-
level: TransformLevel.dotObjFlat
|
|
74779
|
-
}, false);
|
|
74780
|
-
}
|
|
74781
|
-
_statisticViewData() {
|
|
74782
|
-
var _a;
|
|
74783
|
-
super._statisticViewData();
|
|
74784
|
-
(_a = this._viewDataStatistics) === null || _a === void 0 ? void 0 : _a.transform({
|
|
74785
|
-
type: 'objFlat',
|
|
74786
|
-
options: 'dots',
|
|
74787
|
-
level: TransformLevel.dotObjFlat
|
|
74788
|
-
}, false);
|
|
74789
74924
|
}
|
|
74790
74925
|
getStatisticFields() {
|
|
74791
|
-
|
|
74792
|
-
const { linearMode = true } = this._spec;
|
|
74793
|
-
if (linearMode) {
|
|
74794
|
-
result.push({ key: this._fieldX[0], operations: ['min', 'max'] });
|
|
74795
|
-
}
|
|
74796
|
-
else {
|
|
74797
|
-
result.push({ key: this._fieldX[0], operations: ['values'] });
|
|
74798
|
-
}
|
|
74799
|
-
return result;
|
|
74926
|
+
return [{ key: this._fieldY[0], operations: ['values'], customize: this._xDimensionStatisticsDomain }];
|
|
74800
74927
|
}
|
|
74801
74928
|
setAttrFromSpec() {
|
|
74802
74929
|
var _a;
|
|
@@ -74841,21 +74968,20 @@ class DotSeries extends CartesianSeries {
|
|
|
74841
74968
|
});
|
|
74842
74969
|
}
|
|
74843
74970
|
initMarkStyle() {
|
|
74844
|
-
var _a, _b;
|
|
74845
74971
|
const clipMark = this._clipMark;
|
|
74846
74972
|
if (clipMark) {
|
|
74847
74973
|
this.setMarkStyle(clipMark, {
|
|
74848
|
-
x: -
|
|
74974
|
+
x: -this._spec.leftAppendPadding,
|
|
74849
74975
|
y: 0,
|
|
74850
74976
|
width: 10000,
|
|
74851
|
-
height:
|
|
74977
|
+
height: this._spec.clipHeight
|
|
74852
74978
|
}, 'normal', AttributeLevel.Series);
|
|
74853
74979
|
clipMark.setMarkConfig({ interactive: false, clip: true });
|
|
74854
74980
|
}
|
|
74855
74981
|
const containerMark = this._containerMark;
|
|
74856
74982
|
if (containerMark) {
|
|
74857
74983
|
this.setMarkStyle(containerMark, {
|
|
74858
|
-
x:
|
|
74984
|
+
x: this._spec.leftAppendPadding
|
|
74859
74985
|
}, 'normal', AttributeLevel.Series);
|
|
74860
74986
|
containerMark.setMarkConfig({ interactive: false });
|
|
74861
74987
|
}
|
|
@@ -75080,13 +75206,7 @@ class LinkSeriesTooltipHelper extends BaseSeriesTooltipHelper {
|
|
|
75080
75206
|
}
|
|
75081
75207
|
}
|
|
75082
75208
|
|
|
75083
|
-
|
|
75084
|
-
(function (LinkType) {
|
|
75085
|
-
LinkType["line"] = "line";
|
|
75086
|
-
LinkType["curve"] = "curve";
|
|
75087
|
-
})(LinkType || (LinkType = {}));
|
|
75088
|
-
|
|
75089
|
-
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" } });
|
|
75209
|
+
const linkSeriesMark = Object.assign(Object.assign({}, baseSeriesMark), { ["group"]: { name: "group", type: "group" }, ["link"]: { name: "link", type: "rule" }, ["arrow"]: { name: "arrow", type: "symbol" } });
|
|
75090
75210
|
|
|
75091
75211
|
const linkDotInfo = (data, op) => {
|
|
75092
75212
|
const { infoKey, fields, linkData, dotData } = op;
|
|
@@ -75128,7 +75248,6 @@ class LinkSeries extends CartesianSeries {
|
|
|
75128
75248
|
constructor() {
|
|
75129
75249
|
super(...arguments);
|
|
75130
75250
|
this.type = SeriesTypeEnum.link;
|
|
75131
|
-
this._curveLinkCountMap = {};
|
|
75132
75251
|
}
|
|
75133
75252
|
getFromField() {
|
|
75134
75253
|
return this._fromField;
|
|
@@ -75199,12 +75318,11 @@ class LinkSeries extends CartesianSeries {
|
|
|
75199
75318
|
this.setDotSeriesSpec(this._spec.dotSeriesSpec);
|
|
75200
75319
|
}
|
|
75201
75320
|
initMark() {
|
|
75202
|
-
const { linkType = LinkType.line, imageLabelField } = this._spec;
|
|
75203
75321
|
this._clipMark = this._createMark(LinkSeries.mark.group);
|
|
75204
75322
|
this._containerMark = this._createMark(LinkSeries.mark.group, {
|
|
75205
75323
|
parent: this._clipMark
|
|
75206
75324
|
});
|
|
75207
|
-
this._linkMark = this._createMark(
|
|
75325
|
+
this._linkMark = this._createMark(LinkSeries.mark.link, {
|
|
75208
75326
|
skipBeforeLayouted: false,
|
|
75209
75327
|
parent: this._containerMark
|
|
75210
75328
|
});
|
|
@@ -75213,23 +75331,16 @@ class LinkSeries extends CartesianSeries {
|
|
|
75213
75331
|
isSeriesMark: true,
|
|
75214
75332
|
parent: this._containerMark
|
|
75215
75333
|
});
|
|
75216
|
-
if (imageLabelField) {
|
|
75217
|
-
this._imageLabelMark = this._createMark(LinkSeries.mark.imageLabel, {
|
|
75218
|
-
skipBeforeLayouted: false,
|
|
75219
|
-
isSeriesMark: true,
|
|
75220
|
-
parent: this._containerMark
|
|
75221
|
-
});
|
|
75222
|
-
}
|
|
75223
75334
|
}
|
|
75224
75335
|
initMarkStyle() {
|
|
75225
|
-
var _a, _b, _c, _d
|
|
75336
|
+
var _a, _b, _c, _d;
|
|
75226
75337
|
const clipMark = this._clipMark;
|
|
75227
75338
|
if (clipMark) {
|
|
75228
75339
|
this.setMarkStyle(clipMark, {
|
|
75229
|
-
x: -
|
|
75340
|
+
x: -this._spec.leftAppendPadding,
|
|
75230
75341
|
y: 0,
|
|
75231
75342
|
width: 10000,
|
|
75232
|
-
height:
|
|
75343
|
+
height: this._spec.clipHeight
|
|
75233
75344
|
}, 'normal', AttributeLevel.Series);
|
|
75234
75345
|
clipMark.setMarkConfig({ interactive: false, clip: true });
|
|
75235
75346
|
}
|
|
@@ -75242,43 +75353,19 @@ class LinkSeries extends CartesianSeries {
|
|
|
75242
75353
|
containerMark.setMarkConfig({ interactive: false });
|
|
75243
75354
|
}
|
|
75244
75355
|
const linkMark = this._linkMark;
|
|
75245
|
-
const { linkType = LinkType.line } = this._spec;
|
|
75246
75356
|
if (linkMark) {
|
|
75247
|
-
|
|
75248
|
-
this.
|
|
75249
|
-
|
|
75250
|
-
|
|
75251
|
-
|
|
75252
|
-
|
|
75253
|
-
|
|
75254
|
-
|
|
75255
|
-
const toY = this.dataToPositionYTo(datum);
|
|
75256
|
-
const curveLinkCount = this._curveLinkCountMap[`${fromX}-${fromY}-${toX}-${toY}`] || 1;
|
|
75257
|
-
this._curveLinkCountMap[`${fromX}-${fromY}-${toX}-${toY}`] = curveLinkCount + 1;
|
|
75258
|
-
const curveRatio = 0.5 + curveLinkCount * 0.1;
|
|
75259
|
-
const controlX1 = fromX + (toX - fromX) * 0.7;
|
|
75260
|
-
const controlY1 = fromY;
|
|
75261
|
-
const controlX2 = toX - (toX - fromX) * curveRatio;
|
|
75262
|
-
const controlY2 = toY;
|
|
75263
|
-
return `M ${fromX} ${fromY} C ${controlX1} ${controlY1}, ${controlX2} ${controlY2}, ${toX} ${toY}`;
|
|
75264
|
-
},
|
|
75265
|
-
lineWidth: (_f = (_e = this._spec.link.style) === null || _e === void 0 ? void 0 : _e.lineWidth) !== null && _f !== void 0 ? _f : 1
|
|
75266
|
-
}, 'normal', AttributeLevel.Series);
|
|
75267
|
-
}
|
|
75268
|
-
else {
|
|
75269
|
-
this.setMarkStyle(linkMark, {
|
|
75270
|
-
stroke: this.getColorAttribute(),
|
|
75271
|
-
strokeOpacity: this.dataToOpacity.bind(this),
|
|
75272
|
-
x: this.dataToPositionXFrom.bind(this),
|
|
75273
|
-
y: this.dataToPositionYFrom.bind(this),
|
|
75274
|
-
x1: this.dataToPositionXTo.bind(this),
|
|
75275
|
-
y1: this.dataToPositionYTo.bind(this)
|
|
75276
|
-
}, 'normal', AttributeLevel.Series);
|
|
75277
|
-
}
|
|
75357
|
+
this.setMarkStyle(linkMark, {
|
|
75358
|
+
stroke: this.getColorAttribute(),
|
|
75359
|
+
strokeOpacity: this.dataToOpacity.bind(this),
|
|
75360
|
+
x: this.dataToPositionXFrom.bind(this),
|
|
75361
|
+
y: this.dataToPositionYFrom.bind(this),
|
|
75362
|
+
x1: this.dataToPositionXTo.bind(this),
|
|
75363
|
+
y1: this.dataToPositionYTo.bind(this)
|
|
75364
|
+
}, 'normal', AttributeLevel.Series);
|
|
75278
75365
|
}
|
|
75279
75366
|
const arrowMark = this._arrowMark;
|
|
75280
75367
|
if (arrowMark) {
|
|
75281
|
-
const arrowSize = (
|
|
75368
|
+
const arrowSize = (_d = (_c = (_b = (_a = this._theme) === null || _a === void 0 ? void 0 : _a.arrow) === null || _b === void 0 ? void 0 : _b.style) === null || _c === void 0 ? void 0 : _c.size) !== null && _d !== void 0 ? _d : 10;
|
|
75282
75369
|
this.setMarkStyle(arrowMark, {
|
|
75283
75370
|
x: this.dataToPositionXTo.bind(this),
|
|
75284
75371
|
y: (datum) => this.dataToPositionArrowYTo(datum, arrowSize),
|
|
@@ -75290,44 +75377,18 @@ class LinkSeries extends CartesianSeries {
|
|
|
75290
75377
|
}
|
|
75291
75378
|
}, 'normal', AttributeLevel.Series);
|
|
75292
75379
|
}
|
|
75293
|
-
const imageLabelMark = this._imageLabelMark;
|
|
75294
|
-
if (imageLabelMark) {
|
|
75295
|
-
const { style = {} } = this._spec.imageLabel;
|
|
75296
|
-
const { width = 40, height = 40 } = style;
|
|
75297
|
-
this.setMarkStyle(imageLabelMark, {
|
|
75298
|
-
x: datum => {
|
|
75299
|
-
return (this.dataToPositionXFrom(datum) + this.dataToPositionXTo(datum)) / 2 - width / 2;
|
|
75300
|
-
},
|
|
75301
|
-
y: datum => {
|
|
75302
|
-
return (this.dataToPositionYFrom(datum) + this.dataToPositionYTo(datum)) / 2 - height / 2;
|
|
75303
|
-
},
|
|
75304
|
-
width,
|
|
75305
|
-
height,
|
|
75306
|
-
image: datum => {
|
|
75307
|
-
return datum[this._spec.imageLabelField];
|
|
75308
|
-
}
|
|
75309
|
-
}, 'normal', AttributeLevel.Series);
|
|
75310
|
-
}
|
|
75311
75380
|
}
|
|
75312
75381
|
afterInitMark() {
|
|
75313
75382
|
super.afterInitMark();
|
|
75314
75383
|
}
|
|
75315
75384
|
dataToPositionXFrom(datum) {
|
|
75316
|
-
var _a, _b, _c, _d;
|
|
75317
75385
|
if (!this._xAxisHelper) {
|
|
75318
75386
|
return Number.NaN;
|
|
75319
75387
|
}
|
|
75320
75388
|
const { dataToPosition } = this._xAxisHelper;
|
|
75321
|
-
|
|
75322
|
-
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;
|
|
75323
|
-
const { style = {} } = (_d = this._dotSeriesSpec.symbol) !== null && _d !== void 0 ? _d : {};
|
|
75324
|
-
const { size: dotSize = 10 } = style;
|
|
75325
|
-
return (dataToPosition(this.getDatumPositionValues(datum, this._fromField + '_xField'), {
|
|
75389
|
+
return dataToPosition(this.getDatumPositionValues(datum, this._fromField + '_xField'), {
|
|
75326
75390
|
bandPosition: this._bandPosition
|
|
75327
|
-
})
|
|
75328
|
-
(allowExtend && (!datum.isExtend || datum.isExtend === 'left')
|
|
75329
|
-
? -(array(bandSize)[0] + dotSize) / 2
|
|
75330
|
-
: 0));
|
|
75391
|
+
});
|
|
75331
75392
|
}
|
|
75332
75393
|
dataToPositionYFrom(datum) {
|
|
75333
75394
|
if (!this._yAxisHelper) {
|
|
@@ -75337,21 +75398,13 @@ class LinkSeries extends CartesianSeries {
|
|
|
75337
75398
|
return dataToPosition(this.getDatumPositionValues(datum, this._fromField + '_yField'));
|
|
75338
75399
|
}
|
|
75339
75400
|
dataToPositionXTo(datum) {
|
|
75340
|
-
var _a, _b, _c, _d;
|
|
75341
75401
|
if (!this._xAxisHelper) {
|
|
75342
75402
|
return Number.NaN;
|
|
75343
75403
|
}
|
|
75344
75404
|
const { dataToPosition } = this._xAxisHelper;
|
|
75345
|
-
|
|
75346
|
-
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;
|
|
75347
|
-
const { style = {} } = (_d = this._dotSeriesSpec.symbol) !== null && _d !== void 0 ? _d : {};
|
|
75348
|
-
const { size: dotSize = 10 } = style;
|
|
75349
|
-
return (dataToPosition(this.getDatumPositionValues(datum, this._toField + '_xField'), {
|
|
75405
|
+
return dataToPosition(this.getDatumPositionValues(datum, this._toField + '_xField'), {
|
|
75350
75406
|
bandPosition: this._bandPosition
|
|
75351
|
-
})
|
|
75352
|
-
(allowExtend && (!datum.isExtend || datum.isExtend === 'right')
|
|
75353
|
-
? (array(bandSize)[0] + dotSize) / 2
|
|
75354
|
-
: 0));
|
|
75407
|
+
});
|
|
75355
75408
|
}
|
|
75356
75409
|
dataToPositionYTo(datum) {
|
|
75357
75410
|
if (!this._yAxisHelper) {
|
|
@@ -75373,10 +75426,9 @@ class LinkSeries extends CartesianSeries {
|
|
|
75373
75426
|
}) + offset);
|
|
75374
75427
|
}
|
|
75375
75428
|
dataToOpacity(datum) {
|
|
75376
|
-
if (
|
|
75377
|
-
|
|
75378
|
-
|
|
75379
|
-
datum[this._fromField] === datum[this._toField])) {
|
|
75429
|
+
if (this.isPositionXOuterRange(datum, this._fromField + '_xField') ||
|
|
75430
|
+
this.isPositionXOuterRange(datum, this._toField + '_xField') ||
|
|
75431
|
+
datum[this._fromField] === datum[this._toField]) {
|
|
75380
75432
|
return 0;
|
|
75381
75433
|
}
|
|
75382
75434
|
return 1;
|
|
@@ -76890,6 +76942,72 @@ const calculateNodeValue = subTree => {
|
|
|
76890
76942
|
isNil$1(node.value) && ((null === (_a = node.children) || void 0 === _a ? void 0 : _a.length) ? node.value = calculateNodeValue(node.children) : node.value = 0), sum += Math.abs(node.value);
|
|
76891
76943
|
}), sum;
|
|
76892
76944
|
};
|
|
76945
|
+
function makeHierarchicNodes(originalNodes, nodeKeyFunc, nodes = [], nodeMap = {}, originalLinks) {
|
|
76946
|
+
calculateNodeValue(originalNodes);
|
|
76947
|
+
const doSubTree = (subTree, depth, parents) => {
|
|
76948
|
+
subTree.forEach((node, index) => {
|
|
76949
|
+
const nodeKey = nodeKeyFunc ? nodeKeyFunc(node) : parents ? `${parents[parents.length - 1].key}-${index}` : `${depth}-${index}`,
|
|
76950
|
+
nodeValue = isNil$1(node.value) ? 0 : toValidNumber$1(node.value);
|
|
76951
|
+
if (nodeMap[nodeKey]) nodeMap[nodeKey].value = void 0;else {
|
|
76952
|
+
const nodeElement = {
|
|
76953
|
+
depth: depth,
|
|
76954
|
+
datum: node,
|
|
76955
|
+
index: index,
|
|
76956
|
+
key: nodeKey,
|
|
76957
|
+
value: nodeValue,
|
|
76958
|
+
sourceLinks: [],
|
|
76959
|
+
targetLinks: []
|
|
76960
|
+
};
|
|
76961
|
+
nodeMap[nodeKey] = nodeElement, nodes.push(nodeElement);
|
|
76962
|
+
}
|
|
76963
|
+
parents && originalLinks && originalLinks.push({
|
|
76964
|
+
source: parents[parents.length - 1].key,
|
|
76965
|
+
target: nodeKey,
|
|
76966
|
+
value: nodeValue,
|
|
76967
|
+
parents: parents
|
|
76968
|
+
}), node.children && node.children.length && doSubTree(node.children, depth + 1, parents ? parents.concat([nodeMap[nodeKey]]) : [nodeMap[nodeKey]]);
|
|
76969
|
+
});
|
|
76970
|
+
};
|
|
76971
|
+
return doSubTree(originalNodes, 0, null), nodes;
|
|
76972
|
+
}
|
|
76973
|
+
function computeHierarchicNodeLinks(originalNodes, nodeKeyFunc) {
|
|
76974
|
+
const nodes = [],
|
|
76975
|
+
links = [],
|
|
76976
|
+
nodeMap = {},
|
|
76977
|
+
linkMap = {},
|
|
76978
|
+
originalLinks = [];
|
|
76979
|
+
return makeHierarchicNodes(originalNodes, nodeKeyFunc, nodes, nodeMap, originalLinks), originalLinks.forEach((link, index) => {
|
|
76980
|
+
const key = `${link.source}-${link.target}`,
|
|
76981
|
+
linkDatum = pickWithout(link, ["parents"]);
|
|
76982
|
+
if (linkDatum.parents = link.parents.map(node => pickWithout(node, ["sourceLinks", "targetLinks"])), linkMap[key]) return linkMap[key].value += toValidNumber$1(link.value), void linkMap[key].datum.push(linkDatum);
|
|
76983
|
+
const linkElement = {
|
|
76984
|
+
index: index,
|
|
76985
|
+
key: `${link.source}-${link.target}`,
|
|
76986
|
+
source: link.source,
|
|
76987
|
+
target: link.target,
|
|
76988
|
+
datum: [linkDatum],
|
|
76989
|
+
value: link.value,
|
|
76990
|
+
parents: link.parents.map(parent => parent.key)
|
|
76991
|
+
};
|
|
76992
|
+
links.push(linkElement), nodeMap[link.source].sourceLinks.push(linkElement), nodeMap[link.target].targetLinks.push(linkElement), linkMap[key] = linkElement;
|
|
76993
|
+
}), {
|
|
76994
|
+
nodes: nodes,
|
|
76995
|
+
links: links,
|
|
76996
|
+
nodeMap: nodeMap
|
|
76997
|
+
};
|
|
76998
|
+
}
|
|
76999
|
+
function computeNodeValues(nodes) {
|
|
77000
|
+
for (let i = 0, len = nodes.length; i < len; i++) {
|
|
77001
|
+
const node = nodes[i];
|
|
77002
|
+
node.value = Math.max(isNil$1(node.value) ? 0 : toValidNumber$1(node.value), node.sourceLinks.reduce((sum, link) => {
|
|
77003
|
+
var _a;
|
|
77004
|
+
return sum + (null !== (_a = toValidNumber$1(link.value)) && void 0 !== _a ? _a : 0);
|
|
77005
|
+
}, 0), node.targetLinks.reduce((sum, link) => {
|
|
77006
|
+
var _a;
|
|
77007
|
+
return sum + (null !== (_a = toValidNumber$1(link.value)) && void 0 !== _a ? _a : 0);
|
|
77008
|
+
}, 0));
|
|
77009
|
+
}
|
|
77010
|
+
}
|
|
76893
77011
|
|
|
76894
77012
|
function left(node) {
|
|
76895
77013
|
return node.depth;
|
|
@@ -77023,55 +77141,7 @@ class SankeyLayout {
|
|
|
77023
77141
|
};
|
|
77024
77142
|
}
|
|
77025
77143
|
computeHierarchicNodeLinks(originalNodes) {
|
|
77026
|
-
|
|
77027
|
-
links = [],
|
|
77028
|
-
nodeMap = {},
|
|
77029
|
-
linkMap = {},
|
|
77030
|
-
originalLinks = [];
|
|
77031
|
-
calculateNodeValue(originalNodes);
|
|
77032
|
-
const doSubTree = (subTree, depth, parents) => {
|
|
77033
|
-
subTree.forEach((node, index) => {
|
|
77034
|
-
const nodeKey = this._getNodeKey ? this._getNodeKey(node) : parents ? `${parents[parents.length - 1].key}-${index}` : `${depth}-${index}`,
|
|
77035
|
-
nodeValue = isNil$1(node.value) ? 0 : toValidNumber$1(node.value);
|
|
77036
|
-
if (nodeMap[nodeKey]) nodeMap[nodeKey].value = void 0;else {
|
|
77037
|
-
const nodeElement = {
|
|
77038
|
-
depth: depth,
|
|
77039
|
-
datum: node,
|
|
77040
|
-
index: index,
|
|
77041
|
-
key: nodeKey,
|
|
77042
|
-
value: nodeValue,
|
|
77043
|
-
sourceLinks: [],
|
|
77044
|
-
targetLinks: []
|
|
77045
|
-
};
|
|
77046
|
-
nodeMap[nodeKey] = nodeElement, nodes.push(nodeElement);
|
|
77047
|
-
}
|
|
77048
|
-
parents && originalLinks.push({
|
|
77049
|
-
source: parents[parents.length - 1].key,
|
|
77050
|
-
target: nodeKey,
|
|
77051
|
-
value: nodeValue,
|
|
77052
|
-
parents: parents
|
|
77053
|
-
}), node.children && node.children.length && doSubTree(node.children, depth + 1, parents ? parents.concat([nodeMap[nodeKey]]) : [nodeMap[nodeKey]]);
|
|
77054
|
-
});
|
|
77055
|
-
};
|
|
77056
|
-
return doSubTree(originalNodes, 0, null), originalLinks.forEach((link, index) => {
|
|
77057
|
-
const key = `${link.source}-${link.target}`,
|
|
77058
|
-
linkDatum = pickWithout(link, ["parents"]);
|
|
77059
|
-
if (linkDatum.parents = link.parents.map(node => pickWithout(node, ["sourceLinks", "targetLinks"])), linkMap[key]) return linkMap[key].value += toValidNumber$1(link.value), void linkMap[key].datum.push(linkDatum);
|
|
77060
|
-
const linkElement = {
|
|
77061
|
-
index: index,
|
|
77062
|
-
key: `${link.source}-${link.target}`,
|
|
77063
|
-
source: link.source,
|
|
77064
|
-
target: link.target,
|
|
77065
|
-
datum: [linkDatum],
|
|
77066
|
-
value: link.value,
|
|
77067
|
-
parents: link.parents.map(parent => parent.key)
|
|
77068
|
-
};
|
|
77069
|
-
links.push(linkElement), nodeMap[link.source].sourceLinks.push(linkElement), nodeMap[link.target].targetLinks.push(linkElement), linkMap[key] = linkElement;
|
|
77070
|
-
}), {
|
|
77071
|
-
nodes: nodes,
|
|
77072
|
-
links: links,
|
|
77073
|
-
nodeMap: nodeMap
|
|
77074
|
-
};
|
|
77144
|
+
return computeHierarchicNodeLinks(originalNodes, this._getNodeKey);
|
|
77075
77145
|
}
|
|
77076
77146
|
computeSourceTargetNodeLinks(data) {
|
|
77077
77147
|
const nodes = [],
|
|
@@ -77141,16 +77211,7 @@ class SankeyLayout {
|
|
|
77141
77211
|
};
|
|
77142
77212
|
}
|
|
77143
77213
|
computeNodeValues(nodes) {
|
|
77144
|
-
|
|
77145
|
-
const node = nodes[i];
|
|
77146
|
-
node.value = Math.max(isNil$1(node.value) ? 0 : toValidNumber$1(node.value), node.sourceLinks.reduce((sum, link) => {
|
|
77147
|
-
var _a;
|
|
77148
|
-
return sum + (null !== (_a = toValidNumber$1(link.value)) && void 0 !== _a ? _a : 0);
|
|
77149
|
-
}, 0), node.targetLinks.reduce((sum, link) => {
|
|
77150
|
-
var _a;
|
|
77151
|
-
return sum + (null !== (_a = toValidNumber$1(link.value)) && void 0 !== _a ? _a : 0);
|
|
77152
|
-
}, 0));
|
|
77153
|
-
}
|
|
77214
|
+
return computeNodeValues(nodes);
|
|
77154
77215
|
}
|
|
77155
77216
|
computeNodeDepths(nodes) {
|
|
77156
77217
|
var _a;
|
|
@@ -78215,7 +78276,7 @@ function normalizeSolution(solution, orientation, orientationOrder) {
|
|
|
78215
78276
|
return ret;
|
|
78216
78277
|
}
|
|
78217
78278
|
|
|
78218
|
-
function scaleSolution(solution, width, height, x0, y0) {
|
|
78279
|
+
function scaleSolution(solution, width, height, x0, y0, hasEmptySet = !1) {
|
|
78219
78280
|
width = Math.max(width, 1), height = Math.max(height, 1);
|
|
78220
78281
|
const circles = [],
|
|
78221
78282
|
setIds = [];
|
|
@@ -78225,9 +78286,20 @@ function scaleSolution(solution, width, height, x0, y0) {
|
|
|
78225
78286
|
yRange = bounds.yRange;
|
|
78226
78287
|
if (xRange.max === xRange.min || yRange.max === yRange.min) return console.log("not scaling solution: zero size detected"), solution;
|
|
78227
78288
|
const xScaling = width / (xRange.max - xRange.min),
|
|
78228
|
-
yScaling = height / (yRange.max - yRange.min)
|
|
78229
|
-
|
|
78230
|
-
|
|
78289
|
+
yScaling = height / (yRange.max - yRange.min);
|
|
78290
|
+
let scaling;
|
|
78291
|
+
if (hasEmptySet) {
|
|
78292
|
+
const containerRadius = Math.min(width, height) / 2,
|
|
78293
|
+
centerX = (xRange.min + xRange.max) / 2,
|
|
78294
|
+
centerY = (yRange.min + yRange.max) / 2;
|
|
78295
|
+
let diagramRadius = 0;
|
|
78296
|
+
for (const circle of circles) {
|
|
78297
|
+
const maxDistanceForThisCircle = Math.sqrt(Math.pow(circle.x - centerX, 2) + Math.pow(circle.y - centerY, 2)) + circle.radius;
|
|
78298
|
+
diagramRadius = Math.max(diagramRadius, maxDistanceForThisCircle);
|
|
78299
|
+
}
|
|
78300
|
+
scaling = containerRadius / diagramRadius;
|
|
78301
|
+
} else scaling = Math.min(yScaling, xScaling);
|
|
78302
|
+
const xOffset = (width - (xRange.max - xRange.min) * scaling) / 2,
|
|
78231
78303
|
yOffset = (height - (yRange.max - yRange.min) * scaling) / 2,
|
|
78232
78304
|
scaled = {};
|
|
78233
78305
|
for (let i = 0; i < circles.length; ++i) {
|
|
@@ -78442,21 +78514,39 @@ const transform$2 = (options, upstreamData) => {
|
|
|
78442
78514
|
setField = "sets",
|
|
78443
78515
|
valueField = "size",
|
|
78444
78516
|
orientation = Math.PI / 2,
|
|
78445
|
-
orientationOrder = null
|
|
78517
|
+
orientationOrder = null,
|
|
78518
|
+
emptySetKey: emptySetKey
|
|
78446
78519
|
} = options;
|
|
78447
78520
|
let circles = {},
|
|
78448
78521
|
textCenters = {};
|
|
78449
|
-
|
|
78450
|
-
|
|
78522
|
+
const hasEmptySet = upstreamData.some(area => {
|
|
78523
|
+
const sets = array(area[setField]);
|
|
78524
|
+
return !sets || 0 === sets.length;
|
|
78525
|
+
}),
|
|
78526
|
+
nonEmptyData = hasEmptySet ? upstreamData.filter(area => !isEmpty(array(area[setField]))) : upstreamData;
|
|
78527
|
+
if (nonEmptyData.length > 0) {
|
|
78528
|
+
const vennData = nonEmptyData.map(area => ({
|
|
78451
78529
|
sets: array(area[setField]),
|
|
78452
78530
|
size: area[valueField]
|
|
78453
78531
|
}));
|
|
78454
78532
|
let solution = venn$1(vennData, options);
|
|
78455
|
-
solution = normalizeSolution(solution, orientation, orientationOrder), circles = scaleSolution(solution, x1 - x0, y1 - y0, x0, y0), textCenters = computeTextCenters(circles, vennData);
|
|
78533
|
+
solution = normalizeSolution(solution, orientation, orientationOrder), circles = scaleSolution(solution, x1 - x0, y1 - y0, x0, y0, hasEmptySet), textCenters = computeTextCenters(circles, vennData);
|
|
78456
78534
|
}
|
|
78457
78535
|
return upstreamData.map(area => {
|
|
78458
|
-
const sets = array(area[setField])
|
|
78459
|
-
|
|
78536
|
+
const sets = array(area[setField]);
|
|
78537
|
+
if (!sets || 0 === sets.length) return Object.assign(Object.assign({}, area), {
|
|
78538
|
+
datum: area,
|
|
78539
|
+
sets: sets,
|
|
78540
|
+
key: emptySetKey || "others",
|
|
78541
|
+
size: area[valueField],
|
|
78542
|
+
labelX: void 0,
|
|
78543
|
+
labelY: void 0,
|
|
78544
|
+
type: "circle",
|
|
78545
|
+
x: x0 + (x1 - x0) / 2,
|
|
78546
|
+
y: y0 + (y1 - y0) / 2,
|
|
78547
|
+
radius: Math.min(x1 - x0, y1 - y0) / 2
|
|
78548
|
+
});
|
|
78549
|
+
const key = sets.toString(),
|
|
78460
78550
|
textCenter = textCenters[key],
|
|
78461
78551
|
basicDatum = Object.assign(Object.assign({}, area), {
|
|
78462
78552
|
datum: area,
|
|
@@ -80921,7 +81011,6 @@ class FunnelSeries extends BaseSeries {
|
|
|
80921
81011
|
if (this._spec.isTransform) {
|
|
80922
81012
|
this._funnelTransformMark = this._createMark(Object.assign(Object.assign({}, FunnelSeries.mark.transform), { name: this._transformMarkName, type: this._transformMarkType }), {
|
|
80923
81013
|
themeSpec: (_b = this._theme) === null || _b === void 0 ? void 0 : _b.transform,
|
|
80924
|
-
skipBeforeLayouted: true,
|
|
80925
81014
|
noSeparateStyle: true
|
|
80926
81015
|
});
|
|
80927
81016
|
if (this._funnelTransformMark) {
|
|
@@ -80934,7 +81023,6 @@ class FunnelSeries extends BaseSeries {
|
|
|
80934
81023
|
this._funnelOuterLabelMark.label = this._createMark(FunnelSeries.mark.outerLabel, {
|
|
80935
81024
|
themeSpec: (_h = this._theme) === null || _h === void 0 ? void 0 : _h.outerLabel,
|
|
80936
81025
|
markSpec: this._spec.outerLabel,
|
|
80937
|
-
skipBeforeLayouted: true,
|
|
80938
81026
|
noSeparateStyle: true,
|
|
80939
81027
|
parent: false
|
|
80940
81028
|
});
|
|
@@ -82842,380 +82930,6 @@ class SankeySeries extends CartesianSeries {
|
|
|
82842
82930
|
}
|
|
82843
82931
|
}
|
|
82844
82932
|
};
|
|
82845
|
-
this._handleClearEmpty = () => {
|
|
82846
|
-
var _a, _b;
|
|
82847
|
-
if (!this._needClear) {
|
|
82848
|
-
return;
|
|
82849
|
-
}
|
|
82850
|
-
const allNodeElements = (_a = this._nodeMark) === null || _a === void 0 ? void 0 : _a.getGraphics();
|
|
82851
|
-
if (!allNodeElements || !allNodeElements.length) {
|
|
82852
|
-
return;
|
|
82853
|
-
}
|
|
82854
|
-
const allLinkElements = (_b = this._linkMark) === null || _b === void 0 ? void 0 : _b.getGraphics();
|
|
82855
|
-
if (!allLinkElements || !allLinkElements.length) {
|
|
82856
|
-
return;
|
|
82857
|
-
}
|
|
82858
|
-
allNodeElements.forEach(el => {
|
|
82859
|
-
el.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS);
|
|
82860
|
-
el.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE);
|
|
82861
|
-
});
|
|
82862
|
-
allLinkElements.forEach(el => {
|
|
82863
|
-
el.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS);
|
|
82864
|
-
el.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE);
|
|
82865
|
-
});
|
|
82866
|
-
this._needClear = false;
|
|
82867
|
-
};
|
|
82868
|
-
this._handleNodeAdjacencyClick = (graphic) => {
|
|
82869
|
-
const nodeDatum = getDatumOfGraphic(graphic);
|
|
82870
|
-
const highlightNodes = [nodeDatum.key];
|
|
82871
|
-
if (this._linkMark) {
|
|
82872
|
-
const allLinkElements = this._linkMark.getGraphics();
|
|
82873
|
-
if (!allLinkElements || !allLinkElements.length) {
|
|
82874
|
-
return;
|
|
82875
|
-
}
|
|
82876
|
-
allLinkElements.forEach((linkEl, i) => {
|
|
82877
|
-
const linkDatum = getDatumOfGraphic(linkEl);
|
|
82878
|
-
if (linkDatum.source === nodeDatum.key) {
|
|
82879
|
-
if (!highlightNodes.includes(linkDatum.target)) {
|
|
82880
|
-
highlightNodes.push(linkDatum.target);
|
|
82881
|
-
}
|
|
82882
|
-
linkEl.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE);
|
|
82883
|
-
linkEl.addState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS, true);
|
|
82884
|
-
}
|
|
82885
|
-
else if (linkDatum.target === nodeDatum.key) {
|
|
82886
|
-
if (!highlightNodes.includes(linkDatum.source)) {
|
|
82887
|
-
highlightNodes.push(linkDatum.source);
|
|
82888
|
-
}
|
|
82889
|
-
linkEl.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE);
|
|
82890
|
-
linkEl.addState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS, true);
|
|
82891
|
-
}
|
|
82892
|
-
else {
|
|
82893
|
-
linkEl.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS);
|
|
82894
|
-
linkEl.addState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE, true);
|
|
82895
|
-
}
|
|
82896
|
-
});
|
|
82897
|
-
}
|
|
82898
|
-
if (this._nodeMark) {
|
|
82899
|
-
this._highLightElements(this._nodeMark.getGraphics(), highlightNodes);
|
|
82900
|
-
}
|
|
82901
|
-
this._needClear = true;
|
|
82902
|
-
};
|
|
82903
|
-
this._handleLinkAdjacencyClick = (graphic) => {
|
|
82904
|
-
const curLinkDatum = getDatumOfGraphic(graphic);
|
|
82905
|
-
const highlightNodes = [curLinkDatum.source, curLinkDatum.target];
|
|
82906
|
-
if (this._linkMark) {
|
|
82907
|
-
const allLinkElements = this._linkMark.getGraphics();
|
|
82908
|
-
if (!allLinkElements || !allLinkElements.length) {
|
|
82909
|
-
return;
|
|
82910
|
-
}
|
|
82911
|
-
allLinkElements.forEach(linkEl => {
|
|
82912
|
-
if (linkEl === graphic) {
|
|
82913
|
-
linkEl.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE);
|
|
82914
|
-
addRuntimeState(linkEl, STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS, { ratio: 1 });
|
|
82915
|
-
}
|
|
82916
|
-
else {
|
|
82917
|
-
linkEl.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS);
|
|
82918
|
-
linkEl.addState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE, true);
|
|
82919
|
-
}
|
|
82920
|
-
});
|
|
82921
|
-
}
|
|
82922
|
-
if (this._nodeMark) {
|
|
82923
|
-
this._highLightElements(this._nodeMark.getGraphics(), highlightNodes);
|
|
82924
|
-
}
|
|
82925
|
-
this._needClear = true;
|
|
82926
|
-
};
|
|
82927
|
-
this._handleNodeRelatedClick = (graphic) => {
|
|
82928
|
-
var _a;
|
|
82929
|
-
const nodeDatum = getDatumOfGraphic(graphic);
|
|
82930
|
-
const allNodeElements = this._nodeMark.getGraphics();
|
|
82931
|
-
if (!allNodeElements || !allNodeElements.length) {
|
|
82932
|
-
return;
|
|
82933
|
-
}
|
|
82934
|
-
const allLinkElements = this._linkMark.getGraphics();
|
|
82935
|
-
if (!allLinkElements || !allLinkElements.length) {
|
|
82936
|
-
return;
|
|
82937
|
-
}
|
|
82938
|
-
const father = ((_a = getDatumOfGraphic(allLinkElements[0])) === null || _a === void 0 ? void 0 : _a.parents) ? 'parents' : 'source';
|
|
82939
|
-
if (father === 'source') {
|
|
82940
|
-
const highlightNodes = [nodeDatum.key];
|
|
82941
|
-
const highlightLinks = [];
|
|
82942
|
-
allLinkElements.forEach((linkEl, i) => {
|
|
82943
|
-
var _a, _b, _c, _d;
|
|
82944
|
-
const linkDatum = getDatumOfGraphic(linkEl);
|
|
82945
|
-
const father = (linkDatum === null || linkDatum === void 0 ? void 0 : linkDatum.parents) ? 'parents' : 'source';
|
|
82946
|
-
if (array(linkDatum[father]).includes(nodeDatum.key)) {
|
|
82947
|
-
if (!highlightLinks.includes((_a = linkDatum.key) !== null && _a !== void 0 ? _a : linkDatum.index)) {
|
|
82948
|
-
highlightLinks.push((_b = linkDatum.key) !== null && _b !== void 0 ? _b : linkDatum.index);
|
|
82949
|
-
}
|
|
82950
|
-
if (!highlightNodes.includes(linkDatum.source)) {
|
|
82951
|
-
highlightNodes.push(linkDatum.source);
|
|
82952
|
-
}
|
|
82953
|
-
if (!highlightNodes.includes(linkDatum.target)) {
|
|
82954
|
-
highlightNodes.push(linkDatum.target);
|
|
82955
|
-
const targetNode = allNodeElements.find(nodeElement => {
|
|
82956
|
-
return nodeElement.data[0].key === linkDatum.target;
|
|
82957
|
-
});
|
|
82958
|
-
let targetNodeSourceLinks = targetNode.data[0].sourceLinks;
|
|
82959
|
-
while ((targetNodeSourceLinks === null || targetNodeSourceLinks === void 0 ? void 0 : targetNodeSourceLinks.length) > 0) {
|
|
82960
|
-
const newTargetNodeSourceLinks = [];
|
|
82961
|
-
targetNodeSourceLinks.forEach((targetNodeSourceLinkDatum) => {
|
|
82962
|
-
var _a, _b;
|
|
82963
|
-
if (!highlightLinks.includes((_a = targetNodeSourceLinkDatum.key) !== null && _a !== void 0 ? _a : targetNodeSourceLinkDatum.index)) {
|
|
82964
|
-
highlightLinks.push((_b = targetNodeSourceLinkDatum.key) !== null && _b !== void 0 ? _b : targetNodeSourceLinkDatum.index);
|
|
82965
|
-
if (!highlightNodes.includes(targetNodeSourceLinkDatum.target)) {
|
|
82966
|
-
highlightNodes.push(targetNodeSourceLinkDatum.target);
|
|
82967
|
-
const sourceNodeTemp = allNodeElements.find(nodeElement => {
|
|
82968
|
-
return nodeElement.data[0].key === targetNodeSourceLinkDatum.target;
|
|
82969
|
-
});
|
|
82970
|
-
newTargetNodeSourceLinks.push(sourceNodeTemp.data[0].targetLinks);
|
|
82971
|
-
}
|
|
82972
|
-
else {
|
|
82973
|
-
return;
|
|
82974
|
-
}
|
|
82975
|
-
}
|
|
82976
|
-
else {
|
|
82977
|
-
return;
|
|
82978
|
-
}
|
|
82979
|
-
});
|
|
82980
|
-
targetNodeSourceLinks = newTargetNodeSourceLinks;
|
|
82981
|
-
return;
|
|
82982
|
-
}
|
|
82983
|
-
}
|
|
82984
|
-
}
|
|
82985
|
-
else if (linkDatum.target === nodeDatum.key) {
|
|
82986
|
-
if (!highlightLinks.includes((_c = linkDatum.key) !== null && _c !== void 0 ? _c : linkDatum.index)) {
|
|
82987
|
-
highlightLinks.push((_d = linkDatum.key) !== null && _d !== void 0 ? _d : linkDatum.index);
|
|
82988
|
-
}
|
|
82989
|
-
if (!highlightNodes.includes(linkDatum.source)) {
|
|
82990
|
-
highlightNodes.push(linkDatum.source);
|
|
82991
|
-
const sourceNode = allNodeElements.find(nodeElement => {
|
|
82992
|
-
return nodeElement.data[0].key === linkDatum.source;
|
|
82993
|
-
});
|
|
82994
|
-
let sourceNodeTargetLinks = sourceNode.data[0].targetLinks;
|
|
82995
|
-
while ((sourceNodeTargetLinks === null || sourceNodeTargetLinks === void 0 ? void 0 : sourceNodeTargetLinks.length) > 0) {
|
|
82996
|
-
const newSourceNodeTargetLinks = [];
|
|
82997
|
-
sourceNodeTargetLinks.forEach((sourceNodeTargetLinkDatum) => {
|
|
82998
|
-
var _a, _b;
|
|
82999
|
-
if (!highlightLinks.includes((_a = sourceNodeTargetLinkDatum.key) !== null && _a !== void 0 ? _a : sourceNodeTargetLinkDatum.index)) {
|
|
83000
|
-
highlightLinks.push((_b = sourceNodeTargetLinkDatum.key) !== null && _b !== void 0 ? _b : sourceNodeTargetLinkDatum.index);
|
|
83001
|
-
if (!highlightNodes.includes(sourceNodeTargetLinkDatum.source)) {
|
|
83002
|
-
highlightNodes.push(sourceNodeTargetLinkDatum.source);
|
|
83003
|
-
const sourceNodeTemp = allNodeElements.find(nodeElement => {
|
|
83004
|
-
return nodeElement.data[0].key === sourceNodeTargetLinkDatum.source;
|
|
83005
|
-
});
|
|
83006
|
-
newSourceNodeTargetLinks.push(sourceNodeTemp.data[0].targetLinks);
|
|
83007
|
-
}
|
|
83008
|
-
else {
|
|
83009
|
-
return;
|
|
83010
|
-
}
|
|
83011
|
-
}
|
|
83012
|
-
else {
|
|
83013
|
-
return;
|
|
83014
|
-
}
|
|
83015
|
-
});
|
|
83016
|
-
sourceNodeTargetLinks = newSourceNodeTargetLinks;
|
|
83017
|
-
return;
|
|
83018
|
-
}
|
|
83019
|
-
}
|
|
83020
|
-
}
|
|
83021
|
-
});
|
|
83022
|
-
if (this._linkMark) {
|
|
83023
|
-
const allLinkElements = this._linkMark.getGraphics();
|
|
83024
|
-
if (!allLinkElements || !allLinkElements.length) {
|
|
83025
|
-
return;
|
|
83026
|
-
}
|
|
83027
|
-
allLinkElements.forEach((linkEl, i) => {
|
|
83028
|
-
var _a;
|
|
83029
|
-
const linkDatum = getDatumOfGraphic(linkEl);
|
|
83030
|
-
if (highlightLinks.includes((_a = linkDatum.key) !== null && _a !== void 0 ? _a : linkDatum.index)) {
|
|
83031
|
-
linkEl.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE);
|
|
83032
|
-
linkEl.addState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS, true);
|
|
83033
|
-
}
|
|
83034
|
-
else {
|
|
83035
|
-
linkEl.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS);
|
|
83036
|
-
linkEl.addState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE, true);
|
|
83037
|
-
}
|
|
83038
|
-
});
|
|
83039
|
-
}
|
|
83040
|
-
if (this._nodeMark) {
|
|
83041
|
-
this._highLightElements(this._nodeMark.getGraphics(), highlightNodes);
|
|
83042
|
-
}
|
|
83043
|
-
}
|
|
83044
|
-
else {
|
|
83045
|
-
const highlightNodes = [nodeDatum.key];
|
|
83046
|
-
const upstreamLinks = nodeDatum.targetLinks.reduce((res, link) => {
|
|
83047
|
-
const dividedLinks = array(link.datum);
|
|
83048
|
-
dividedLinks.forEach(dividedLink => {
|
|
83049
|
-
const parents = dividedLink.parents;
|
|
83050
|
-
const len = parents.length;
|
|
83051
|
-
for (let i = 0; i < len; i++) {
|
|
83052
|
-
const source = parents[i].key;
|
|
83053
|
-
const target = parents[i + 1] ? parents[i + 1].key : nodeDatum.key;
|
|
83054
|
-
const value = dividedLink.value;
|
|
83055
|
-
const existingItem = res.find(item => item.source === source && item.target === target);
|
|
83056
|
-
if (existingItem) {
|
|
83057
|
-
existingItem.value += value;
|
|
83058
|
-
}
|
|
83059
|
-
else {
|
|
83060
|
-
res.push({ source, target, value });
|
|
83061
|
-
}
|
|
83062
|
-
}
|
|
83063
|
-
});
|
|
83064
|
-
return res;
|
|
83065
|
-
}, []);
|
|
83066
|
-
allLinkElements.forEach((linkEl, i) => {
|
|
83067
|
-
const linkDatum = getDatumOfGraphic(linkEl);
|
|
83068
|
-
const originalDatum = linkDatum.datum;
|
|
83069
|
-
const selectedDatum = originalDatum
|
|
83070
|
-
? originalDatum.filter((entry) => entry[father].some((par) => par.key === nodeDatum.key))
|
|
83071
|
-
: null;
|
|
83072
|
-
const upSelectedLink = upstreamLinks.find((upLink) => upLink.source === linkDatum.source && upLink.target === linkDatum.target);
|
|
83073
|
-
if (selectedDatum && selectedDatum.length) {
|
|
83074
|
-
if (!highlightNodes.includes(linkDatum.source)) {
|
|
83075
|
-
highlightNodes.push(linkDatum.source);
|
|
83076
|
-
}
|
|
83077
|
-
if (!highlightNodes.includes(linkDatum.target)) {
|
|
83078
|
-
highlightNodes.push(linkDatum.target);
|
|
83079
|
-
}
|
|
83080
|
-
const val = selectedDatum.reduce((sum, d) => {
|
|
83081
|
-
return (sum += d.value);
|
|
83082
|
-
}, 0);
|
|
83083
|
-
const ratio = val / linkDatum.value;
|
|
83084
|
-
linkEl.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE);
|
|
83085
|
-
addRuntimeState(linkEl, STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS, { ratio });
|
|
83086
|
-
return;
|
|
83087
|
-
}
|
|
83088
|
-
if (upSelectedLink) {
|
|
83089
|
-
if (!highlightNodes.includes(linkDatum.source)) {
|
|
83090
|
-
highlightNodes.push(linkDatum.source);
|
|
83091
|
-
}
|
|
83092
|
-
if (!highlightNodes.includes(linkDatum.target)) {
|
|
83093
|
-
highlightNodes.push(linkDatum.target);
|
|
83094
|
-
}
|
|
83095
|
-
linkEl.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE);
|
|
83096
|
-
addRuntimeState(linkEl, STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS, {
|
|
83097
|
-
ratio: upSelectedLink.value / linkDatum.value
|
|
83098
|
-
});
|
|
83099
|
-
return;
|
|
83100
|
-
}
|
|
83101
|
-
linkEl.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS);
|
|
83102
|
-
linkEl.addState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE, true);
|
|
83103
|
-
return;
|
|
83104
|
-
});
|
|
83105
|
-
if (this._nodeMark) {
|
|
83106
|
-
this._highLightElements(this._nodeMark.getGraphics(), highlightNodes);
|
|
83107
|
-
}
|
|
83108
|
-
}
|
|
83109
|
-
this._needClear = true;
|
|
83110
|
-
};
|
|
83111
|
-
this._handleLinkRelatedClick = (graphic) => {
|
|
83112
|
-
const allNodeElements = this._nodeMark.getGraphics();
|
|
83113
|
-
if (!allNodeElements || !allNodeElements.length) {
|
|
83114
|
-
return;
|
|
83115
|
-
}
|
|
83116
|
-
const allLinkElements = this._linkMark.getGraphics();
|
|
83117
|
-
if (!allLinkElements || !allLinkElements.length) {
|
|
83118
|
-
return;
|
|
83119
|
-
}
|
|
83120
|
-
const father = getDatumOfGraphic(graphic) ? 'parents' : 'source';
|
|
83121
|
-
if (father === 'source') {
|
|
83122
|
-
if (this._linkMark) {
|
|
83123
|
-
allLinkElements.forEach(linkEl => {
|
|
83124
|
-
linkEl.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS);
|
|
83125
|
-
linkEl.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE);
|
|
83126
|
-
});
|
|
83127
|
-
}
|
|
83128
|
-
if (this._nodeMark) {
|
|
83129
|
-
allNodeElements.forEach(el => {
|
|
83130
|
-
el.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS);
|
|
83131
|
-
el.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE);
|
|
83132
|
-
});
|
|
83133
|
-
}
|
|
83134
|
-
}
|
|
83135
|
-
else {
|
|
83136
|
-
const curLinkDatum = getDatumOfGraphic(graphic);
|
|
83137
|
-
const highlightNodes = [curLinkDatum.source, curLinkDatum.target];
|
|
83138
|
-
const upstreamLinks = [];
|
|
83139
|
-
const dividedLinks = array(curLinkDatum.datum);
|
|
83140
|
-
dividedLinks.forEach(dividedLink => {
|
|
83141
|
-
const parents = dividedLink.parents;
|
|
83142
|
-
const len = parents.length;
|
|
83143
|
-
for (let i = 0; i < len - 1; i++) {
|
|
83144
|
-
const source = parents[i].key;
|
|
83145
|
-
const target = parents[i + 1].key;
|
|
83146
|
-
const value = dividedLink.value;
|
|
83147
|
-
const existingItem = upstreamLinks.find(item => item.source === source && item.target === target);
|
|
83148
|
-
upstreamLinks.push({
|
|
83149
|
-
source: parents[i].key,
|
|
83150
|
-
target: parents[i + 1].key,
|
|
83151
|
-
value: dividedLink.value
|
|
83152
|
-
});
|
|
83153
|
-
if (existingItem) {
|
|
83154
|
-
existingItem.value += value;
|
|
83155
|
-
}
|
|
83156
|
-
else {
|
|
83157
|
-
upstreamLinks.push({ source, target, value });
|
|
83158
|
-
}
|
|
83159
|
-
}
|
|
83160
|
-
});
|
|
83161
|
-
allLinkElements.forEach(linkEl => {
|
|
83162
|
-
const linkDatum = getDatumOfGraphic(linkEl);
|
|
83163
|
-
const originalDatum = linkDatum.datum;
|
|
83164
|
-
if (linkDatum.source === curLinkDatum.source && linkDatum.target === curLinkDatum.target) {
|
|
83165
|
-
linkEl.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE);
|
|
83166
|
-
addRuntimeState(linkEl, STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS, { ratio: 1 });
|
|
83167
|
-
return;
|
|
83168
|
-
}
|
|
83169
|
-
const selectedDatum = originalDatum
|
|
83170
|
-
? originalDatum.filter((entry) => {
|
|
83171
|
-
const parentKeysList = entry.parents.map((item) => item.key);
|
|
83172
|
-
return parentKeysList.includes(curLinkDatum.source) && parentKeysList.includes(curLinkDatum.target);
|
|
83173
|
-
})
|
|
83174
|
-
: null;
|
|
83175
|
-
if (selectedDatum && selectedDatum.length) {
|
|
83176
|
-
if (!highlightNodes.includes(linkDatum.source)) {
|
|
83177
|
-
highlightNodes.push(linkDatum.source);
|
|
83178
|
-
}
|
|
83179
|
-
if (!highlightNodes.includes(linkDatum.target)) {
|
|
83180
|
-
highlightNodes.push(linkDatum.target);
|
|
83181
|
-
}
|
|
83182
|
-
const val = selectedDatum
|
|
83183
|
-
.filter((entry) => {
|
|
83184
|
-
return entry.parents.some((par, index) => {
|
|
83185
|
-
var _a;
|
|
83186
|
-
return par.key === curLinkDatum.source && ((_a = entry.parents[index + 1]) === null || _a === void 0 ? void 0 : _a.key) === curLinkDatum.target;
|
|
83187
|
-
});
|
|
83188
|
-
})
|
|
83189
|
-
.reduce((sum, d) => {
|
|
83190
|
-
return (sum += d.value);
|
|
83191
|
-
}, 0);
|
|
83192
|
-
const ratio = val / linkDatum.value;
|
|
83193
|
-
linkEl.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE);
|
|
83194
|
-
addRuntimeState(linkEl, STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS, { ratio });
|
|
83195
|
-
return;
|
|
83196
|
-
}
|
|
83197
|
-
const upSelectedLink = upstreamLinks.find((upLink) => upLink.source === linkDatum.source && upLink.target === linkDatum.target);
|
|
83198
|
-
if (upSelectedLink) {
|
|
83199
|
-
if (!highlightNodes.includes(linkDatum.source)) {
|
|
83200
|
-
highlightNodes.push(linkDatum.source);
|
|
83201
|
-
}
|
|
83202
|
-
if (!highlightNodes.includes(linkDatum.target)) {
|
|
83203
|
-
highlightNodes.push(linkDatum.target);
|
|
83204
|
-
}
|
|
83205
|
-
linkEl.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE);
|
|
83206
|
-
addRuntimeState(linkEl, STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS, {
|
|
83207
|
-
ratio: upSelectedLink.value / linkDatum.value
|
|
83208
|
-
});
|
|
83209
|
-
return;
|
|
83210
|
-
}
|
|
83211
|
-
linkEl.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS);
|
|
83212
|
-
linkEl.addState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE, true);
|
|
83213
|
-
return;
|
|
83214
|
-
});
|
|
83215
|
-
this._highLightElements(allNodeElements, highlightNodes);
|
|
83216
|
-
}
|
|
83217
|
-
this._needClear = true;
|
|
83218
|
-
};
|
|
83219
82933
|
}
|
|
83220
82934
|
get direction() {
|
|
83221
82935
|
var _a;
|
|
@@ -83505,6 +83219,380 @@ class SankeySeries extends CartesianSeries {
|
|
|
83505
83219
|
linksSeriesDataUpdate() {
|
|
83506
83220
|
this._linkMark.getData().updateData();
|
|
83507
83221
|
}
|
|
83222
|
+
_handleClearEmpty() {
|
|
83223
|
+
var _a, _b;
|
|
83224
|
+
if (!this._needClear) {
|
|
83225
|
+
return;
|
|
83226
|
+
}
|
|
83227
|
+
const allNodeElements = (_a = this._nodeMark) === null || _a === void 0 ? void 0 : _a.getGraphics();
|
|
83228
|
+
if (!allNodeElements || !allNodeElements.length) {
|
|
83229
|
+
return;
|
|
83230
|
+
}
|
|
83231
|
+
const allLinkElements = (_b = this._linkMark) === null || _b === void 0 ? void 0 : _b.getGraphics();
|
|
83232
|
+
if (!allLinkElements || !allLinkElements.length) {
|
|
83233
|
+
return;
|
|
83234
|
+
}
|
|
83235
|
+
allNodeElements.forEach(el => {
|
|
83236
|
+
el.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS);
|
|
83237
|
+
el.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE);
|
|
83238
|
+
});
|
|
83239
|
+
allLinkElements.forEach(el => {
|
|
83240
|
+
el.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS);
|
|
83241
|
+
el.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE);
|
|
83242
|
+
});
|
|
83243
|
+
this._needClear = false;
|
|
83244
|
+
}
|
|
83245
|
+
_handleNodeAdjacencyClick(graphic) {
|
|
83246
|
+
const nodeDatum = getDatumOfGraphic(graphic);
|
|
83247
|
+
const highlightNodes = [nodeDatum.key];
|
|
83248
|
+
if (this._linkMark) {
|
|
83249
|
+
const allLinkElements = this._linkMark.getGraphics();
|
|
83250
|
+
if (!allLinkElements || !allLinkElements.length) {
|
|
83251
|
+
return;
|
|
83252
|
+
}
|
|
83253
|
+
allLinkElements.forEach((linkEl, i) => {
|
|
83254
|
+
const linkDatum = getDatumOfGraphic(linkEl);
|
|
83255
|
+
if (linkDatum.source === nodeDatum.key) {
|
|
83256
|
+
if (!highlightNodes.includes(linkDatum.target)) {
|
|
83257
|
+
highlightNodes.push(linkDatum.target);
|
|
83258
|
+
}
|
|
83259
|
+
linkEl.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE);
|
|
83260
|
+
linkEl.addState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS, true);
|
|
83261
|
+
}
|
|
83262
|
+
else if (linkDatum.target === nodeDatum.key) {
|
|
83263
|
+
if (!highlightNodes.includes(linkDatum.source)) {
|
|
83264
|
+
highlightNodes.push(linkDatum.source);
|
|
83265
|
+
}
|
|
83266
|
+
linkEl.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE);
|
|
83267
|
+
linkEl.addState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS, true);
|
|
83268
|
+
}
|
|
83269
|
+
else {
|
|
83270
|
+
linkEl.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS);
|
|
83271
|
+
linkEl.addState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE, true);
|
|
83272
|
+
}
|
|
83273
|
+
});
|
|
83274
|
+
}
|
|
83275
|
+
if (this._nodeMark) {
|
|
83276
|
+
this._highLightElements(this._nodeMark.getGraphics(), highlightNodes);
|
|
83277
|
+
}
|
|
83278
|
+
this._needClear = true;
|
|
83279
|
+
}
|
|
83280
|
+
_handleLinkAdjacencyClick(graphic) {
|
|
83281
|
+
const curLinkDatum = getDatumOfGraphic(graphic);
|
|
83282
|
+
const highlightNodes = [curLinkDatum.source, curLinkDatum.target];
|
|
83283
|
+
if (this._linkMark) {
|
|
83284
|
+
const allLinkElements = this._linkMark.getGraphics();
|
|
83285
|
+
if (!allLinkElements || !allLinkElements.length) {
|
|
83286
|
+
return;
|
|
83287
|
+
}
|
|
83288
|
+
allLinkElements.forEach(linkEl => {
|
|
83289
|
+
if (linkEl === graphic) {
|
|
83290
|
+
linkEl.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE);
|
|
83291
|
+
addRuntimeState(linkEl, STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS, { ratio: 1 });
|
|
83292
|
+
}
|
|
83293
|
+
else {
|
|
83294
|
+
linkEl.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS);
|
|
83295
|
+
linkEl.addState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE, true);
|
|
83296
|
+
}
|
|
83297
|
+
});
|
|
83298
|
+
}
|
|
83299
|
+
if (this._nodeMark) {
|
|
83300
|
+
this._highLightElements(this._nodeMark.getGraphics(), highlightNodes);
|
|
83301
|
+
}
|
|
83302
|
+
this._needClear = true;
|
|
83303
|
+
}
|
|
83304
|
+
_handleNodeRelatedClick(graphic) {
|
|
83305
|
+
var _a;
|
|
83306
|
+
const nodeDatum = getDatumOfGraphic(graphic);
|
|
83307
|
+
const allNodeElements = this._nodeMark.getGraphics();
|
|
83308
|
+
if (!allNodeElements || !allNodeElements.length) {
|
|
83309
|
+
return;
|
|
83310
|
+
}
|
|
83311
|
+
const allLinkElements = this._linkMark.getGraphics();
|
|
83312
|
+
if (!allLinkElements || !allLinkElements.length) {
|
|
83313
|
+
return;
|
|
83314
|
+
}
|
|
83315
|
+
const father = ((_a = getDatumOfGraphic(allLinkElements[0])) === null || _a === void 0 ? void 0 : _a.parents) ? 'parents' : 'source';
|
|
83316
|
+
if (father === 'source') {
|
|
83317
|
+
const highlightNodes = [nodeDatum.key];
|
|
83318
|
+
const highlightLinks = [];
|
|
83319
|
+
allLinkElements.forEach((linkEl, i) => {
|
|
83320
|
+
var _a, _b, _c, _d;
|
|
83321
|
+
const linkDatum = getDatumOfGraphic(linkEl);
|
|
83322
|
+
const father = (linkDatum === null || linkDatum === void 0 ? void 0 : linkDatum.parents) ? 'parents' : 'source';
|
|
83323
|
+
if (array(linkDatum[father]).includes(nodeDatum.key)) {
|
|
83324
|
+
if (!highlightLinks.includes((_a = linkDatum.key) !== null && _a !== void 0 ? _a : linkDatum.index)) {
|
|
83325
|
+
highlightLinks.push((_b = linkDatum.key) !== null && _b !== void 0 ? _b : linkDatum.index);
|
|
83326
|
+
}
|
|
83327
|
+
if (!highlightNodes.includes(linkDatum.source)) {
|
|
83328
|
+
highlightNodes.push(linkDatum.source);
|
|
83329
|
+
}
|
|
83330
|
+
if (!highlightNodes.includes(linkDatum.target)) {
|
|
83331
|
+
highlightNodes.push(linkDatum.target);
|
|
83332
|
+
const targetNode = allNodeElements.find(nodeElement => {
|
|
83333
|
+
return nodeElement.data[0].key === linkDatum.target;
|
|
83334
|
+
});
|
|
83335
|
+
let targetNodeSourceLinks = targetNode.data[0].sourceLinks;
|
|
83336
|
+
while ((targetNodeSourceLinks === null || targetNodeSourceLinks === void 0 ? void 0 : targetNodeSourceLinks.length) > 0) {
|
|
83337
|
+
const newTargetNodeSourceLinks = [];
|
|
83338
|
+
targetNodeSourceLinks.forEach((targetNodeSourceLinkDatum) => {
|
|
83339
|
+
var _a, _b;
|
|
83340
|
+
if (!highlightLinks.includes((_a = targetNodeSourceLinkDatum.key) !== null && _a !== void 0 ? _a : targetNodeSourceLinkDatum.index)) {
|
|
83341
|
+
highlightLinks.push((_b = targetNodeSourceLinkDatum.key) !== null && _b !== void 0 ? _b : targetNodeSourceLinkDatum.index);
|
|
83342
|
+
if (!highlightNodes.includes(targetNodeSourceLinkDatum.target)) {
|
|
83343
|
+
highlightNodes.push(targetNodeSourceLinkDatum.target);
|
|
83344
|
+
const sourceNodeTemp = allNodeElements.find(nodeElement => {
|
|
83345
|
+
return nodeElement.data[0].key === targetNodeSourceLinkDatum.target;
|
|
83346
|
+
});
|
|
83347
|
+
newTargetNodeSourceLinks.push(sourceNodeTemp.data[0].targetLinks);
|
|
83348
|
+
}
|
|
83349
|
+
else {
|
|
83350
|
+
return;
|
|
83351
|
+
}
|
|
83352
|
+
}
|
|
83353
|
+
else {
|
|
83354
|
+
return;
|
|
83355
|
+
}
|
|
83356
|
+
});
|
|
83357
|
+
targetNodeSourceLinks = newTargetNodeSourceLinks;
|
|
83358
|
+
return;
|
|
83359
|
+
}
|
|
83360
|
+
}
|
|
83361
|
+
}
|
|
83362
|
+
else if (linkDatum.target === nodeDatum.key) {
|
|
83363
|
+
if (!highlightLinks.includes((_c = linkDatum.key) !== null && _c !== void 0 ? _c : linkDatum.index)) {
|
|
83364
|
+
highlightLinks.push((_d = linkDatum.key) !== null && _d !== void 0 ? _d : linkDatum.index);
|
|
83365
|
+
}
|
|
83366
|
+
if (!highlightNodes.includes(linkDatum.source)) {
|
|
83367
|
+
highlightNodes.push(linkDatum.source);
|
|
83368
|
+
const sourceNode = allNodeElements.find(nodeElement => {
|
|
83369
|
+
return nodeElement.data[0].key === linkDatum.source;
|
|
83370
|
+
});
|
|
83371
|
+
let sourceNodeTargetLinks = sourceNode.data[0].targetLinks;
|
|
83372
|
+
while ((sourceNodeTargetLinks === null || sourceNodeTargetLinks === void 0 ? void 0 : sourceNodeTargetLinks.length) > 0) {
|
|
83373
|
+
const newSourceNodeTargetLinks = [];
|
|
83374
|
+
sourceNodeTargetLinks.forEach((sourceNodeTargetLinkDatum) => {
|
|
83375
|
+
var _a, _b;
|
|
83376
|
+
if (!highlightLinks.includes((_a = sourceNodeTargetLinkDatum.key) !== null && _a !== void 0 ? _a : sourceNodeTargetLinkDatum.index)) {
|
|
83377
|
+
highlightLinks.push((_b = sourceNodeTargetLinkDatum.key) !== null && _b !== void 0 ? _b : sourceNodeTargetLinkDatum.index);
|
|
83378
|
+
if (!highlightNodes.includes(sourceNodeTargetLinkDatum.source)) {
|
|
83379
|
+
highlightNodes.push(sourceNodeTargetLinkDatum.source);
|
|
83380
|
+
const sourceNodeTemp = allNodeElements.find(nodeElement => {
|
|
83381
|
+
return nodeElement.data[0].key === sourceNodeTargetLinkDatum.source;
|
|
83382
|
+
});
|
|
83383
|
+
newSourceNodeTargetLinks.push(sourceNodeTemp.data[0].targetLinks);
|
|
83384
|
+
}
|
|
83385
|
+
else {
|
|
83386
|
+
return;
|
|
83387
|
+
}
|
|
83388
|
+
}
|
|
83389
|
+
else {
|
|
83390
|
+
return;
|
|
83391
|
+
}
|
|
83392
|
+
});
|
|
83393
|
+
sourceNodeTargetLinks = newSourceNodeTargetLinks;
|
|
83394
|
+
return;
|
|
83395
|
+
}
|
|
83396
|
+
}
|
|
83397
|
+
}
|
|
83398
|
+
});
|
|
83399
|
+
if (this._linkMark) {
|
|
83400
|
+
const allLinkElements = this._linkMark.getGraphics();
|
|
83401
|
+
if (!allLinkElements || !allLinkElements.length) {
|
|
83402
|
+
return;
|
|
83403
|
+
}
|
|
83404
|
+
allLinkElements.forEach((linkEl, i) => {
|
|
83405
|
+
var _a;
|
|
83406
|
+
const linkDatum = getDatumOfGraphic(linkEl);
|
|
83407
|
+
if (highlightLinks.includes((_a = linkDatum.key) !== null && _a !== void 0 ? _a : linkDatum.index)) {
|
|
83408
|
+
linkEl.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE);
|
|
83409
|
+
linkEl.addState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS, true);
|
|
83410
|
+
}
|
|
83411
|
+
else {
|
|
83412
|
+
linkEl.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS);
|
|
83413
|
+
linkEl.addState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE, true);
|
|
83414
|
+
}
|
|
83415
|
+
});
|
|
83416
|
+
}
|
|
83417
|
+
if (this._nodeMark) {
|
|
83418
|
+
this._highLightElements(this._nodeMark.getGraphics(), highlightNodes);
|
|
83419
|
+
}
|
|
83420
|
+
}
|
|
83421
|
+
else {
|
|
83422
|
+
const highlightNodes = [nodeDatum.key];
|
|
83423
|
+
const upstreamLinks = nodeDatum.targetLinks.reduce((res, link) => {
|
|
83424
|
+
const dividedLinks = array(link.datum);
|
|
83425
|
+
dividedLinks.forEach(dividedLink => {
|
|
83426
|
+
const parents = dividedLink.parents;
|
|
83427
|
+
const len = parents.length;
|
|
83428
|
+
for (let i = 0; i < len; i++) {
|
|
83429
|
+
const source = parents[i].key;
|
|
83430
|
+
const target = parents[i + 1] ? parents[i + 1].key : nodeDatum.key;
|
|
83431
|
+
const value = dividedLink.value;
|
|
83432
|
+
const existingItem = res.find(item => item.source === source && item.target === target);
|
|
83433
|
+
if (existingItem) {
|
|
83434
|
+
existingItem.value += value;
|
|
83435
|
+
}
|
|
83436
|
+
else {
|
|
83437
|
+
res.push({ source, target, value });
|
|
83438
|
+
}
|
|
83439
|
+
}
|
|
83440
|
+
});
|
|
83441
|
+
return res;
|
|
83442
|
+
}, []);
|
|
83443
|
+
allLinkElements.forEach((linkEl, i) => {
|
|
83444
|
+
const linkDatum = getDatumOfGraphic(linkEl);
|
|
83445
|
+
const originalDatum = linkDatum.datum;
|
|
83446
|
+
const selectedDatum = originalDatum
|
|
83447
|
+
? originalDatum.filter((entry) => entry[father].some((par) => par.key === nodeDatum.key))
|
|
83448
|
+
: null;
|
|
83449
|
+
const upSelectedLink = upstreamLinks.find((upLink) => upLink.source === linkDatum.source && upLink.target === linkDatum.target);
|
|
83450
|
+
if (selectedDatum && selectedDatum.length) {
|
|
83451
|
+
if (!highlightNodes.includes(linkDatum.source)) {
|
|
83452
|
+
highlightNodes.push(linkDatum.source);
|
|
83453
|
+
}
|
|
83454
|
+
if (!highlightNodes.includes(linkDatum.target)) {
|
|
83455
|
+
highlightNodes.push(linkDatum.target);
|
|
83456
|
+
}
|
|
83457
|
+
const val = selectedDatum.reduce((sum, d) => {
|
|
83458
|
+
return (sum += d.value);
|
|
83459
|
+
}, 0);
|
|
83460
|
+
const ratio = val / linkDatum.value;
|
|
83461
|
+
linkEl.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE);
|
|
83462
|
+
addRuntimeState(linkEl, STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS, { ratio });
|
|
83463
|
+
return;
|
|
83464
|
+
}
|
|
83465
|
+
if (upSelectedLink) {
|
|
83466
|
+
if (!highlightNodes.includes(linkDatum.source)) {
|
|
83467
|
+
highlightNodes.push(linkDatum.source);
|
|
83468
|
+
}
|
|
83469
|
+
if (!highlightNodes.includes(linkDatum.target)) {
|
|
83470
|
+
highlightNodes.push(linkDatum.target);
|
|
83471
|
+
}
|
|
83472
|
+
linkEl.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE);
|
|
83473
|
+
addRuntimeState(linkEl, STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS, {
|
|
83474
|
+
ratio: upSelectedLink.value / linkDatum.value
|
|
83475
|
+
});
|
|
83476
|
+
return;
|
|
83477
|
+
}
|
|
83478
|
+
linkEl.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS);
|
|
83479
|
+
linkEl.addState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE, true);
|
|
83480
|
+
return;
|
|
83481
|
+
});
|
|
83482
|
+
if (this._nodeMark) {
|
|
83483
|
+
this._highLightElements(this._nodeMark.getGraphics(), highlightNodes);
|
|
83484
|
+
}
|
|
83485
|
+
}
|
|
83486
|
+
this._needClear = true;
|
|
83487
|
+
}
|
|
83488
|
+
_handleLinkRelatedClick(graphic) {
|
|
83489
|
+
const allNodeElements = this._nodeMark.getGraphics();
|
|
83490
|
+
if (!allNodeElements || !allNodeElements.length) {
|
|
83491
|
+
return;
|
|
83492
|
+
}
|
|
83493
|
+
const allLinkElements = this._linkMark.getGraphics();
|
|
83494
|
+
if (!allLinkElements || !allLinkElements.length) {
|
|
83495
|
+
return;
|
|
83496
|
+
}
|
|
83497
|
+
const father = getDatumOfGraphic(graphic) ? 'parents' : 'source';
|
|
83498
|
+
if (father === 'source') {
|
|
83499
|
+
if (this._linkMark) {
|
|
83500
|
+
allLinkElements.forEach(linkEl => {
|
|
83501
|
+
linkEl.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS);
|
|
83502
|
+
linkEl.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE);
|
|
83503
|
+
});
|
|
83504
|
+
}
|
|
83505
|
+
if (this._nodeMark) {
|
|
83506
|
+
allNodeElements.forEach(el => {
|
|
83507
|
+
el.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS);
|
|
83508
|
+
el.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE);
|
|
83509
|
+
});
|
|
83510
|
+
}
|
|
83511
|
+
}
|
|
83512
|
+
else {
|
|
83513
|
+
const curLinkDatum = getDatumOfGraphic(graphic);
|
|
83514
|
+
const highlightNodes = [curLinkDatum.source, curLinkDatum.target];
|
|
83515
|
+
const upstreamLinks = [];
|
|
83516
|
+
const dividedLinks = array(curLinkDatum.datum);
|
|
83517
|
+
dividedLinks.forEach(dividedLink => {
|
|
83518
|
+
const parents = dividedLink.parents;
|
|
83519
|
+
const len = parents.length;
|
|
83520
|
+
for (let i = 0; i < len - 1; i++) {
|
|
83521
|
+
const source = parents[i].key;
|
|
83522
|
+
const target = parents[i + 1].key;
|
|
83523
|
+
const value = dividedLink.value;
|
|
83524
|
+
const existingItem = upstreamLinks.find(item => item.source === source && item.target === target);
|
|
83525
|
+
upstreamLinks.push({
|
|
83526
|
+
source: parents[i].key,
|
|
83527
|
+
target: parents[i + 1].key,
|
|
83528
|
+
value: dividedLink.value
|
|
83529
|
+
});
|
|
83530
|
+
if (existingItem) {
|
|
83531
|
+
existingItem.value += value;
|
|
83532
|
+
}
|
|
83533
|
+
else {
|
|
83534
|
+
upstreamLinks.push({ source, target, value });
|
|
83535
|
+
}
|
|
83536
|
+
}
|
|
83537
|
+
});
|
|
83538
|
+
allLinkElements.forEach(linkEl => {
|
|
83539
|
+
const linkDatum = getDatumOfGraphic(linkEl);
|
|
83540
|
+
const originalDatum = linkDatum.datum;
|
|
83541
|
+
if (linkDatum.source === curLinkDatum.source && linkDatum.target === curLinkDatum.target) {
|
|
83542
|
+
linkEl.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE);
|
|
83543
|
+
addRuntimeState(linkEl, STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS, { ratio: 1 });
|
|
83544
|
+
return;
|
|
83545
|
+
}
|
|
83546
|
+
const selectedDatum = originalDatum
|
|
83547
|
+
? originalDatum.filter((entry) => {
|
|
83548
|
+
const parentKeysList = entry.parents.map((item) => item.key);
|
|
83549
|
+
return parentKeysList.includes(curLinkDatum.source) && parentKeysList.includes(curLinkDatum.target);
|
|
83550
|
+
})
|
|
83551
|
+
: null;
|
|
83552
|
+
if (selectedDatum && selectedDatum.length) {
|
|
83553
|
+
if (!highlightNodes.includes(linkDatum.source)) {
|
|
83554
|
+
highlightNodes.push(linkDatum.source);
|
|
83555
|
+
}
|
|
83556
|
+
if (!highlightNodes.includes(linkDatum.target)) {
|
|
83557
|
+
highlightNodes.push(linkDatum.target);
|
|
83558
|
+
}
|
|
83559
|
+
const val = selectedDatum
|
|
83560
|
+
.filter((entry) => {
|
|
83561
|
+
return entry.parents.some((par, index) => {
|
|
83562
|
+
var _a;
|
|
83563
|
+
return par.key === curLinkDatum.source && ((_a = entry.parents[index + 1]) === null || _a === void 0 ? void 0 : _a.key) === curLinkDatum.target;
|
|
83564
|
+
});
|
|
83565
|
+
})
|
|
83566
|
+
.reduce((sum, d) => {
|
|
83567
|
+
return (sum += d.value);
|
|
83568
|
+
}, 0);
|
|
83569
|
+
const ratio = val / linkDatum.value;
|
|
83570
|
+
linkEl.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE);
|
|
83571
|
+
addRuntimeState(linkEl, STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS, { ratio });
|
|
83572
|
+
return;
|
|
83573
|
+
}
|
|
83574
|
+
const upSelectedLink = upstreamLinks.find((upLink) => upLink.source === linkDatum.source && upLink.target === linkDatum.target);
|
|
83575
|
+
if (upSelectedLink) {
|
|
83576
|
+
if (!highlightNodes.includes(linkDatum.source)) {
|
|
83577
|
+
highlightNodes.push(linkDatum.source);
|
|
83578
|
+
}
|
|
83579
|
+
if (!highlightNodes.includes(linkDatum.target)) {
|
|
83580
|
+
highlightNodes.push(linkDatum.target);
|
|
83581
|
+
}
|
|
83582
|
+
linkEl.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE);
|
|
83583
|
+
addRuntimeState(linkEl, STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS, {
|
|
83584
|
+
ratio: upSelectedLink.value / linkDatum.value
|
|
83585
|
+
});
|
|
83586
|
+
return;
|
|
83587
|
+
}
|
|
83588
|
+
linkEl.removeState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS);
|
|
83589
|
+
linkEl.addState(STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS_REVERSE, true);
|
|
83590
|
+
return;
|
|
83591
|
+
});
|
|
83592
|
+
this._highLightElements(allNodeElements, highlightNodes);
|
|
83593
|
+
}
|
|
83594
|
+
this._needClear = true;
|
|
83595
|
+
}
|
|
83508
83596
|
_highLightElements(graphics, highlightNodes) {
|
|
83509
83597
|
if (!graphics || !graphics.length) {
|
|
83510
83598
|
return;
|
|
@@ -89675,11 +89763,15 @@ class Tooltip extends BaseComponent {
|
|
|
89675
89763
|
});
|
|
89676
89764
|
};
|
|
89677
89765
|
this._handleClickToLock = (params) => {
|
|
89766
|
+
var _a, _b;
|
|
89678
89767
|
if (this._clickLock) {
|
|
89679
89768
|
this._handleChartMouseOut(params);
|
|
89680
89769
|
this._clickLock = false;
|
|
89681
89770
|
}
|
|
89682
89771
|
else {
|
|
89772
|
+
if (!this._isTooltipShown && !((_b = (_a = this.tooltipHandler) === null || _a === void 0 ? void 0 : _a.isTooltipShown) === null || _b === void 0 ? void 0 : _b.call(_a))) {
|
|
89773
|
+
return;
|
|
89774
|
+
}
|
|
89683
89775
|
this._clickLock = true;
|
|
89684
89776
|
}
|
|
89685
89777
|
};
|
|
@@ -89978,6 +90070,9 @@ class Tooltip extends BaseComponent {
|
|
|
89978
90070
|
return;
|
|
89979
90071
|
}
|
|
89980
90072
|
this._isEnterTooltip = false;
|
|
90073
|
+
if (this._spec.triggerOff === 'none') {
|
|
90074
|
+
return;
|
|
90075
|
+
}
|
|
89981
90076
|
if (this._cacheEnterableRect) {
|
|
89982
90077
|
const newRect = (_a = container.getBoundingClientRect) === null || _a === void 0 ? void 0 : _a.call(container);
|
|
89983
90078
|
if (newRect &&
|
|
@@ -89994,7 +90089,10 @@ class Tooltip extends BaseComponent {
|
|
|
89994
90089
|
const activeType = this._spec.activeType;
|
|
89995
90090
|
this.processor = {};
|
|
89996
90091
|
activeType.forEach(type => {
|
|
89997
|
-
|
|
90092
|
+
const instance = Factory.createTooltipProcessor(type, this);
|
|
90093
|
+
if (instance) {
|
|
90094
|
+
this.processor[type] = instance;
|
|
90095
|
+
}
|
|
89998
90096
|
});
|
|
89999
90097
|
}
|
|
90000
90098
|
_initEvent() {
|
|
@@ -90422,7 +90520,7 @@ class BaseCrossHair extends BaseComponent {
|
|
|
90422
90520
|
this.event.off(eventName, handler);
|
|
90423
90521
|
}
|
|
90424
90522
|
}
|
|
90425
|
-
|
|
90523
|
+
onBeforeRender() {
|
|
90426
90524
|
this._limitBounds = null;
|
|
90427
90525
|
this._showDefaultCrosshair();
|
|
90428
90526
|
}
|
|
@@ -91306,7 +91404,7 @@ const dataFilterWithNewDomain = (data, op) => {
|
|
|
91306
91404
|
return data.filter(filter);
|
|
91307
91405
|
};
|
|
91308
91406
|
const dataFilterComputeDomain = (data, op) => {
|
|
91309
|
-
const { stateFields, valueFields, dataCollection, isCategoryState
|
|
91407
|
+
const { stateFields, valueFields, dataCollection, isCategoryState } = op.input;
|
|
91310
91408
|
const { stateField, valueField } = op.output;
|
|
91311
91409
|
const resultObj = {};
|
|
91312
91410
|
const resultData = [];
|
|
@@ -91327,8 +91425,7 @@ const dataFilterComputeDomain = (data, op) => {
|
|
|
91327
91425
|
}
|
|
91328
91426
|
});
|
|
91329
91427
|
}
|
|
91330
|
-
|
|
91331
|
-
data.forEach((d) => {
|
|
91428
|
+
dv.latestData.forEach((d) => {
|
|
91332
91429
|
array(stateFields[i]).forEach(state => {
|
|
91333
91430
|
if (!isNil$1(d[state])) {
|
|
91334
91431
|
if (isNil$1(resultObj[d[state]])) {
|
|
@@ -91413,39 +91510,30 @@ class DataFilterBaseComponent extends BaseComponent {
|
|
|
91413
91510
|
const axisScale = axis.getScale();
|
|
91414
91511
|
const reverse = this._isReverse();
|
|
91415
91512
|
const newRangeFactor = reverse ? [1 - this._end, 1 - this._start] : [this._start, this._end];
|
|
91416
|
-
const linkedAxis = this._linkedAxisComponent;
|
|
91417
91513
|
if (reverse) {
|
|
91418
91514
|
switch (tag) {
|
|
91419
91515
|
case 'startHandler':
|
|
91420
91516
|
axis.scaleRangeFactorEnd(newRangeFactor[1]);
|
|
91421
|
-
linkedAxis === null || linkedAxis === void 0 ? void 0 : linkedAxis.scaleRangeFactorEnd(newRangeFactor[1]);
|
|
91422
91517
|
break;
|
|
91423
91518
|
case 'endHandler':
|
|
91424
91519
|
axis.scaleRangeFactorStart(newRangeFactor[0]);
|
|
91425
|
-
linkedAxis === null || linkedAxis === void 0 ? void 0 : linkedAxis.scaleRangeFactorStart(newRangeFactor[0]);
|
|
91426
91520
|
break;
|
|
91427
91521
|
default:
|
|
91428
91522
|
axis.scaleRangeFactorStart(newRangeFactor[0], true);
|
|
91429
91523
|
axis.scaleRangeFactorEnd(newRangeFactor[1]);
|
|
91430
|
-
linkedAxis === null || linkedAxis === void 0 ? void 0 : linkedAxis.scaleRangeFactorStart(newRangeFactor[0], true);
|
|
91431
|
-
linkedAxis === null || linkedAxis === void 0 ? void 0 : linkedAxis.scaleRangeFactorEnd(newRangeFactor[1]);
|
|
91432
91524
|
}
|
|
91433
91525
|
}
|
|
91434
91526
|
else {
|
|
91435
91527
|
switch (tag) {
|
|
91436
91528
|
case 'startHandler':
|
|
91437
91529
|
axis.scaleRangeFactorStart(newRangeFactor[0]);
|
|
91438
|
-
linkedAxis === null || linkedAxis === void 0 ? void 0 : linkedAxis.scaleRangeFactorStart(newRangeFactor[0]);
|
|
91439
91530
|
break;
|
|
91440
91531
|
case 'endHandler':
|
|
91441
91532
|
axis.scaleRangeFactorEnd(newRangeFactor[1]);
|
|
91442
|
-
linkedAxis === null || linkedAxis === void 0 ? void 0 : linkedAxis.scaleRangeFactorEnd(newRangeFactor[1]);
|
|
91443
91533
|
break;
|
|
91444
91534
|
default:
|
|
91445
91535
|
axis.scaleRangeFactorEnd(newRangeFactor[1], true);
|
|
91446
|
-
linkedAxis === null || linkedAxis === void 0 ? void 0 : linkedAxis.scaleRangeFactorEnd(newRangeFactor[1], true);
|
|
91447
91536
|
axis.scaleRangeFactorStart(newRangeFactor[0]);
|
|
91448
|
-
linkedAxis === null || linkedAxis === void 0 ? void 0 : linkedAxis.scaleRangeFactorStart(newRangeFactor[0]);
|
|
91449
91537
|
}
|
|
91450
91538
|
}
|
|
91451
91539
|
const newFactor = axisScale.rangeFactor();
|
|
@@ -91627,12 +91715,6 @@ class DataFilterBaseComponent extends BaseComponent {
|
|
|
91627
91715
|
else if (isValid$1(this._spec.axisIndex)) {
|
|
91628
91716
|
this._relatedAxisComponent = this._option.getComponentByIndex('axes', this._spec.axisIndex);
|
|
91629
91717
|
}
|
|
91630
|
-
if (isValid$1(this._spec.linkedAxisId)) {
|
|
91631
|
-
this._linkedAxisComponent = this._option.getComponentByUserId(this._spec.linkedAxisId);
|
|
91632
|
-
}
|
|
91633
|
-
else if (isValid$1(this._spec.linkedAxisIndex)) {
|
|
91634
|
-
this._linkedAxisComponent = this._option.getComponentByIndex('axes', this._spec.linkedAxisIndex);
|
|
91635
|
-
}
|
|
91636
91718
|
if (isNil$1(this._spec.field) && !this._relatedAxisComponent) {
|
|
91637
91719
|
const axes = this._option.getComponentsByKey('axes');
|
|
91638
91720
|
const sameOrientAxis = axes.find((cm) => cm._orient === this._orient);
|
|
@@ -91715,15 +91797,11 @@ class DataFilterBaseComponent extends BaseComponent {
|
|
|
91715
91797
|
const dataCollection = [];
|
|
91716
91798
|
const stateFields = [];
|
|
91717
91799
|
const valueFields = [];
|
|
91718
|
-
const seriesTypes = [];
|
|
91719
91800
|
let isCategoryState;
|
|
91720
91801
|
if (this._relatedAxisComponent) {
|
|
91721
91802
|
const originalStateFields = {};
|
|
91722
91803
|
eachSeries(this._regions, s => {
|
|
91723
91804
|
var _a, _b;
|
|
91724
|
-
if (s.type === 'link') {
|
|
91725
|
-
return;
|
|
91726
|
-
}
|
|
91727
91805
|
const xAxisHelper = s.coordinate === 'cartesian'
|
|
91728
91806
|
? s.getXAxisHelper()
|
|
91729
91807
|
: s.coordinate === 'polar'
|
|
@@ -91746,7 +91824,6 @@ class DataFilterBaseComponent extends BaseComponent {
|
|
|
91746
91824
|
: yAxisHelper;
|
|
91747
91825
|
const valueAxisHelper = stateAxisHelper === xAxisHelper ? yAxisHelper : xAxisHelper;
|
|
91748
91826
|
dataCollection.push(s.getRawData());
|
|
91749
|
-
seriesTypes.push(s.type);
|
|
91750
91827
|
const seriesSpec = s.getSpec();
|
|
91751
91828
|
const xField = s.coordinate === 'cartesian'
|
|
91752
91829
|
? array(seriesSpec.xField)
|
|
@@ -91765,7 +91842,7 @@ class DataFilterBaseComponent extends BaseComponent {
|
|
|
91765
91842
|
}
|
|
91766
91843
|
if (this._valueField) {
|
|
91767
91844
|
const valueField = s.type === 'link' ? ['from_yField'] : valueAxisHelper === xAxisHelper ? xField : yField;
|
|
91768
|
-
if (isContinuous(valueAxisHelper.getScale(0).type)
|
|
91845
|
+
if (isContinuous(valueAxisHelper.getScale(0).type)) {
|
|
91769
91846
|
valueFields.push(...valueField);
|
|
91770
91847
|
}
|
|
91771
91848
|
}
|
|
@@ -91798,8 +91875,7 @@ class DataFilterBaseComponent extends BaseComponent {
|
|
|
91798
91875
|
dataCollection: dataCollection,
|
|
91799
91876
|
stateFields,
|
|
91800
91877
|
valueFields,
|
|
91801
|
-
isCategoryState
|
|
91802
|
-
seriesTypes
|
|
91878
|
+
isCategoryState
|
|
91803
91879
|
},
|
|
91804
91880
|
output: {
|
|
91805
91881
|
stateField: this._stateField,
|
|
@@ -91807,9 +91883,9 @@ class DataFilterBaseComponent extends BaseComponent {
|
|
|
91807
91883
|
}
|
|
91808
91884
|
}
|
|
91809
91885
|
}, false);
|
|
91886
|
+
this._data = new CompilableData(this._option, data);
|
|
91810
91887
|
data.reRunAllTransform();
|
|
91811
91888
|
dataSet.multipleDataViewAddListener(dataCollection, 'change', this._handleDataCollectionChange.bind(this));
|
|
91812
|
-
this._data = new CompilableData(this._option, data);
|
|
91813
91889
|
}
|
|
91814
91890
|
setAttrFromSpec() {
|
|
91815
91891
|
var _a;
|
|
@@ -92007,7 +92083,7 @@ class DataFilterBaseComponent extends BaseComponent {
|
|
|
92007
92083
|
_initCommonEvent() {
|
|
92008
92084
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
92009
92085
|
const delayType = (_b = (_a = this._spec) === null || _a === void 0 ? void 0 : _a.delayType) !== null && _b !== void 0 ? _b : 'throttle';
|
|
92010
|
-
const delayTime = isValid$1((_c = this._spec) === null || _c === void 0 ? void 0 : _c.delayType) ? (
|
|
92086
|
+
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;
|
|
92011
92087
|
const realTime = (_g = (_f = this._spec) === null || _f === void 0 ? void 0 : _f.realTime) !== null && _g !== void 0 ? _g : true;
|
|
92012
92088
|
const option = { delayType, delayTime, realTime, allowComponentZoom: true };
|
|
92013
92089
|
if (this._zoomAttr.enable) {
|
|
@@ -95155,6 +95231,7 @@ class Player extends BaseComponent {
|
|
|
95155
95231
|
this._option.globalInstance.on(ChartEvent.rendered, () => {
|
|
95156
95232
|
var _a;
|
|
95157
95233
|
if ((_a = this._spec) === null || _a === void 0 ? void 0 : _a.auto) {
|
|
95234
|
+
this._playerComponent.pause();
|
|
95158
95235
|
this._playerComponent.play();
|
|
95159
95236
|
}
|
|
95160
95237
|
});
|
|
@@ -96546,6 +96623,7 @@ class Brush extends BaseComponent {
|
|
|
96546
96623
|
var _a;
|
|
96547
96624
|
this._setRegionMarkPickable(region, true);
|
|
96548
96625
|
const { operateMask } = e.detail;
|
|
96626
|
+
const { updateElementsState = true } = this._spec;
|
|
96549
96627
|
if ((_a = this._spec) === null || _a === void 0 ? void 0 : _a.onBrushEnd) {
|
|
96550
96628
|
if (this._spec.onBrushEnd(e) === true) {
|
|
96551
96629
|
this.clearGraphic();
|
|
@@ -96559,7 +96637,7 @@ class Brush extends BaseComponent {
|
|
|
96559
96637
|
}
|
|
96560
96638
|
else {
|
|
96561
96639
|
const inBrushData = this._extendDataInBrush(this._inBrushElementsMap);
|
|
96562
|
-
if (!this._spec.zoomWhenEmpty && inBrushData.length > 0) {
|
|
96640
|
+
if ((!this._spec.zoomWhenEmpty && inBrushData.length > 0) || !updateElementsState) {
|
|
96563
96641
|
this._setAxisAndDataZoom(operateMask, region);
|
|
96564
96642
|
}
|
|
96565
96643
|
this._emitEvent(ChartEvent.brushEnd, region);
|
|
@@ -96568,8 +96646,9 @@ class Brush extends BaseComponent {
|
|
|
96568
96646
|
brush.addEventListener(IOperateType.moveEnd, (e) => {
|
|
96569
96647
|
this._setRegionMarkPickable(region, true);
|
|
96570
96648
|
const { operateMask } = e.detail;
|
|
96649
|
+
const { updateElementsState = true } = this._spec;
|
|
96571
96650
|
const inBrushData = this._extendDataInBrush(this._inBrushElementsMap);
|
|
96572
|
-
if (!this._spec.zoomWhenEmpty && inBrushData.length > 0) {
|
|
96651
|
+
if ((!this._spec.zoomWhenEmpty && inBrushData.length > 0) || updateElementsState) {
|
|
96573
96652
|
this._setAxisAndDataZoom(operateMask, region);
|
|
96574
96653
|
}
|
|
96575
96654
|
this._emitEvent(ChartEvent.brushEnd, region);
|
|
@@ -96611,8 +96690,11 @@ class Brush extends BaseComponent {
|
|
|
96611
96690
|
}
|
|
96612
96691
|
_handleBrushChange(region, e) {
|
|
96613
96692
|
const { operateMask } = e.detail;
|
|
96614
|
-
this.
|
|
96615
|
-
|
|
96693
|
+
const { updateElementsState = true } = this._spec;
|
|
96694
|
+
if (updateElementsState) {
|
|
96695
|
+
this._reconfigItem(operateMask, region);
|
|
96696
|
+
this._reconfigLinkedItem(operateMask, region);
|
|
96697
|
+
}
|
|
96616
96698
|
}
|
|
96617
96699
|
_extendDataInBrush(elementsMap) {
|
|
96618
96700
|
var _a, _b;
|
|
@@ -96948,7 +97030,6 @@ class CustomMark extends BaseComponent {
|
|
|
96948
97030
|
if (!this._spec) {
|
|
96949
97031
|
return;
|
|
96950
97032
|
}
|
|
96951
|
-
const hasAnimation = this._option.animation !== false;
|
|
96952
97033
|
let parentMark = null;
|
|
96953
97034
|
if (this._spec.parent) {
|
|
96954
97035
|
const mark = this.getChart()
|
|
@@ -96958,12 +97039,10 @@ class CustomMark extends BaseComponent {
|
|
|
96958
97039
|
parentMark = mark;
|
|
96959
97040
|
}
|
|
96960
97041
|
}
|
|
96961
|
-
this._createExtensionMark(this._spec, parentMark, `${PREFIX}_series_${this.id}_extensionMark`, 0
|
|
96962
|
-
hasAnimation
|
|
96963
|
-
});
|
|
97042
|
+
this._createExtensionMark(this._spec, parentMark, `${PREFIX}_series_${this.id}_extensionMark`, 0);
|
|
96964
97043
|
}
|
|
96965
|
-
_createExtensionMark(spec, parentMark, namePrefix, index = 0
|
|
96966
|
-
var _a;
|
|
97044
|
+
_createExtensionMark(spec, parentMark, namePrefix, index = 0) {
|
|
97045
|
+
var _a, _b;
|
|
96967
97046
|
const mark = this._createMark({
|
|
96968
97047
|
type: spec.type,
|
|
96969
97048
|
name: isValid$1(spec.name) ? `${spec.name}` : `${namePrefix}_${index}`
|
|
@@ -96979,7 +97058,7 @@ class CustomMark extends BaseComponent {
|
|
|
96979
97058
|
if (isValid$1(spec.id)) {
|
|
96980
97059
|
mark.setUserId(spec.id);
|
|
96981
97060
|
}
|
|
96982
|
-
if (
|
|
97061
|
+
if (((_a = this._option.globalInstance) === null || _a === void 0 ? void 0 : _a.isAnimationEnable()) && spec.animation) {
|
|
96983
97062
|
const config = animationConfig({}, userAnimationConfig(spec.type, spec, this._markAttributeContext));
|
|
96984
97063
|
mark.setAnimationConfig(config);
|
|
96985
97064
|
}
|
|
@@ -96992,8 +97071,8 @@ class CustomMark extends BaseComponent {
|
|
|
96992
97071
|
this.initMarkStyleWithSpec(mark, spec);
|
|
96993
97072
|
if (spec.type === 'group') {
|
|
96994
97073
|
namePrefix = `${namePrefix}_${index}`;
|
|
96995
|
-
(
|
|
96996
|
-
this._createExtensionMark(s, mark, namePrefix, i
|
|
97074
|
+
(_b = spec.children) === null || _b === void 0 ? void 0 : _b.forEach((s, i) => {
|
|
97075
|
+
this._createExtensionMark(s, mark, namePrefix, i);
|
|
96997
97076
|
});
|
|
96998
97077
|
}
|
|
96999
97078
|
if (isValid$1(spec.dataId) || isValidNumber$1(spec.dataIndex)) {
|
|
@@ -97863,14 +97942,15 @@ const getDomStyle = (spec = {}) => {
|
|
|
97863
97942
|
const marginKey = align === 'right' ? 'marginLeft' : 'marginRight';
|
|
97864
97943
|
if (align === 'right') {
|
|
97865
97944
|
panelStyle.direction = 'rtl';
|
|
97866
|
-
titleStyle.textAlign = 'right';
|
|
97867
|
-
keyStyle.textAlign = 'right';
|
|
97868
|
-
valueStyle.textAlign = 'left';
|
|
97869
97945
|
}
|
|
97870
|
-
|
|
97871
|
-
titleStyle.textAlign = 'left';
|
|
97872
|
-
|
|
97873
|
-
|
|
97946
|
+
if (isNil$1(titleStyle.textAlign)) {
|
|
97947
|
+
titleStyle.textAlign = align === 'right' ? 'right' : 'left';
|
|
97948
|
+
}
|
|
97949
|
+
if (isNil$1(keyStyle.textAlign)) {
|
|
97950
|
+
keyStyle.textAlign = align === 'right' ? 'right' : 'left';
|
|
97951
|
+
}
|
|
97952
|
+
if (isNil$1(valueStyle.textAlign)) {
|
|
97953
|
+
valueStyle.textAlign = align === 'right' ? 'left' : 'right';
|
|
97874
97954
|
}
|
|
97875
97955
|
shapeStyle[marginKey] = getPixelPropertyStr((_b = shape.spacing) !== null && _b !== void 0 ? _b : DEFAULT_SHAPE_SPACING);
|
|
97876
97956
|
keyStyle[marginKey] = getPixelPropertyStr((_c = keyLabel.spacing) !== null && _c !== void 0 ? _c : DEFAULT_KEY_SPACING);
|
|
@@ -98061,7 +98141,7 @@ class DomTooltipHandler extends BaseTooltipHandler {
|
|
|
98061
98141
|
if (!changePositionOnly) {
|
|
98062
98142
|
this._updateDomStringByCol(actualTooltip);
|
|
98063
98143
|
}
|
|
98064
|
-
this._updateDomStyle('height');
|
|
98144
|
+
this._updateDomStyle('height', changePositionOnly);
|
|
98065
98145
|
const rect = (_a = this._rootDom) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
98066
98146
|
return {
|
|
98067
98147
|
width: rect === null || rect === void 0 ? void 0 : rect.width,
|
|
@@ -98206,7 +98286,7 @@ class DomTooltipHandler extends BaseTooltipHandler {
|
|
|
98206
98286
|
contentDom.parentNode.removeChild(contentDom);
|
|
98207
98287
|
}
|
|
98208
98288
|
}
|
|
98209
|
-
_updateDomStyle(sizeKey = 'width') {
|
|
98289
|
+
_updateDomStyle(sizeKey = 'width', refreshSize) {
|
|
98210
98290
|
var _a, _b, _c, _d, _e;
|
|
98211
98291
|
const rootDom = this._rootDom;
|
|
98212
98292
|
const contentDom = [...rootDom.children].find(child => child.className.includes(TOOLTIP_CONTENT_BOX_CLASS_NAME));
|
|
@@ -98249,6 +98329,9 @@ class DomTooltipHandler extends BaseTooltipHandler {
|
|
|
98249
98329
|
const row = rows[i];
|
|
98250
98330
|
const cols = (_d = row.children) !== null && _d !== void 0 ? _d : [];
|
|
98251
98331
|
for (let j = 0; j < cols.length; j++) {
|
|
98332
|
+
if (refreshSize) {
|
|
98333
|
+
cols[j].style[sizeKey] = 'initial';
|
|
98334
|
+
}
|
|
98252
98335
|
const width = cols[j].getBoundingClientRect()[sizeKey];
|
|
98253
98336
|
if (widthByCol[j] === undefined || widthByCol[j] < width) {
|
|
98254
98337
|
widthByCol[j] = width;
|
|
@@ -98280,7 +98363,7 @@ class DomTooltipHandler extends BaseTooltipHandler {
|
|
|
98280
98363
|
}
|
|
98281
98364
|
if (this.getVisibility()) {
|
|
98282
98365
|
this._updateDomStringByCol(this._tooltipActual);
|
|
98283
|
-
this._updateDomStyle('height');
|
|
98366
|
+
this._updateDomStyle('height', false);
|
|
98284
98367
|
}
|
|
98285
98368
|
}
|
|
98286
98369
|
_updatePosition({ x, y }) {
|
|
@@ -100187,4 +100270,4 @@ function registerSequentialAnimate() {
|
|
|
100187
100270
|
mixin(BaseMark, SequentialAnimate);
|
|
100188
100271
|
}
|
|
100189
100272
|
|
|
100190
|
-
export { ArcMark, AreaChart, AreaMark, AreaSeries, AttributeLevel, AxisSyncPlugin, BandAxisMixin, BarChart, BarChartSpecTransformer, BarSeries, BarSeriesSpecTransformer, BaseArcMark, BaseChart, BaseChartSpecTransformer, BaseComponent, BaseComponentSpecTransformer, BaseHistogramChart, BaseMark, BasePieChart, BasePieChartSpecTransformer, BasePieSeries, BasePlugin, BasePolygonMark, BaseSeries, BaseSeriesSpecTransformer, BaseSeriesTooltipHelper, BaseWordCloudChart, BaseWordCloudChartSpecTransformer, BaseWordCloudSeries, BoxPlotChart, BoxPlotSeries, Brush, CanvasTooltipHandler, CartesianAxis, CartesianBandAxis, CartesianChartSpecTransformer, CartesianCrossHair, CartesianLinearAxis, CartesianLogAxis, CartesianMarkArea, CartesianMarkLine, CartesianMarkPoint, CartesianSeries, CartesianSymlogAxis, CartesianTimeAxis, ChartEvent, CirclePackingChart, CirclePackingSeries, CircularProgressChart, CircularProgressSeries, CommonChart, CommonChartSpecTransformer, CompilableData, ComponentMark, ContinuousLegend, CorrelationChart, CorrelationSeries, CustomMark, DEFAULT_ANIMATION_CONFIG, DEFAULT_CHART_HEIGHT, DEFAULT_CHART_WIDTH, DEFAULT_CLOSE_STROKE_JOIN, DEFAULT_DATA_INDEX, DEFAULT_DATA_KEY, DEFAULT_DATA_SERIES_FIELD, DEFAULT_KEY, DEFAULT_LAYOUT_RECT_LEVEL, DEFAULT_LAYOUT_RECT_LEVEL_MIN, DEFAULT_LINEAR_INTERPOLATE, DEFAULT_MEASURE_CANVAS_ID, DEFAULT_SERIES_STYLE_NAME, DEFAULT_SMOOTH_INTERPOLATE, DataZoom, DimensionClickEvent, DimensionEventEnum, DimensionHoverEvent, Direction, DiscreteLegend, DomTooltipHandler, DotSeries, ElementHighlight, ElementSelect, Event$1 as Event, Factory, FormatterPlugin, FunnelChart, FunnelChartSpecTransformer, FunnelSeries, FunnelSeriesSpecTransformer, GaugeChart, GaugePointerSeries, GaugeSeries, GeoCoordinate, GeoMarkPoint, GeoSeries, GridLayout, GroupMark, HeatmapChart, HeatmapSeries, HistogramChart, HistogramChartSpecTransformer, ImageMark, Indicator, Label, Layout$1 as Layout, LayoutLevel, LayoutZIndex, LineChart, LineMark, LineSeries, LinearAxisMixin, LinearProgressChart, LinearProgressSeries, LinkSeries, LiquidChart, LiquidSeries, MOSAIC_CAT_END_PERCENT, MOSAIC_CAT_START_PERCENT, MOSAIC_VALUE_END_PERCENT, MOSAIC_VALUE_START_PERCENT, ManualTicker, MapChart, MapSeries, MarkTypeEnum, MediaQuery, MosaicChart, MosaicSeries, PREFIX, PathMark, PieChart, PieSeries, PieSeriesSpecTransformer, Player, PolarAxis, PolarBandAxis, PolarCrossHair, PolarLinearAxis, PolarMarkArea, PolarMarkLine, PolarMarkPoint, PolarSeries, PolygonMark, PositionEnum, ProgressLikeSeries, RadarChart, RadarSeries, RangeAreaChart, RangeAreaSeries, RangeColumnChart, RangeColumnSeries, RangeColumnSeriesSpecTransformer, RectMark, RenderModeEnum, RippleMark, RoseChart, RoseLikeSeries, RoseSeries, RuleMark, SEGMENT_FIELD_END, SEGMENT_FIELD_START, STACK_FIELD_END, STACK_FIELD_END_OffsetSilhouette, STACK_FIELD_END_PERCENT, STACK_FIELD_KEY, STACK_FIELD_START, STACK_FIELD_START_OffsetSilhouette, STACK_FIELD_START_PERCENT, STACK_FIELD_TOTAL, STACK_FIELD_TOTAL_BOTTOM, STACK_FIELD_TOTAL_PERCENT, STACK_FIELD_TOTAL_TOP, STATE_VALUE_ENUM, SankeyChart, SankeySeries, ScatterChart, ScatterSeries, ScrollBar, SequenceChart, SeriesMarkNameEnum, SeriesTypeEnum, SeriesTypeForThemeEnum, StreamLight, SunburstChart, SunburstSeries, SymbolMark, TextMark, ThemeManager, Title, Tooltip, TooltipResult, TotalLabel, TransformLevel, TreemapChart, TreemapSeries, USER_LAYOUT_RECT_LEVEL, VChart, VennChart, VennSeries, WaterfallChart, WaterfallSeries, WordCloudChart, WordCloudSeries, alternatingWave, animationConfig, barGrowIn, barGrowOut, barPresetAnimation, baseSeriesMark, boundsInRect, builtinThemes, calcLayoutNumber, calcPadding, centerToCorner, columnCenterToEdge, columnEdgeToCenter, columnLeftToRight, columnRightToLeft, computeActualDataScheme, convertPoint, cornerToCenter, createArc, createArea, createGroup, createLine, createRect, createRichText, createSymbol, createText, darkTheme, dataScheme, VChart as default, defaultThemeName, diagonalCenterToEdge, diagonalTopLeftToBottomRight, findMarkGraphic, functionTransform, getActualColor, getActualNumValue, getCartesianCrosshairRect, getCartesianDimensionInfo, getColorSchemeBySeries, getCombinedSizeOfRegions, getDataScheme, getDatumOfGraphic, getDimensionInfoByValue, getFieldAlias, getFunnelTheme, getMergedTheme, getPolarDimensionInfo, getRegionStackGroup, getSpecInfo, getTheme, hasThemeMerged, isCollectionMark, isColorKey, isPercent, isPercentOffset, isProgressiveDataColorScheme, isTokenKey, isValidOrient, isXAxis, isYAxis, isZAxis, lightTheme, lookup, measureText, mergeFields, normalizeLayoutPaddingSpec, particleEffect, pieDisappear, pieEnter, pieExit, piePresetAnimation, pulseWave, queryColorFromColorScheme, queryToken, randomOpacity, registerAllEnv, registerAllMarks, registerAnimate, registerArcAnimation, registerArcMark, registerAreaChart, registerAreaMark, registerAreaSeries, registerBarChart, registerBarSeries, registerBoxplotChart, registerBoxplotSeries, registerBrowserEnv, registerBrush, registerCanvasTooltipHandler, registerCartesianBandAxis, registerCartesianCrossHair, registerCartesianLinearAxis, registerCartesianLogAxis, registerCartesianSymlogAxis, registerCartesianTimeAxis, registerChartPlugin, registerCirclePackingChart, registerCirclePackingSeries, registerCircularProgressChart, registerCircularProgressSeries, registerCommonChart, registerComponentMark, registerContinuousLegend, registerCorrelationChart, registerCustomAnimate, registerCustomMark, registerDataSetInstanceParser, registerDataSetInstanceTransform, registerDataZoom, registerDimensionEvents, registerDimensionHover, registerDimensionTooltipProcessor, registerDiscreteLegend, registerDomTooltipHandler, registerDotSeries, registerDragPlugin, registerElementActive, registerElementActiveByLegend, registerElementHighlight, registerElementHighlightByGroup, registerElementHighlightByKey, registerElementHighlightByLegend, registerElementHighlightByName, registerElementSelect, registerFormatPlugin, registerFunnelChart, registerFunnelSeries, registerGaugeChart, registerGaugePointerSeries, registerGaugeSeries, registerGeoCoordinate, registerGeoMarkPoint, registerGesturePlugin, registerGridLayout, registerGroupMark, registerGroupTooltipProcessor, registerHarmonyEnv, registerHeatmapChart, registerHeatmapSeries, registerHistogramChart, registerHtmlAttributePlugin, registerImageMark, registerIndicator, registerLabel, registerLarkEnv, registerLineChart, registerLineMark, registerLineSeries, registerLinearProgressChart, registerLinearProgressSeries, registerLinkSeries, registerLiquidChart, registerLiquidSeries, registerLynxEnv, registerMapChart, registerMapSeries, registerMarkArea, registerMarkFilterTransform, registerMarkLine, registerMarkMapTransform, registerMarkPoint, registerMarkTooltipProcessor, registerMediaQuery, registerMosaicChart, registerMosaicSeries, registerNodeEnv, registerPathMark, registerPieChart, registerPieSeries, registerPlayer, registerPolarBandAxis, registerPolarCrossHair, registerPolarLinearAxis, registerPolarMarkArea, registerPolarMarkLine, registerPolarMarkPoint, registerPolygonAnimation, registerPolygonMark, registerPoptip, registerRadarChart, registerRadarSeries, registerRangeAreaChart, registerRangeAreaSeries, registerRangeColumnChart, registerRangeColumnSeries, registerReactAttributePlugin, registerRectAnimation, registerRectMark, registerRippleMark, registerRoseChart, registerRoseSeries, registerRuleMark, registerSankeyChart, registerSankeySeries, registerScatterChart, registerScatterSeries, registerScrollBar, registerSequenceChart, registerSequentialAnimate, registerStateTransition, registerSunBurstSeries, registerSunburstChart, registerSymbolMark, registerTTEnv, registerTaroEnv, registerTextMark, registerTheme, registerTitle, registerTooltip, registerTotalLabel, registerTreemapChart, registerTreemapSeries, registerAnimate$1 as registerVRenderAnimate, registerVennChart, registerVennSeries, registerWXEnv, registerWaterfallChart, registerWaterfallSeries, registerWordCloudChart, registerWordCloudSeries, registerWordCloudShapeChart, removeTheme, rippleEffect, rotationScan, rowBottomToTop, rowCenterToEdge, rowEdgeToCenter, rowTopToBottom, shouldMarkDoMorph, snakeWave, sortStackValueGroup, specTransform, spiralEffect, stack, stackGroup, stackMosaic, stackMosaicTotal, stackOffsetSilhouette, stackTotal, themeExist, themes, token, transformColorSchemeToStandardStruct, transformToGraphic, userAnimationConfig, version, vglobal, warn };
|
|
100273
|
+
export { ArcMark, AreaChart, AreaMark, AreaSeries, AttributeLevel, AxisSyncPlugin, BandAxisMixin, BarChart, BarChartSpecTransformer, BarSeries, BarSeriesSpecTransformer, BaseArcMark, BaseChart, BaseChartSpecTransformer, BaseComponent, BaseComponentSpecTransformer, BaseHistogramChart, BaseMark, BasePieChart, BasePieChartSpecTransformer, BasePieSeries, BasePlugin, BasePolygonMark, BaseSeries, BaseSeriesSpecTransformer, BaseSeriesTooltipHelper, BaseWordCloudChart, BaseWordCloudChartSpecTransformer, BaseWordCloudSeries, BoxPlotChart, BoxPlotSeries, Brush, CanvasTooltipHandler, CartesianAxis, CartesianBandAxis, CartesianChartSpecTransformer, CartesianCrossHair, CartesianLinearAxis, CartesianLogAxis, CartesianMarkArea, CartesianMarkLine, CartesianMarkPoint, CartesianSeries, CartesianSymlogAxis, CartesianTimeAxis, ChartEvent, CirclePackingChart, CirclePackingSeries, CircularProgressChart, CircularProgressSeries, CommonChart, CommonChartSpecTransformer, CompilableData, ComponentMark, ContinuousLegend, CorrelationChart, CorrelationSeries, CustomMark, DEFAULT_ANIMATION_CONFIG, DEFAULT_CHART_HEIGHT, DEFAULT_CHART_WIDTH, DEFAULT_CLOSE_STROKE_JOIN, DEFAULT_DATA_INDEX, DEFAULT_DATA_KEY, DEFAULT_DATA_SERIES_FIELD, DEFAULT_KEY, DEFAULT_LAYOUT_RECT_LEVEL, DEFAULT_LAYOUT_RECT_LEVEL_MIN, DEFAULT_LINEAR_INTERPOLATE, DEFAULT_MEASURE_CANVAS_ID, DEFAULT_SERIES_STYLE_NAME, DEFAULT_SMOOTH_INTERPOLATE, DataZoom, DimensionClickEvent, DimensionEventEnum, DimensionHoverEvent, Direction, DiscreteLegend, DomTooltipHandler, DotSeries, ElementHighlight, ElementSelect, Event$1 as Event, Factory, FormatterPlugin, FunnelChart, FunnelChartSpecTransformer, FunnelSeries, FunnelSeriesSpecTransformer, GaugeChart, GaugePointerSeries, GaugeSeries, GeoCoordinate, GeoMarkPoint, GeoSeries, GridLayout, GroupMark, HeatmapChart, HeatmapSeries, HistogramChart, HistogramChartSpecTransformer, ImageMark, Indicator, Label, Layout$1 as Layout, LayoutLevel, LayoutZIndex, LineChart, LineMark, LineSeries, LinearAxisMixin, LinearProgressChart, LinearProgressSeries, LinkSeries, LiquidChart, LiquidSeries, MOSAIC_CAT_END_PERCENT, MOSAIC_CAT_START_PERCENT, MOSAIC_VALUE_END_PERCENT, MOSAIC_VALUE_START_PERCENT, ManualTicker, MapChart, MapSeries, MarkTypeEnum, MediaQuery, MosaicChart, MosaicSeries, PREFIX, PathMark, PieChart, PieSeries, PieSeriesSpecTransformer, Player, PolarAxis, PolarBandAxis, PolarCrossHair, PolarLinearAxis, PolarMarkArea, PolarMarkLine, PolarMarkPoint, PolarSeries, PolygonMark, PositionEnum, ProgressLikeSeries, RadarChart, RadarSeries, RangeAreaChart, RangeAreaSeries, RangeColumnChart, RangeColumnSeries, RangeColumnSeriesSpecTransformer, RectMark, RenderModeEnum, RippleMark, RoseChart, RoseLikeSeries, RoseSeries, RuleMark, SEGMENT_FIELD_END, SEGMENT_FIELD_START, STACK_FIELD_END, STACK_FIELD_END_OffsetSilhouette, STACK_FIELD_END_PERCENT, STACK_FIELD_KEY, STACK_FIELD_START, STACK_FIELD_START_OffsetSilhouette, STACK_FIELD_START_PERCENT, STACK_FIELD_TOTAL, STACK_FIELD_TOTAL_BOTTOM, STACK_FIELD_TOTAL_PERCENT, STACK_FIELD_TOTAL_TOP, STATE_VALUE_ENUM, SankeyChart, SankeyChartSpecTransformer, SankeySeries, ScatterChart, ScatterSeries, ScrollBar, SequenceChart, SeriesMarkNameEnum, SeriesTypeEnum, SeriesTypeForThemeEnum, StreamLight, SunburstChart, SunburstSeries, SymbolMark, TextMark, ThemeManager, Title, Tooltip, TooltipResult, TotalLabel, TransformLevel, TreemapChart, TreemapSeries, USER_LAYOUT_RECT_LEVEL, VChart, VennChart, VennSeries, WaterfallChart, WaterfallSeries, WordCloudChart, WordCloudSeries, alternatingWave, animationConfig, barGrowIn, barGrowOut, barPresetAnimation, baseSeriesMark, boundsInRect, builtinThemes, calcLayoutNumber, calcPadding, centerToCorner, columnCenterToEdge, columnEdgeToCenter, columnLeftToRight, columnRightToLeft, computeActualDataScheme, convertPoint, cornerToCenter, createArc, createArea, createGroup, createLine, createRect, createRichText, createSymbol, createText, darkTheme, dataScheme, VChart as default, defaultThemeName, diagonalCenterToEdge, diagonalTopLeftToBottomRight, findMarkGraphic, functionTransform, getActualColor, getActualNumValue, getCartesianCrosshairRect, getCartesianDimensionInfo, getColorSchemeBySeries, getCombinedSizeOfRegions, getDataScheme, getDatumOfGraphic, getDiffAttributesOfGraphic, getDimensionInfoByValue, getFieldAlias, getFunnelTheme, getMergedTheme, getPolarDimensionInfo, getRegionStackGroup, getSpecInfo, getTheme, hasThemeMerged, isCollectionMark, isColorKey, isPercent, isPercentOffset, isProgressiveDataColorScheme, isTokenKey, isValidOrient, isXAxis, isYAxis, isZAxis, lightTheme, lookup, measureText, mergeFields, normalizeLayoutPaddingSpec, particleEffect, pieDisappear, pieEnter, pieExit, piePresetAnimation, pulseWave, queryColorFromColorScheme, queryToken, randomOpacity, registerAllEnv, registerAllMarks, registerAnimate, registerArcAnimation, registerArcMark, registerAreaChart, registerAreaMark, registerAreaSeries, registerBarChart, registerBarSeries, registerBoxplotChart, registerBoxplotSeries, registerBrowserEnv, registerBrush, registerCanvasTooltipHandler, registerCartesianBandAxis, registerCartesianCrossHair, registerCartesianLinearAxis, registerCartesianLogAxis, registerCartesianSymlogAxis, registerCartesianTimeAxis, registerChartPlugin, registerCirclePackingChart, registerCirclePackingSeries, registerCircularProgressChart, registerCircularProgressSeries, registerCommonChart, registerComponentMark, registerContinuousLegend, registerCorrelationChart, registerCustomAnimate, registerCustomMark, registerDataSetInstanceParser, registerDataSetInstanceTransform, registerDataZoom, registerDimensionEvents, registerDimensionHover, registerDimensionTooltipProcessor, registerDiscreteLegend, registerDomTooltipHandler, registerDotSeries, registerDragPlugin, registerElementActive, registerElementActiveByLegend, registerElementHighlight, registerElementHighlightByGroup, registerElementHighlightByKey, registerElementHighlightByLegend, registerElementHighlightByName, registerElementSelect, registerFormatPlugin, registerFunnelChart, registerFunnelSeries, registerGaugeChart, registerGaugePointerSeries, registerGaugeSeries, registerGeoCoordinate, registerGeoMarkPoint, registerGesturePlugin, registerGridLayout, registerGroupMark, registerGroupTooltipProcessor, registerHarmonyEnv, registerHeatmapChart, registerHeatmapSeries, registerHistogramChart, registerHtmlAttributePlugin, registerImageMark, registerIndicator, registerLabel, registerLarkEnv, registerLineChart, registerLineMark, registerLineSeries, registerLinearProgressChart, registerLinearProgressSeries, registerLinkSeries, registerLiquidChart, registerLiquidSeries, registerLynxEnv, registerMapChart, registerMapSeries, registerMarkArea, registerMarkFilterTransform, registerMarkLine, registerMarkMapTransform, registerMarkPoint, registerMarkTooltipProcessor, registerMediaQuery, registerMosaicChart, registerMosaicSeries, registerNodeEnv, registerPathMark, registerPieChart, registerPieSeries, registerPlayer, registerPolarBandAxis, registerPolarCrossHair, registerPolarLinearAxis, registerPolarMarkArea, registerPolarMarkLine, registerPolarMarkPoint, registerPolygonAnimation, registerPolygonMark, registerPoptip, registerRadarChart, registerRadarSeries, registerRangeAreaChart, registerRangeAreaSeries, registerRangeColumnChart, registerRangeColumnSeries, registerReactAttributePlugin, registerRectAnimation, registerRectMark, registerRippleMark, registerRoseChart, registerRoseSeries, registerRuleMark, registerSankeyChart, registerSankeySeries, registerScatterChart, registerScatterSeries, registerScrollBar, registerSequenceChart, registerSequentialAnimate, registerStateTransition, registerSunBurstSeries, registerSunburstChart, registerSymbolMark, registerTTEnv, registerTaroEnv, registerTextMark, registerTheme, registerTitle, registerTooltip, registerTotalLabel, registerTreemapChart, registerTreemapSeries, registerAnimate$1 as registerVRenderAnimate, registerVennChart, registerVennSeries, registerWXEnv, registerWaterfallChart, registerWaterfallSeries, registerWordCloudChart, registerWordCloudSeries, registerWordCloudShapeChart, removeTheme, rippleEffect, rotationScan, rowBottomToTop, rowCenterToEdge, rowEdgeToCenter, rowTopToBottom, shouldMarkDoMorph, snakeWave, sortStackValueGroup, specTransform, spiralEffect, stack, stackGroup, stackMosaic, stackMosaicTotal, stackOffsetSilhouette, stackTotal, themeExist, themes, token, transformColorSchemeToStandardStruct, transformToGraphic, userAnimationConfig, version, vglobal, warn };
|