@visactor/vchart-extension 2.1.6-alpha.1 → 2.1.6

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.
Files changed (65) hide show
  1. package/build/index.js +73 -38
  2. package/build/index.min.js +1 -1
  3. package/cjs/charts/3d/arc-3d.js +1 -1
  4. package/cjs/charts/3d/enum.js +1 -1
  5. package/cjs/charts/3d/graphic-creator.js +1 -1
  6. package/cjs/charts/3d/interface.js +1 -1
  7. package/cjs/charts/3d/layout.js +1 -1
  8. package/cjs/charts/3d/plugin.js +1 -1
  9. package/cjs/charts/3d/pyramid-3d.js +1 -1
  10. package/cjs/charts/3d/rect-3d.js +1 -1
  11. package/cjs/charts/3d/util.js +1 -1
  12. package/cjs/charts/axis-3d/band-axis.js +1 -2
  13. package/cjs/charts/axis-3d/log-axis.js +1 -1
  14. package/cjs/charts/axis-3d/symlog-axis.js +1 -1
  15. package/cjs/charts/axis-3d/theme.js +1 -1
  16. package/cjs/charts/axis-3d/time-axis.js +1 -1
  17. package/cjs/charts/axis-3d/util.js +1 -1
  18. package/cjs/charts/bar-3d/animation.js +1 -1
  19. package/cjs/charts/bar-3d/chart-spec-transformer.js +1 -1
  20. package/cjs/charts/bar-3d/chart.js +1 -1
  21. package/cjs/charts/bar-3d/constant.js +1 -1
  22. package/cjs/charts/bar-3d/index.js +1 -1
  23. package/cjs/charts/bar-3d/interface.js +2 -1
  24. package/cjs/charts/bar-3d/series-spec-transformer.js +1 -1
  25. package/cjs/charts/bar-3d/series.js +1 -1
  26. package/cjs/charts/bar-3d/theme.js +1 -1
  27. package/cjs/charts/candlestick/candlestick-transformer.js +1 -1
  28. package/cjs/charts/candlestick/candlestick.js +1 -1
  29. package/cjs/charts/candlestick/index.js +1 -1
  30. package/cjs/charts/candlestick/interface.js +1 -1
  31. package/cjs/charts/candlestick/util.js +1 -1
  32. package/cjs/components/series-break/util.js +1 -2
  33. package/cjs/components/series-label/util.js +2 -1
  34. package/esm/charts/3d/arc-3d.js +1 -1
  35. package/esm/charts/3d/enum.js +1 -1
  36. package/esm/charts/3d/graphic-creator.js +1 -1
  37. package/esm/charts/3d/interface.js +1 -1
  38. package/esm/charts/3d/layout.js +1 -1
  39. package/esm/charts/3d/plugin.js +1 -1
  40. package/esm/charts/3d/pyramid-3d.js +1 -1
  41. package/esm/charts/3d/rect-3d.js +1 -1
  42. package/esm/charts/3d/util.js +1 -1
  43. package/esm/charts/axis-3d/band-axis.js +1 -2
  44. package/esm/charts/axis-3d/log-axis.js +1 -1
  45. package/esm/charts/axis-3d/symlog-axis.js +1 -1
  46. package/esm/charts/axis-3d/theme.js +1 -1
  47. package/esm/charts/axis-3d/time-axis.js +1 -1
  48. package/esm/charts/axis-3d/util.js +1 -1
  49. package/esm/charts/bar-3d/animation.js +1 -1
  50. package/esm/charts/bar-3d/chart-spec-transformer.js +1 -1
  51. package/esm/charts/bar-3d/chart.js +1 -1
  52. package/esm/charts/bar-3d/constant.js +1 -1
  53. package/esm/charts/bar-3d/index.js +1 -1
  54. package/esm/charts/bar-3d/interface.js +2 -1
  55. package/esm/charts/bar-3d/series-spec-transformer.js +1 -1
  56. package/esm/charts/bar-3d/series.js +1 -1
  57. package/esm/charts/bar-3d/theme.js +1 -1
  58. package/esm/charts/candlestick/candlestick-transformer.js +1 -1
  59. package/esm/charts/candlestick/candlestick.js +1 -1
  60. package/esm/charts/candlestick/index.js +1 -1
  61. package/esm/charts/candlestick/interface.js +1 -1
  62. package/esm/charts/candlestick/util.js +1 -1
  63. package/esm/components/series-break/util.js +1 -2
  64. package/esm/components/series-label/util.js +2 -1
  65. package/package.json +8 -8
package/build/index.js CHANGED
@@ -2914,7 +2914,7 @@
2914
2914
  constructor() {
2915
2915
  super(), this._uid = Generator.GenAutoIncrementId(), this._firstChild = null, this._lastChild = null, this.parent = null, this._count = 1;
2916
2916
  }
2917
- onParentSharedStateTreeChanged(_stage, _layer) {}
2917
+ onParentSharedStateTreeChanged(_stage, _layer, _inheritedSharedStateScope) {}
2918
2918
  forEachChildren(cb, reverse = !1) {
2919
2919
  if (reverse) {
2920
2920
  let child = this._lastChild,
@@ -7427,14 +7427,17 @@
7427
7427
  }
7428
7428
  return null === (_a = this.stage) || void 0 === _a ? void 0 : _a.rootSharedStateScope;
7429
7429
  }
7430
- syncSharedStateScopeBindingFromTree(markDirty = !0) {
7430
+ syncSharedStateScopeBinding(nextScope, markDirty = !0) {
7431
7431
  var _a;
7432
- const nextScope = this.resolveBoundSharedStateScope();
7433
7432
  return this.boundSharedStateScope === nextScope ? (this.syncSharedStateActiveRegistrations(), !1) : (this.boundSharedStateScope = nextScope, this.boundSharedStateRevision = void 0, this.compiledStateDefinitions = void 0, this.compiledStateDefinitionsCacheKey = void 0, this.stateEngine = void 0, this.stateEngineCompiledDefinitions = void 0, this.syncSharedStateActiveRegistrations(), markDirty && (null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) && this.markSharedStateDirty(), !0);
7434
7433
  }
7435
- syncSharedStateScopeBindingOnTreeChange(markDirty = !0) {
7434
+ syncSharedStateScopeBindingFromTree(markDirty = !0, inheritedSharedStateScope) {
7435
+ const nextScope = void 0 === inheritedSharedStateScope ? this.resolveBoundSharedStateScope() : null != inheritedSharedStateScope ? inheritedSharedStateScope : void 0;
7436
+ return this.syncSharedStateScopeBinding(nextScope, markDirty);
7437
+ }
7438
+ syncSharedStateScopeBindingOnTreeChange(markDirty = !0, inheritedSharedStateScope) {
7436
7439
  var _a, _b;
7437
- return !!((null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) || this.boundSharedStateScope || (null === (_b = this.registeredActiveScopes) || void 0 === _b ? void 0 : _b.size) || this.sharedStateDirty) && this.syncSharedStateScopeBindingFromTree(markDirty);
7440
+ return !!((null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) || this.boundSharedStateScope || (null === (_b = this.registeredActiveScopes) || void 0 === _b ? void 0 : _b.size) || this.sharedStateDirty) && this.syncSharedStateScopeBindingFromTree(markDirty, inheritedSharedStateScope);
7438
7441
  }
7439
7442
  syncSharedStateActiveRegistrations() {
7440
7443
  var _a;
@@ -7442,6 +7445,7 @@
7442
7445
  if (!(null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) || !this.boundSharedStateScope) return (null == previousScopes ? void 0 : previousScopes.size) && (previousScopes.forEach(scope => {
7443
7446
  scope.subtreeActiveDescendants.delete(this);
7444
7447
  }), previousScopes.clear()), void (this.registeredActiveScopes = void 0);
7448
+ if ((null == previousScopes ? void 0 : previousScopes.size) && this.isSharedStateScopeChainRegistered(previousScopes)) return;
7445
7449
  const nextScopes = new Set(collectSharedStateScopeChain(this.boundSharedStateScope));
7446
7450
  null == previousScopes || previousScopes.forEach(scope => {
7447
7451
  nextScopes.has(scope) || scope.subtreeActiveDescendants.delete(this);
@@ -7449,6 +7453,15 @@
7449
7453
  scope.subtreeActiveDescendants.add(this);
7450
7454
  }), this.registeredActiveScopes = nextScopes;
7451
7455
  }
7456
+ isSharedStateScopeChainRegistered(previousScopes) {
7457
+ let scope = this.boundSharedStateScope,
7458
+ scopeCount = 0;
7459
+ for (; scope;) {
7460
+ if (!previousScopes.has(scope)) return !1;
7461
+ scopeCount += 1, scope = scope.parentScope;
7462
+ }
7463
+ return scopeCount === previousScopes.size;
7464
+ }
7452
7465
  clearSharedStateActiveRegistrations() {
7453
7466
  const previousScopes = this.registeredActiveScopes;
7454
7467
  previousScopes && (previousScopes.forEach(scope => {
@@ -7458,8 +7471,8 @@
7458
7471
  markSharedStateDirty() {
7459
7472
  this.sharedStateDirty = !0, enqueueGraphicSharedStateRefresh(this.stage, this), scheduleStageSharedStateRefresh(this.stage);
7460
7473
  }
7461
- onParentSharedStateTreeChanged(stage, layer) {
7462
- this.stage === stage && this.layer === layer ? this.syncSharedStateScopeBindingOnTreeChange() : this.setStage(stage, layer);
7474
+ onParentSharedStateTreeChanged(stage, layer, inheritedSharedStateScope) {
7475
+ this.stage === stage && this.layer === layer ? this.syncSharedStateScopeBindingOnTreeChange(!0, inheritedSharedStateScope) : this.setStage(stage, layer, inheritedSharedStateScope);
7463
7476
  }
7464
7477
  refreshSharedStateBeforeRender() {
7465
7478
  var _a;
@@ -8109,6 +8122,10 @@
8109
8122
  var _a;
8110
8123
  return null === (_a = this.states) || void 0 === _a ? void 0 : _a[stateName];
8111
8124
  }
8125
+ setStateDefinitionsWithCompiled(definitions, compiledDefinitions) {
8126
+ var _a;
8127
+ this.states = definitions, this.localStateDefinitionsSource !== definitions && (this.localStateDefinitionsSource = definitions, this.localStateDefinitionsVersion = (null !== (_a = this.localStateDefinitionsVersion) && void 0 !== _a ? _a : 0) + 1), this.compiledStateDefinitions = compiledDefinitions, this.compiledStateDefinitionsCacheKey = `local:${this.localStateDefinitionsVersion}`;
8128
+ }
8112
8129
  getStateResolveBaseAttrs() {
8113
8130
  var _a;
8114
8131
  return null !== (_a = this.baseAttributes) && void 0 !== _a ? _a : this.attribute;
@@ -8228,6 +8245,11 @@
8228
8245
  }
8229
8246
  return !0;
8230
8247
  }
8248
+ hasStatePatch(patch) {
8249
+ if (!patch) return !1;
8250
+ for (const key in patch) if (Object.prototype.hasOwnProperty.call(patch, key)) return !0;
8251
+ return !1;
8252
+ }
8231
8253
  commitSameStatePatchRefresh(states, hasAnimation, animateSameStatePatchChange = !1) {
8232
8254
  var _a;
8233
8255
  const previousStates = null !== (_a = this.currentStates) && void 0 !== _a ? _a : EMPTY_STATE_NAMES,
@@ -8295,15 +8317,17 @@
8295
8317
  transition = this.resolveClearStatesTransition();
8296
8318
  if (!transition.changed && 0 === previousStates.length) return this.currentStates = [], this.effectiveStates = [], this.resolvedStatePatch = void 0, this.sharedStateDirty = !1, void this.clearSharedStateActiveRegistrations();
8297
8319
  const resolvedStateAttrs = hasAnimation || this.hasCustomEvent("beforeStateUpdate") ? cloneAttributeValue(null !== (_b = this.baseAttributes) && void 0 !== _b ? _b : {}) : null !== (_c = this.baseAttributes) && void 0 !== _c ? _c : {};
8298
- if (!transition.changed || this.beforeStateUpdate(resolvedStateAttrs, previousStates, transition.states, hasAnimation, !0)) if (this.currentStates = transition.states, this.effectiveStates = [], this.resolvedStatePatch = void 0, this.sharedStateDirty = !1, this.clearSharedStateActiveRegistrations(), hasAnimation) {
8299
- this._syncFinalAttributeFromStaticTruth();
8300
- const removedStateAnimationAttrs = this.buildRemovedStateAnimationAttrs(resolvedStateAttrs, previousResolvedStatePatch);
8301
- this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, !0, void 0, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.extraAttrs, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.stateTransitionTargetAttrs);
8302
- } else this.stopStateAnimates(), this.attributeMayContainTransientAttrs ? this._restoreAttributeFromStaticTruth({
8303
- type: AttributeUpdateType.STATE
8304
- }) : this.restoreAttributeFromStatePatchDelta(previousResolvedStatePatch, void 0, {
8305
- type: AttributeUpdateType.STATE
8306
- }), this.emitStateUpdateEvent();
8320
+ if (!transition.changed || this.beforeStateUpdate(resolvedStateAttrs, previousStates, transition.states, hasAnimation, !0)) if (this.currentStates = transition.states, this.effectiveStates = [], this.resolvedStatePatch = void 0, this.sharedStateDirty = !1, this.clearSharedStateActiveRegistrations(), this.attributeMayContainTransientAttrs || this.hasStatePatch(previousResolvedStatePatch)) {
8321
+ if (hasAnimation) {
8322
+ this._syncFinalAttributeFromStaticTruth();
8323
+ const removedStateAnimationAttrs = this.buildRemovedStateAnimationAttrs(resolvedStateAttrs, previousResolvedStatePatch);
8324
+ this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, !0, void 0, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.extraAttrs, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.stateTransitionTargetAttrs);
8325
+ } else this.stopStateAnimates(), this.attributeMayContainTransientAttrs ? this._restoreAttributeFromStaticTruth({
8326
+ type: AttributeUpdateType.STATE
8327
+ }) : this.restoreAttributeFromStatePatchDelta(previousResolvedStatePatch, void 0, {
8328
+ type: AttributeUpdateType.STATE
8329
+ }), this.emitStateUpdateEvent();
8330
+ } else this.emitStateUpdateEvent();
8307
8331
  }
8308
8332
  removeState(stateName, hasAnimation) {
8309
8333
  const transition = this.resolveRemoveStateTransition(stateName);
@@ -8344,15 +8368,17 @@
8344
8368
  effectiveStates: effectiveStates,
8345
8369
  resolvedStateAttrs: resolvedStateAttrs
8346
8370
  } = this.resolveGraphicStateTransition(states);
8347
- if ((transition.changed || !this.sameStateNames(previousStates, transition.states)) && this.beforeStateUpdate(resolvedStateAttrs, previousStates, transition.states, hasAnimation, !1)) if (this.currentStates = transition.states, this.effectiveStates = [...effectiveStates], this.resolvedStatePatch = resolvedStateAttrs, this.sharedStateDirty = !1, this.syncSharedStateActiveRegistrations(), hasAnimation) {
8348
- this._syncFinalAttributeFromStaticTruth();
8349
- const removedStateAnimationAttrs = this.buildRemovedStateAnimationAttrs(resolvedStateAttrs, previousResolvedStatePatch);
8350
- this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, !1, void 0, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.extraAttrs, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.stateTransitionTargetAttrs);
8351
- } else this.stopStateAnimates(), this.attributeMayContainTransientAttrs ? this._restoreAttributeFromStaticTruth({
8352
- type: AttributeUpdateType.STATE
8353
- }) : this.restoreAttributeFromStatePatchDelta(previousResolvedStatePatch, this.resolvedStatePatch, {
8354
- type: AttributeUpdateType.STATE
8355
- }), this.emitStateUpdateEvent();
8371
+ if ((transition.changed || !this.sameStateNames(previousStates, transition.states)) && this.beforeStateUpdate(resolvedStateAttrs, previousStates, transition.states, hasAnimation, !1)) if (this.currentStates = transition.states, this.effectiveStates = [...effectiveStates], this.resolvedStatePatch = resolvedStateAttrs, this.sharedStateDirty = !1, this.syncSharedStateActiveRegistrations(), this.attributeMayContainTransientAttrs || this.hasStatePatch(previousResolvedStatePatch) || this.hasStatePatch(resolvedStateAttrs)) {
8372
+ if (hasAnimation) {
8373
+ this._syncFinalAttributeFromStaticTruth();
8374
+ const removedStateAnimationAttrs = this.buildRemovedStateAnimationAttrs(resolvedStateAttrs, previousResolvedStatePatch);
8375
+ this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, !1, void 0, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.extraAttrs, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.stateTransitionTargetAttrs);
8376
+ } else this.stopStateAnimates(), this.attributeMayContainTransientAttrs ? this._restoreAttributeFromStaticTruth({
8377
+ type: AttributeUpdateType.STATE
8378
+ }) : this.restoreAttributeFromStatePatchDelta(previousResolvedStatePatch, this.resolvedStatePatch, {
8379
+ type: AttributeUpdateType.STATE
8380
+ }), this.emitStateUpdateEvent();
8381
+ } else this.emitStateUpdateEvent();
8356
8382
  }
8357
8383
  invalidateResolver() {
8358
8384
  var _a, _b;
@@ -8472,12 +8498,12 @@
8472
8498
  this._globalTransMatrix.translate(scrollX, scrollY);
8473
8499
  }
8474
8500
  }
8475
- setStage(stage, layer) {
8501
+ setStage(stage, layer, inheritedSharedStateScope) {
8476
8502
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
8477
8503
  const graphicService = null !== (_c = null !== (_a = null == stage ? void 0 : stage.graphicService) && void 0 !== _a ? _a : null === (_b = this.stage) || void 0 === _b ? void 0 : _b.graphicService) && void 0 !== _c ? _c : application.graphicService,
8478
8504
  previousStage = this.stage;
8479
8505
  if (this.stage !== stage || this.layer !== layer) {
8480
- if (this.stage = stage, this.layer = layer, ((null === (_d = this.currentStates) || void 0 === _d ? void 0 : _d.length) || this.boundSharedStateScope || (null === (_e = this.registeredActiveScopes) || void 0 === _e ? void 0 : _e.size) || this.sharedStateDirty) && this.syncSharedStateScopeBindingOnTreeChange(!0), this.setStageToShadowRoot(stage, layer), this.mayHaveTrackedAnimates() && this.hasAnyTrackedAnimate()) {
8506
+ if (this.stage = stage, this.layer = layer, ((null === (_d = this.currentStates) || void 0 === _d ? void 0 : _d.length) || this.boundSharedStateScope || (null === (_e = this.registeredActiveScopes) || void 0 === _e ? void 0 : _e.size) || this.sharedStateDirty) && this.syncSharedStateScopeBindingOnTreeChange(!0, inheritedSharedStateScope), this.setStageToShadowRoot(stage, layer), this.mayHaveTrackedAnimates() && this.hasAnyTrackedAnimate()) {
8481
8507
  const previousTimeline = null === (_f = null == previousStage ? void 0 : previousStage.getTimeline) || void 0 === _f ? void 0 : _f.call(previousStage),
8482
8508
  nextTimeline = null === (_g = null == stage ? void 0 : stage.getTimeline) || void 0 === _g ? void 0 : _g.call(stage),
8483
8509
  detachedStageAnimates = [];
@@ -8494,7 +8520,7 @@
8494
8520
  }
8495
8521
  return this._onSetStage && this._onSetStage(this, stage, layer), void (null === (_h = null == graphicService ? void 0 : graphicService.onSetStage) || void 0 === _h || _h.call(graphicService, this, stage));
8496
8522
  }
8497
- ((null === (_j = this.currentStates) || void 0 === _j ? void 0 : _j.length) || this.boundSharedStateScope || (null === (_k = this.registeredActiveScopes) || void 0 === _k ? void 0 : _k.size) || this.sharedStateDirty) && this.syncSharedStateScopeBindingOnTreeChange(!0);
8523
+ ((null === (_j = this.currentStates) || void 0 === _j ? void 0 : _j.length) || this.boundSharedStateScope || (null === (_k = this.registeredActiveScopes) || void 0 === _k ? void 0 : _k.size) || this.sharedStateDirty) && this.syncSharedStateScopeBindingOnTreeChange(!0, inheritedSharedStateScope);
8498
8524
  }
8499
8525
  detachStageForRelease() {
8500
8526
  var _a, _b, _c;
@@ -8916,13 +8942,13 @@
8916
8942
  child.setStage(null, null);
8917
8943
  }), this.addUpdateBoundTag();
8918
8944
  }
8919
- setStage(stage, layer) {
8945
+ setStage(stage, layer, inheritedSharedStateScope) {
8920
8946
  var _a, _b, _c, _d, _e, _f;
8921
8947
  const graphicService = null !== (_c = null !== (_a = null == stage ? void 0 : stage.graphicService) && void 0 !== _a ? _a : null === (_b = this.stage) || void 0 === _b ? void 0 : _b.graphicService) && void 0 !== _c ? _c : application.graphicService,
8922
8948
  needsSharedStateTreeSync = this.hasSharedStateDefinitions() || this.sharedStateScope || (null === (_d = this.currentStates) || void 0 === _d ? void 0 : _d.length) || this.boundSharedStateScope || (null === (_e = this.registeredActiveScopes) || void 0 === _e ? void 0 : _e.size) || this.sharedStateDirty;
8923
- if (this.stage !== stage) return this.stage = stage, this.layer = layer, needsSharedStateTreeSync && (this.ensureSharedStateScopeBound(), this.syncSharedStateScopeBindingOnTreeChange(!0)), this.setStageToShadowRoot(stage, layer), this._onSetStage && this._onSetStage(this, stage, layer), null === (_f = null == graphicService ? void 0 : graphicService.onSetStage) || void 0 === _f || _f.call(graphicService, this, stage), void this.notifyChildrenSharedStateTreeChanged();
8949
+ if (this.stage !== stage) return this.stage = stage, this.layer = layer, needsSharedStateTreeSync && (this.ensureSharedStateScopeBound(), this.syncSharedStateScopeBindingOnTreeChange(!0, inheritedSharedStateScope)), this.setStageToShadowRoot(stage, layer), this._onSetStage && this._onSetStage(this, stage, layer), null === (_f = null == graphicService ? void 0 : graphicService.onSetStage) || void 0 === _f || _f.call(graphicService, this, stage), void this.notifyChildrenSharedStateTreeChanged(inheritedSharedStateScope);
8924
8950
  const layerChanged = this.layer !== layer;
8925
- layerChanged && (this.layer = layer), needsSharedStateTreeSync ? (this.ensureSharedStateScopeBound(), this.syncSharedStateScopeBindingOnTreeChange(!0), this.notifyChildrenSharedStateTreeChanged()) : layerChanged && this.notifyChildrenSharedStateTreeChanged();
8951
+ layerChanged && (this.layer = layer), needsSharedStateTreeSync ? (this.ensureSharedStateScopeBound(), this.syncSharedStateScopeBindingOnTreeChange(!0, inheritedSharedStateScope), this.notifyChildrenSharedStateTreeChanged(inheritedSharedStateScope)) : layerChanged && this.notifyChildrenSharedStateTreeChanged(inheritedSharedStateScope);
8926
8952
  }
8927
8953
  addUpdatePositionTag() {
8928
8954
  super.addUpdatePositionTag(), this.forEachChildren(g => {
@@ -8981,17 +9007,26 @@
8981
9007
  hasSharedStateDefinitions() {
8982
9008
  return !!this._sharedStateDefinitions && Object.keys(this._sharedStateDefinitions).length > 0;
8983
9009
  }
8984
- notifyChildrenSharedStateTreeChanged() {
9010
+ resolveChildSharedStateScope(inheritedSharedStateScope) {
9011
+ var _a;
9012
+ return this.sharedStateScope ? this.sharedStateScope : void 0 !== inheritedSharedStateScope ? inheritedSharedStateScope : null !== (_a = this.resolveBoundSharedStateScope()) && void 0 !== _a ? _a : null;
9013
+ }
9014
+ notifyChildrenSharedStateTreeChanged(inheritedSharedStateScope) {
9015
+ const childSharedStateScope = this.resolveChildSharedStateScope(inheritedSharedStateScope);
8985
9016
  this.forEachChildren(item => {
8986
- this.syncChildSharedStateTreeBinding(item);
9017
+ this.setStageToChild(item, childSharedStateScope);
8987
9018
  });
8988
9019
  }
8989
- syncChildSharedStateTreeBinding(child) {
8990
- child.onParentSharedStateTreeChanged(this.stage, this.layer);
9020
+ setStageToChild(child, inheritedSharedStateScope) {
9021
+ const graphic = child;
9022
+ "function" != typeof graphic.setStage || child.onParentSharedStateTreeChanged !== Graphic.prototype.onParentSharedStateTreeChanged && child.onParentSharedStateTreeChanged !== Group.prototype.onParentSharedStateTreeChanged || graphic.stage === this.stage && graphic.layer === this.layer ? child.onParentSharedStateTreeChanged(this.stage, this.layer, inheritedSharedStateScope) : graphic.setStage(this.stage, this.layer, inheritedSharedStateScope);
9023
+ }
9024
+ syncChildSharedStateTreeBinding(child, inheritedSharedStateScope) {
9025
+ void 0 === inheritedSharedStateScope && (inheritedSharedStateScope = this.resolveChildSharedStateScope()), this.setStageToChild(child, inheritedSharedStateScope);
8991
9026
  }
8992
- onParentSharedStateTreeChanged(stage, layer) {
9027
+ onParentSharedStateTreeChanged(stage, layer, inheritedSharedStateScope) {
8993
9028
  var _a;
8994
- this.stage === stage && this.layer === layer ? (this.ensureSharedStateScopeBound(), this.syncSharedStateScopeBindingOnTreeChange(!!(null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length)), this.notifyChildrenSharedStateTreeChanged()) : this.setStage(stage, layer);
9029
+ this.stage === stage && this.layer === layer ? (this.ensureSharedStateScopeBound(), this.syncSharedStateScopeBindingOnTreeChange(!!(null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length), inheritedSharedStateScope), this.notifyChildrenSharedStateTreeChanged(inheritedSharedStateScope)) : this.setStage(stage, layer, inheritedSharedStateScope);
8995
9030
  }
8996
9031
  }
8997
9032
  Group.NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR;
@@ -10343,7 +10378,7 @@
10343
10378
  }
10344
10379
 
10345
10380
  var _a;
10346
- const factoryRegistryKey = Symbol.for("@visactor/vchart/factory-registry@2.1.4"),
10381
+ const factoryRegistryKey = Symbol.for("@visactor/vchart/factory-registry@2.1.6"),
10347
10382
  globalFactoryRegistry = globalThis;
10348
10383
  const factoryRegistry = null !== (_a = globalFactoryRegistry[factoryRegistryKey]) && void 0 !== _a ? _a : globalFactoryRegistry[factoryRegistryKey] = {
10349
10384
  charts: {},