@visactor/vchart 2.1.0-alpha.2 → 2.1.0-alpha.4

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 (146) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.es.js +518 -82
  3. package/build/index.js +518 -82
  4. package/build/index.min.js +2 -2
  5. package/build/tsconfig.tsbuildinfo +1 -1
  6. package/cjs/chart/base/base-chart-transformer.js +2 -2
  7. package/cjs/chart/base/base-chart-transformer.js.map +1 -1
  8. package/cjs/chart/base/base-chart.d.ts +8 -0
  9. package/cjs/chart/base/base-chart.js +72 -11
  10. package/cjs/chart/base/base-chart.js.map +1 -1
  11. package/cjs/component/axis/base-axis.js +3 -5
  12. package/cjs/component/axis/base-axis.js.map +1 -1
  13. package/cjs/component/axis/mixin/linear-axis-mixin.js +7 -10
  14. package/cjs/component/axis/mixin/linear-axis-mixin.js.map +1 -1
  15. package/cjs/component/brush/brush.d.ts +1 -0
  16. package/cjs/component/brush/brush.js +19 -5
  17. package/cjs/component/brush/brush.js.map +1 -1
  18. package/cjs/component/crosshair/base.d.ts +3 -0
  19. package/cjs/component/crosshair/base.js +30 -2
  20. package/cjs/component/crosshair/base.js.map +1 -1
  21. package/cjs/component/custom-mark/custom-mark.d.ts +3 -0
  22. package/cjs/component/custom-mark/custom-mark.js +27 -3
  23. package/cjs/component/custom-mark/custom-mark.js.map +1 -1
  24. package/cjs/component/data-zoom/data-filter-base-component.d.ts +2 -0
  25. package/cjs/component/data-zoom/data-filter-base-component.js +15 -2
  26. package/cjs/component/data-zoom/data-filter-base-component.js.map +1 -1
  27. package/cjs/component/data-zoom/data-zoom/data-zoom.d.ts +1 -0
  28. package/cjs/component/data-zoom/data-zoom/data-zoom.js +19 -1
  29. package/cjs/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
  30. package/cjs/component/data-zoom/scroll-bar/scroll-bar.d.ts +1 -0
  31. package/cjs/component/data-zoom/scroll-bar/scroll-bar.js +12 -1
  32. package/cjs/component/data-zoom/scroll-bar/scroll-bar.js.map +1 -1
  33. package/cjs/component/indicator/indicator.d.ts +1 -0
  34. package/cjs/component/indicator/indicator.js +9 -0
  35. package/cjs/component/indicator/indicator.js.map +1 -1
  36. package/cjs/component/label/base-label.js +6 -2
  37. package/cjs/component/label/base-label.js.map +1 -1
  38. package/cjs/component/marker/base-marker.d.ts +7 -0
  39. package/cjs/component/marker/base-marker.js +77 -8
  40. package/cjs/component/marker/base-marker.js.map +1 -1
  41. package/cjs/component/marker/mark-area/cartesian-mark-area.js +3 -3
  42. package/cjs/component/marker/mark-area/cartesian-mark-area.js.map +1 -1
  43. package/cjs/component/marker/mark-area/polar-mark-area.js +2 -2
  44. package/cjs/component/marker/mark-area/polar-mark-area.js.map +1 -1
  45. package/cjs/component/marker/mark-line/cartesian-mark-line.js +2 -2
  46. package/cjs/component/marker/mark-line/cartesian-mark-line.js.map +1 -1
  47. package/cjs/component/marker/mark-line/polar-mark-line.js +2 -2
  48. package/cjs/component/marker/mark-line/polar-mark-line.js.map +1 -1
  49. package/cjs/component/marker/mark-point/base-mark-point.js +4 -3
  50. package/cjs/component/marker/mark-point/base-mark-point.js.map +1 -1
  51. package/cjs/component/marker/mark-point/cartesian-mark-point.js +2 -2
  52. package/cjs/component/marker/mark-point/cartesian-mark-point.js.map +1 -1
  53. package/cjs/component/marker/mark-point/polar-mark-point.js +1 -1
  54. package/cjs/component/marker/mark-point/polar-mark-point.js.map +1 -1
  55. package/cjs/component/marker/utils.d.ts +4 -4
  56. package/cjs/component/marker/utils.js +27 -23
  57. package/cjs/component/marker/utils.js.map +1 -1
  58. package/cjs/component/player/player.d.ts +1 -0
  59. package/cjs/component/player/player.js +10 -0
  60. package/cjs/component/player/player.js.map +1 -1
  61. package/cjs/component/tooltip/tooltip.d.ts +1 -0
  62. package/cjs/component/tooltip/tooltip.js +8 -0
  63. package/cjs/component/tooltip/tooltip.js.map +1 -1
  64. package/cjs/constant/funnel.js +1 -2
  65. package/cjs/constant/scatter.js +2 -1
  66. package/cjs/constant/scroll-bar.js +1 -1
  67. package/cjs/constant/sunburst.js +1 -1
  68. package/cjs/constant/waterfall.js +1 -1
  69. package/cjs/constant/word-cloud.js +1 -1
  70. package/cjs/core/instance-manager.js +1 -1
  71. package/cjs/core/interface.js +1 -1
  72. package/cjs/core/util.js +1 -1
  73. package/cjs/core/vchart.js +1 -1
  74. package/cjs/series/base/base-series.js +13 -5
  75. package/cjs/series/base/base-series.js.map +1 -1
  76. package/esm/chart/base/base-chart-transformer.js +2 -2
  77. package/esm/chart/base/base-chart-transformer.js.map +1 -1
  78. package/esm/chart/base/base-chart.d.ts +8 -0
  79. package/esm/chart/base/base-chart.js +69 -9
  80. package/esm/chart/base/base-chart.js.map +1 -1
  81. package/esm/component/axis/base-axis.js +3 -5
  82. package/esm/component/axis/base-axis.js.map +1 -1
  83. package/esm/component/axis/mixin/linear-axis-mixin.js +7 -10
  84. package/esm/component/axis/mixin/linear-axis-mixin.js.map +1 -1
  85. package/esm/component/brush/brush.d.ts +1 -0
  86. package/esm/component/brush/brush.js +17 -4
  87. package/esm/component/brush/brush.js.map +1 -1
  88. package/esm/component/crosshair/base.d.ts +3 -0
  89. package/esm/component/crosshair/base.js +26 -2
  90. package/esm/component/crosshair/base.js.map +1 -1
  91. package/esm/component/custom-mark/custom-mark.d.ts +3 -0
  92. package/esm/component/custom-mark/custom-mark.js +27 -2
  93. package/esm/component/custom-mark/custom-mark.js.map +1 -1
  94. package/esm/component/data-zoom/data-filter-base-component.d.ts +2 -0
  95. package/esm/component/data-zoom/data-filter-base-component.js +14 -2
  96. package/esm/component/data-zoom/data-filter-base-component.js.map +1 -1
  97. package/esm/component/data-zoom/data-zoom/data-zoom.d.ts +1 -0
  98. package/esm/component/data-zoom/data-zoom/data-zoom.js +20 -0
  99. package/esm/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
  100. package/esm/component/data-zoom/scroll-bar/scroll-bar.d.ts +1 -0
  101. package/esm/component/data-zoom/scroll-bar/scroll-bar.js +12 -1
  102. package/esm/component/data-zoom/scroll-bar/scroll-bar.js.map +1 -1
  103. package/esm/component/indicator/indicator.d.ts +1 -0
  104. package/esm/component/indicator/indicator.js +9 -0
  105. package/esm/component/indicator/indicator.js.map +1 -1
  106. package/esm/component/label/base-label.js +5 -1
  107. package/esm/component/label/base-label.js.map +1 -1
  108. package/esm/component/marker/base-marker.d.ts +7 -0
  109. package/esm/component/marker/base-marker.js +76 -7
  110. package/esm/component/marker/base-marker.js.map +1 -1
  111. package/esm/component/marker/mark-area/cartesian-mark-area.js +3 -3
  112. package/esm/component/marker/mark-area/cartesian-mark-area.js.map +1 -1
  113. package/esm/component/marker/mark-area/polar-mark-area.js +2 -2
  114. package/esm/component/marker/mark-area/polar-mark-area.js.map +1 -1
  115. package/esm/component/marker/mark-line/cartesian-mark-line.js +2 -2
  116. package/esm/component/marker/mark-line/cartesian-mark-line.js.map +1 -1
  117. package/esm/component/marker/mark-line/polar-mark-line.js +2 -2
  118. package/esm/component/marker/mark-line/polar-mark-line.js.map +1 -1
  119. package/esm/component/marker/mark-point/base-mark-point.js +3 -3
  120. package/esm/component/marker/mark-point/base-mark-point.js.map +1 -1
  121. package/esm/component/marker/mark-point/cartesian-mark-point.js +1 -1
  122. package/esm/component/marker/mark-point/cartesian-mark-point.js.map +1 -1
  123. package/esm/component/marker/mark-point/polar-mark-point.js +1 -1
  124. package/esm/component/marker/mark-point/polar-mark-point.js.map +1 -1
  125. package/esm/component/marker/utils.d.ts +4 -4
  126. package/esm/component/marker/utils.js +27 -23
  127. package/esm/component/marker/utils.js.map +1 -1
  128. package/esm/component/player/player.d.ts +1 -0
  129. package/esm/component/player/player.js +10 -0
  130. package/esm/component/player/player.js.map +1 -1
  131. package/esm/component/tooltip/tooltip.d.ts +1 -0
  132. package/esm/component/tooltip/tooltip.js +9 -1
  133. package/esm/component/tooltip/tooltip.js.map +1 -1
  134. package/esm/constant/funnel.js +1 -2
  135. package/esm/constant/scatter.js +2 -1
  136. package/esm/constant/scroll-bar.js +1 -1
  137. package/esm/constant/sunburst.js +1 -1
  138. package/esm/constant/waterfall.js +1 -1
  139. package/esm/constant/word-cloud.js +1 -1
  140. package/esm/core/instance-manager.js +1 -1
  141. package/esm/core/interface.js +1 -1
  142. package/esm/core/util.js +1 -1
  143. package/esm/core/vchart.js +1 -1
  144. package/esm/series/base/base-series.js +13 -5
  145. package/esm/series/base/base-series.js.map +1 -1
  146. package/package.json +4 -4
package/build/index.es.js CHANGED
@@ -68791,6 +68791,15 @@ const defaultSeriesSpecUpdatePolicy = {
68791
68791
  compileOnlyKeys: defaultSeriesCompileOnlyCheckKeys,
68792
68792
  dataRelatedKeys: defaultSeriesDataRelatedCheckKeys
68793
68793
  };
68794
+ const defaultSeriesMarkCompileOnlySubKeys = {
68795
+ interactive: true,
68796
+ zIndex: true,
68797
+ visible: true,
68798
+ style: true,
68799
+ state: true,
68800
+ stateSort: true,
68801
+ customShape: true
68802
+ };
68794
68803
  const isSpecObject = (value) => isObject$2(value) && !isArray$1(value) && !isFunction$1(value);
68795
68804
  const hasOnlyAllowedSubKeyChanges = (specValue, prevSpecValue, allowedSubKeys) => {
68796
68805
  if (!isSpecObject(specValue) || !isSpecObject(prevSpecValue)) {
@@ -69541,12 +69550,13 @@ class BaseSeries extends BaseModel {
69541
69550
  if (result.reMake) {
69542
69551
  return result;
69543
69552
  }
69544
- if (!result.reCompile &&
69545
- this._marks.getMarks().some(m => {
69546
- var _a, _b;
69547
- ignores[m.name] = true;
69548
- return ((_a = prevSpec[m.name]) === null || _a === void 0 ? void 0 : _a.visible) !== ((_b = spec[m.name]) === null || _b === void 0 ? void 0 : _b.visible);
69549
- })) {
69553
+ const changedMarkCompileOnlyKeys = this.getMarksWithoutRoot()
69554
+ .map(m => m.name)
69555
+ .filter(name => hasOnlyAllowedSubKeyChanges(spec[name], prevSpec[name], defaultSeriesMarkCompileOnlySubKeys));
69556
+ changedMarkCompileOnlyKeys.forEach(k => {
69557
+ ignores[k] = true;
69558
+ });
69559
+ if (!result.reCompile && changedMarkCompileOnlyKeys.length) {
69550
69560
  result.reCompile = true;
69551
69561
  }
69552
69562
  const changedCompileKeys = currentKeys.filter((k) => {
@@ -69567,7 +69577,7 @@ class BaseSeries extends BaseModel {
69567
69577
  }
69568
69578
  else if (result.reCompile &&
69569
69579
  !((_d = result.effects) === null || _d === void 0 ? void 0 : _d.series) &&
69570
- (changedCompileKeys.length || changedCompileOnlySubKeys.length)) {
69580
+ (changedCompileKeys.length || changedCompileOnlySubKeys.length || changedMarkCompileOnlyKeys.length)) {
69571
69581
  markSeriesCompileEffect(result);
69572
69582
  }
69573
69583
  if (currentKeys.some((k) => {
@@ -72647,6 +72657,7 @@ class AxisComponent extends BaseComponent {
72647
72657
  }
72648
72658
  }
72649
72659
  _compareSpec(spec, prevSpec) {
72660
+ var _a, _b;
72650
72661
  const result = super._compareSpec(spec, prevSpec);
72651
72662
  if (result.reMake) {
72652
72663
  return result;
@@ -72657,10 +72668,10 @@ class AxisComponent extends BaseComponent {
72657
72668
  result.reMake = true;
72658
72669
  return result;
72659
72670
  }
72660
- result.reMake = ['grid', 'subGrid', 'tick', 'subTick', 'label', 'domainLine', 'title'].some(k => {
72661
- var _a, _b;
72662
- return ((_a = prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec[k]) === null || _a === void 0 ? void 0 : _a.visible) !== ((_b = spec === null || spec === void 0 ? void 0 : spec[k]) === null || _b === void 0 ? void 0 : _b.visible);
72663
- });
72671
+ if (((_a = spec === null || spec === void 0 ? void 0 : spec.grid) === null || _a === void 0 ? void 0 : _a.visible) === true && ((_b = prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec.grid) === null || _b === void 0 ? void 0 : _b.visible) !== true && !this._gridMark) {
72672
+ result.reMake = true;
72673
+ return result;
72674
+ }
72664
72675
  if (specChanged && !result.reMake && this._isComponentOnlySpecChange(spec, prevSpec)) {
72665
72676
  result.effects = Object.assign(Object.assign({}, result.effects), { component: true, layout: true, render: true });
72666
72677
  }
@@ -73999,21 +74010,18 @@ class LinearAxisMixin {
73999
74010
  }
74000
74011
  setExtendDomain(key, value) {
74001
74012
  if (value === undefined) {
74013
+ if (!Object.prototype.hasOwnProperty.call(this._extend, key)) {
74014
+ return;
74015
+ }
74002
74016
  delete this._extend[key];
74003
- return;
74004
74017
  }
74005
- this._extend[key] = value;
74006
- const domain = this._scale.domain();
74007
- this.extendDomain(domain);
74008
- this.includeZero(domain);
74009
- this.setDomainMinMax(domain);
74010
- this.niceDomain(domain);
74011
- this._scale.domain(domain, this._nice);
74012
- if (this._nice) {
74013
- const niced = this.setScaleNice();
74014
- !niced && this._scale.rescale();
74018
+ else {
74019
+ if (this._extend[key] === value) {
74020
+ return;
74021
+ }
74022
+ this._extend[key] = value;
74015
74023
  }
74016
- this.event.emit(ChartEvent.scaleUpdate, { model: this, value: 'domain' });
74024
+ this.updateScaleDomain();
74017
74025
  }
74018
74026
  extendDomain(domain) {
74019
74027
  let temp;
@@ -75950,6 +75958,21 @@ const MARKER_COMPONENT_SPEC_KEYS = {
75950
75958
  [ComponentTypeEnum.markLine]: true,
75951
75959
  [ComponentTypeEnum.markArea]: true
75952
75960
  };
75961
+ const MARKER_ADDITION_REMAKE_SPEC_KEYS = {
75962
+ autoRange: true,
75963
+ regionId: true,
75964
+ regionIndex: true,
75965
+ seriesId: true,
75966
+ seriesIndex: true,
75967
+ relativeSeriesId: true,
75968
+ relativeSeriesIndex: true,
75969
+ startRelativeSeriesId: true,
75970
+ startRelativeSeriesIndex: true,
75971
+ endRelativeSeriesId: true,
75972
+ endRelativeSeriesIndex: true,
75973
+ specifiedDataSeriesId: true,
75974
+ specifiedDataSeriesIndex: true
75975
+ };
75953
75976
  class BaseChart extends CompilableBase {
75954
75977
  getSpec() {
75955
75978
  return this._spec;
@@ -76124,6 +76147,12 @@ class BaseChart extends CompilableBase {
76124
76147
  this.getComponentsByType = (type) => {
76125
76148
  return this._components.filter(c => c.type === type);
76126
76149
  };
76150
+ this._isMarkerAdditionSpecSafeWithoutRemake = (spec) => {
76151
+ if (!spec || typeof spec !== 'object' || spec.visible === false) {
76152
+ return false;
76153
+ }
76154
+ return !Object.keys(MARKER_ADDITION_REMAKE_SPEC_KEYS).some(key => !isNil$1(spec[key]));
76155
+ };
76127
76156
  this._paddingSpec = normalizeLayoutPaddingSpec((_a = spec.padding) !== null && _a !== void 0 ? _a : option.getTheme('padding'));
76128
76157
  this._event = new Event$1(option.eventDispatcher, option.mode);
76129
76158
  this._dataSet = option.dataSet;
@@ -76523,7 +76552,7 @@ class BaseChart extends CompilableBase {
76523
76552
  .sort();
76524
76553
  }
76525
76554
  updateSpec(spec) {
76526
- var _a;
76555
+ var _a, _b;
76527
76556
  const result = {
76528
76557
  change: false,
76529
76558
  reMake: false,
@@ -76549,7 +76578,7 @@ class BaseChart extends CompilableBase {
76549
76578
  const nextSpec = spec[key];
76550
76579
  if (isArray$1(currentSpec) &&
76551
76580
  currentSpec.length !== array(nextSpec).length &&
76552
- !this._canRemoveMarkerComponentsWithoutRemake(key, currentSpec, nextSpec)) {
76581
+ !this._canChangeMarkerComponentsWithoutRemake(key, currentSpec, nextSpec)) {
76553
76582
  result.reMake = true;
76554
76583
  this.setLayoutTag(true, null, false);
76555
76584
  return result;
@@ -76584,16 +76613,19 @@ class BaseChart extends CompilableBase {
76584
76613
  this.setLayoutTag(true, null, false);
76585
76614
  return result;
76586
76615
  }
76616
+ if (!onlyComponentSpecsChanged && ((_a = result.effects) === null || _a === void 0 ? void 0 : _a.localOnly)) {
76617
+ delete result.effects.localOnly;
76618
+ }
76587
76619
  if (isUpdateSpecResultLocalOnly(result)) {
76588
76620
  return result;
76589
76621
  }
76590
76622
  if (onlyComponentSpecsChanged &&
76591
76623
  !componentUpdateResult.hasNonComponentOnlyUpdate &&
76592
- isUpdateSpecResultComponentOnly(result)) {
76624
+ (isUpdateSpecResultComponentOnly(result) || this._isComponentScaleDomainOnlyUpdate(result))) {
76593
76625
  componentUpdateResult.componentOnlyUpdatedComponents.forEach(component => {
76594
76626
  component.reInit(component.getSpec());
76595
76627
  });
76596
- if ((_a = result.effects) === null || _a === void 0 ? void 0 : _a.layout) {
76628
+ if ((_b = result.effects) === null || _b === void 0 ? void 0 : _b.layout) {
76597
76629
  this.setLayoutTag(true, null, false);
76598
76630
  }
76599
76631
  return result;
@@ -76606,7 +76638,9 @@ class BaseChart extends CompilableBase {
76606
76638
  this.reInit();
76607
76639
  if (!onlySeriesSpecsChanged || !this._canSkipChartDataStages(result)) {
76608
76640
  this.updateDataSpec();
76609
- this.updateGlobalScaleDomain();
76641
+ this.reDataFlow();
76642
+ this._reRunStackDataFlow();
76643
+ this.getAllModels().forEach(model => model.onDataUpdate());
76610
76644
  }
76611
76645
  return result;
76612
76646
  }
@@ -76667,7 +76701,8 @@ class BaseChart extends CompilableBase {
76667
76701
  const componentSpec = (_b = cmpSpec[c.getSpecIndex()]) !== null && _b !== void 0 ? _b : {};
76668
76702
  const previousComponentSpec = c.getSpec();
76669
76703
  const componentResult = c.updateSpec(componentSpec, cmpSpec);
76670
- if (isUpdateSpecResultComponentOnly(componentResult)) {
76704
+ if (isUpdateSpecResultComponentOnly(componentResult) ||
76705
+ this._isComponentScaleDomainOnlyUpdate(componentResult)) {
76671
76706
  componentOnlyUpdatedComponents.push(c);
76672
76707
  }
76673
76708
  else if (!isEqual(previousComponentSpec, componentSpec)) {
@@ -76678,7 +76713,8 @@ class BaseChart extends CompilableBase {
76678
76713
  else {
76679
76714
  const previousComponentSpec = c.getSpec();
76680
76715
  const componentResult = c.updateSpec(cmpSpec);
76681
- if (isUpdateSpecResultComponentOnly(componentResult)) {
76716
+ if (isUpdateSpecResultComponentOnly(componentResult) ||
76717
+ this._isComponentScaleDomainOnlyUpdate(componentResult)) {
76682
76718
  componentOnlyUpdatedComponents.push(c);
76683
76719
  }
76684
76720
  else if (!isEqual(previousComponentSpec, cmpSpec)) {
@@ -76687,6 +76723,9 @@ class BaseChart extends CompilableBase {
76687
76723
  mergeUpdateResult(result, componentResult);
76688
76724
  }
76689
76725
  });
76726
+ if (!result.reMake) {
76727
+ this._createMissingMarkerComponentsForSpecs(result, componentCache);
76728
+ }
76690
76729
  for (const key in componentCache) {
76691
76730
  if (Object.prototype.hasOwnProperty.call(componentCache, key)) {
76692
76731
  const element = componentCache[key];
@@ -76717,6 +76756,19 @@ class BaseChart extends CompilableBase {
76717
76756
  hasNonComponentOnlyUpdate
76718
76757
  };
76719
76758
  }
76759
+ _canChangeMarkerComponentsWithoutRemake(key, currentSpec, nextSpec) {
76760
+ return (this._canRemoveMarkerComponentsWithoutRemake(key, currentSpec, nextSpec) ||
76761
+ this._canAddMarkerComponentsWithoutRemake(key, currentSpec, nextSpec));
76762
+ }
76763
+ _canAddMarkerComponentsWithoutRemake(key, currentSpec, nextSpec) {
76764
+ if (!MARKER_COMPONENT_SPEC_KEYS[key] || !isArray$1(currentSpec) || !isArray$1(nextSpec)) {
76765
+ return false;
76766
+ }
76767
+ if (nextSpec.length <= currentSpec.length) {
76768
+ return false;
76769
+ }
76770
+ return nextSpec.slice(currentSpec.length).every(this._isMarkerAdditionSpecSafeWithoutRemake);
76771
+ }
76720
76772
  _canRemoveMarkerComponentsWithoutRemake(key, currentSpec, nextSpec) {
76721
76773
  return (MARKER_COMPONENT_SPEC_KEYS[key] &&
76722
76774
  isArray$1(currentSpec) &&
@@ -76736,6 +76788,9 @@ class BaseChart extends CompilableBase {
76736
76788
  return hasMarkerRemoval && onlyMarkerRemoval;
76737
76789
  }
76738
76790
  _isComponentSpecKey(key) {
76791
+ if (MARKER_COMPONENT_SPEC_KEYS[key]) {
76792
+ return true;
76793
+ }
76739
76794
  return this._components.some(component => {
76740
76795
  return (component.specKey || component.type) === key;
76741
76796
  });
@@ -76778,6 +76833,74 @@ class BaseChart extends CompilableBase {
76778
76833
  const effects = result.effects;
76779
76834
  return !!(effects === null || effects === void 0 ? void 0 : effects.series) && !effects.remake && !effects.data && !effects.scaleDomain && !result.reMake;
76780
76835
  }
76836
+ _isComponentScaleDomainOnlyUpdate(result) {
76837
+ const effects = result.effects;
76838
+ return (!!(effects === null || effects === void 0 ? void 0 : effects.component) &&
76839
+ !!effects.scaleDomain &&
76840
+ !result.reMake &&
76841
+ !result.reCompile &&
76842
+ !result.reSize &&
76843
+ !effects.remake &&
76844
+ !effects.compile &&
76845
+ !effects.data &&
76846
+ !effects.series &&
76847
+ !effects.animation &&
76848
+ !result.reTransformSpec &&
76849
+ !result.reAnimate &&
76850
+ !result.changeTheme &&
76851
+ !result.changeBackground);
76852
+ }
76853
+ _reRunStackDataFlow() {
76854
+ var _a, _b;
76855
+ if (!this._series.some(series => { var _a; return (_a = series.getStack) === null || _a === void 0 ? void 0 : _a.call(series); })) {
76856
+ return;
76857
+ }
76858
+ (_b = (_a = this._stack) === null || _a === void 0 ? void 0 : _a.stackAll) === null || _b === void 0 ? void 0 : _b.call(_a);
76859
+ this._series.forEach(series => {
76860
+ if (series.getViewDataFilter()) {
76861
+ series.reTransformViewData();
76862
+ }
76863
+ });
76864
+ }
76865
+ _getModelSpecIndex(specInfo) {
76866
+ var _a;
76867
+ const specPath = (_a = specInfo.specPath) !== null && _a !== void 0 ? _a : [];
76868
+ const specIndex = specPath[specPath.length - 1];
76869
+ return typeof specIndex === 'number' ? specIndex : 0;
76870
+ }
76871
+ _hasComponentForSpecInfo(key, specInfo) {
76872
+ const specIndex = this._getModelSpecIndex(specInfo);
76873
+ return this._components.some(component => {
76874
+ return (component.specKey || component.type) === key && component.getSpecIndex() === specIndex;
76875
+ });
76876
+ }
76877
+ _createMissingMarkerComponentsForSpecs(result, componentCache) {
76878
+ var _a;
76879
+ let createdCount = 0;
76880
+ (_a = this._specTransformer) === null || _a === void 0 ? void 0 : _a.forEachComponentInSpec(this._spec, (constructor, specInfo) => {
76881
+ if (result.reMake) {
76882
+ return;
76883
+ }
76884
+ const compSpecKey = constructor.specKey || constructor.type;
76885
+ if (!MARKER_COMPONENT_SPEC_KEYS[compSpecKey] || this._hasComponentForSpecInfo(compSpecKey, specInfo)) {
76886
+ return;
76887
+ }
76888
+ if (!this._isMarkerAdditionSpecSafeWithoutRemake(specInfo.spec)) {
76889
+ result.reMake = true;
76890
+ return;
76891
+ }
76892
+ this._createComponent(constructor, specInfo);
76893
+ if (componentCache[compSpecKey]) {
76894
+ componentCache[compSpecKey].componentCount++;
76895
+ }
76896
+ createdCount++;
76897
+ }, this._option.getSpecInfo());
76898
+ if (!createdCount) {
76899
+ return;
76900
+ }
76901
+ result.change = true;
76902
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, layout: true, render: true });
76903
+ }
76781
76904
  _removeMarkerComponentsForEmptySpecs(result) {
76782
76905
  const removedComponents = this._components.filter(component => {
76783
76906
  var _a;
@@ -77320,6 +77443,7 @@ class BaseChartSpecTransformer {
77320
77443
  };
77321
77444
  const seriesType = this.seriesType;
77322
77445
  if (seriesType) {
77446
+ this._addSeriesRelatedSpecKeys([seriesType]);
77323
77447
  series.type = seriesType;
77324
77448
  series[seriesType] = chartSpec[seriesType];
77325
77449
  }
@@ -103263,6 +103387,16 @@ class Tooltip extends BaseComponent {
103263
103387
  this._regions = this._option.getAllRegions();
103264
103388
  this._initEvent();
103265
103389
  }
103390
+ _compareSpec(spec, prevSpec) {
103391
+ const result = super._compareSpec(spec, prevSpec);
103392
+ const specChanged = !isEqual(prevSpec, spec);
103393
+ if (specChanged && !result.reMake && !result.reCompile) {
103394
+ result.change = true;
103395
+ result.reRender = true;
103396
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, render: true });
103397
+ }
103398
+ return result;
103399
+ }
103266
103400
  release() {
103267
103401
  var _a, _b;
103268
103402
  super.release();
@@ -103573,6 +103707,21 @@ const ORIENT_MAP = {
103573
103707
  category: ['angle'],
103574
103708
  value: ['radius']
103575
103709
  };
103710
+ const CROSSHAIR_COMPONENT_ONLY_TOP_LEVEL_CHANGE_KEYS = {
103711
+ labelZIndex: true,
103712
+ gridZIndex: true
103713
+ };
103714
+ const CROSSHAIR_FIELD_KEYS = {
103715
+ xField: true,
103716
+ yField: true,
103717
+ categoryField: true,
103718
+ valueField: true
103719
+ };
103720
+ const CROSSHAIR_LINE_COMPONENT_ONLY_CHANGE_KEYS = {
103721
+ visible: true,
103722
+ width: true,
103723
+ style: true
103724
+ };
103576
103725
  class BaseCrossHair extends BaseComponent {
103577
103726
  get enableRemain() {
103578
103727
  return this.triggerOff === 'none';
@@ -103767,12 +103916,43 @@ class BaseCrossHair extends BaseComponent {
103767
103916
  }
103768
103917
  _compareSpec(spec, prevSpec) {
103769
103918
  const result = super._compareSpec(spec, prevSpec);
103770
- if (!result.reMake && !isEqual(prevSpec, spec)) {
103919
+ const specChanged = !isEqual(prevSpec, spec);
103920
+ if (specChanged) {
103921
+ result.change = true;
103771
103922
  result.reRender = true;
103772
- result.reMake = true;
103923
+ if (!result.reMake) {
103924
+ if (this._isComponentOnlySpecChange(spec, prevSpec)) {
103925
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, layout: true, render: true });
103926
+ }
103927
+ else {
103928
+ result.reMake = true;
103929
+ }
103930
+ }
103773
103931
  }
103774
103932
  return result;
103775
103933
  }
103934
+ _isComponentOnlySpecChange(spec, prevSpec) {
103935
+ const keys = Object.keys(Object.assign(Object.assign({}, prevSpec), spec));
103936
+ return keys.every(key => {
103937
+ return (isEqual(prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec[key], spec === null || spec === void 0 ? void 0 : spec[key]) ||
103938
+ CROSSHAIR_COMPONENT_ONLY_TOP_LEVEL_CHANGE_KEYS[key] ||
103939
+ (CROSSHAIR_FIELD_KEYS[key] && this._isFieldComponentOnlySpecChange(prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec[key], spec === null || spec === void 0 ? void 0 : spec[key])));
103940
+ });
103941
+ }
103942
+ _isFieldComponentOnlySpecChange(prevSpec, spec) {
103943
+ const keys = Object.keys(Object.assign(Object.assign({}, prevSpec), spec));
103944
+ return keys.every(key => {
103945
+ return (isEqual(prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec[key], spec === null || spec === void 0 ? void 0 : spec[key]) ||
103946
+ key === 'label' ||
103947
+ (key === 'line' && this._isLineComponentOnlySpecChange(prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec.line, spec === null || spec === void 0 ? void 0 : spec.line)));
103948
+ });
103949
+ }
103950
+ _isLineComponentOnlySpecChange(prevSpec, spec) {
103951
+ const keys = Object.keys(Object.assign(Object.assign({}, prevSpec), spec));
103952
+ return keys.every(key => {
103953
+ return isEqual(prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec[key], spec === null || spec === void 0 ? void 0 : spec[key]) || CROSSHAIR_LINE_COMPONENT_ONLY_CHANGE_KEYS[key];
103954
+ });
103955
+ }
103776
103956
  _initEvent() {
103777
103957
  if (this._option.disableTriggerEvent) {
103778
103958
  return;
@@ -105196,11 +105376,30 @@ class DataFilterBaseComponent extends BaseComponent {
105196
105376
  _compareSpec(spec, prevSpec) {
105197
105377
  const result = super._compareSpec(spec, prevSpec);
105198
105378
  if (!result.reMake && !isEqual(prevSpec, spec)) {
105379
+ result.change = true;
105199
105380
  result.reRender = true;
105200
- result.reMake = true;
105381
+ if (!result.reCompile && this._isComponentOnlySpecChange(spec, prevSpec)) {
105382
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, layout: true, render: true });
105383
+ }
105384
+ else {
105385
+ result.reMake = true;
105386
+ }
105201
105387
  }
105202
105388
  return result;
105203
105389
  }
105390
+ _getComponentOnlySpecKeys() {
105391
+ return null;
105392
+ }
105393
+ _isComponentOnlySpecChange(spec, prevSpec) {
105394
+ const componentOnlySpecKeys = this._getComponentOnlySpecKeys();
105395
+ if (!componentOnlySpecKeys) {
105396
+ return false;
105397
+ }
105398
+ const keys = Object.keys(Object.assign(Object.assign({}, prevSpec), spec));
105399
+ return keys.every(key => {
105400
+ return isEqual(prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec[key], spec === null || spec === void 0 ? void 0 : spec[key]) || componentOnlySpecKeys[key];
105401
+ });
105402
+ }
105204
105403
  reInit(spec) {
105205
105404
  super.reInit(spec);
105206
105405
  this._marks.forEach(g => {
@@ -105826,6 +106025,22 @@ const dataZoom = {
105826
106025
  backgroundChart: getBackgroundChartTheme(true)
105827
106026
  };
105828
106027
 
106028
+ const DATA_ZOOM_COMPONENT_ONLY_CHANGE_KEYS = {
106029
+ width: true,
106030
+ height: true,
106031
+ showDetail: true,
106032
+ middleHandler: true,
106033
+ background: true,
106034
+ startHandler: true,
106035
+ endHandler: true,
106036
+ startText: true,
106037
+ endText: true,
106038
+ dragMask: true,
106039
+ selectedBackground: true,
106040
+ backgroundChart: true,
106041
+ selectedBackgroundChart: true,
106042
+ showBackgroundChart: true
106043
+ };
105829
106044
  class DataZoom extends DataFilterBaseComponent {
105830
106045
  constructor(spec, options) {
105831
106046
  var _a;
@@ -105936,6 +106151,9 @@ class DataZoom extends DataFilterBaseComponent {
105936
106151
  this.effect.onZoomChange();
105937
106152
  }
105938
106153
  }
106154
+ _getComponentOnlySpecKeys() {
106155
+ return DATA_ZOOM_COMPONENT_ONLY_CHANGE_KEYS;
106156
+ }
105939
106157
  clear() {
105940
106158
  if (this._component) {
105941
106159
  const container = this.getContainer();
@@ -106291,6 +106509,15 @@ const scrollBar = {
106291
106509
 
106292
106510
  const SCROLLBAR_EVENT = 'scrollDrag';
106293
106511
  const SCROLLBAR_END_EVENT = 'scrollUp';
106512
+ const SCROLL_BAR_COMPONENT_ONLY_CHANGE_KEYS = {
106513
+ width: true,
106514
+ height: true,
106515
+ rail: true,
106516
+ slider: true,
106517
+ round: true,
106518
+ innerPadding: true,
106519
+ minSliderSize: true
106520
+ };
106294
106521
  class ScrollBar extends DataFilterBaseComponent {
106295
106522
  constructor(spec, options) {
106296
106523
  var _a;
@@ -106340,6 +106567,9 @@ class ScrollBar extends DataFilterBaseComponent {
106340
106567
  data.reRunAllTransform();
106341
106568
  }
106342
106569
  }
106570
+ _getComponentOnlySpecKeys() {
106571
+ return SCROLL_BAR_COMPONENT_ONLY_CHANGE_KEYS;
106572
+ }
106343
106573
  _beforeLayoutEnd() {
106344
106574
  var _a, _b;
106345
106575
  super._beforeLayoutEnd();
@@ -106513,6 +106743,16 @@ class Indicator extends BaseComponent {
106513
106743
  this._content = array(this._spec.content);
106514
106744
  this._regions = this._option.getRegionsInUserIdOrIndex(array(this._spec.regionId), array(this._spec.regionIndex));
106515
106745
  }
106746
+ _compareSpec(spec, prevSpec) {
106747
+ const result = super._compareSpec(spec, prevSpec);
106748
+ const specChanged = !isEqual(prevSpec, spec);
106749
+ if (specChanged && !result.reMake && !result.reCompile) {
106750
+ result.change = true;
106751
+ result.reRender = true;
106752
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, layout: true, render: true });
106753
+ }
106754
+ return result;
106755
+ }
106516
106756
  initEvent() {
106517
106757
  if (this._option.disableTriggerEvent) {
106518
106758
  return;
@@ -106684,12 +106924,15 @@ function isNeedExtendDomain(domain, datum, autoRange) {
106684
106924
  }
106685
106925
  return false;
106686
106926
  }
106687
- function getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint) {
106927
+ function getAutoRangeExtendDomainKey(keyPrefix, axisKey) {
106928
+ return keyPrefix ? `${keyPrefix}_${axisKey}_extend` : `marker_${axisKey}_extend`;
106929
+ }
106930
+ function getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint, autoRangeExtendDomainKeyPrefix) {
106688
106931
  var _a, _b;
106689
106932
  const { relativeSeries } = refSeries;
106690
106933
  isNumber$2(datum.x) &&
106691
106934
  isNeedExtendDomain(xDomain, datum.x, autoRange) &&
106692
- ((_b = relativeSeries === null || relativeSeries === void 0 ? void 0 : (_a = relativeSeries.getXAxisHelper()).setExtendDomain) === null || _b === void 0 ? void 0 : _b.call(_a, 'marker_xAxis_extend', datum.x));
106935
+ ((_b = relativeSeries === null || relativeSeries === void 0 ? void 0 : (_a = relativeSeries.getXAxisHelper()).setExtendDomain) === null || _b === void 0 ? void 0 : _b.call(_a, getAutoRangeExtendDomainKey(autoRangeExtendDomainKeyPrefix, 'xAxis'), datum.x));
106693
106936
  let x;
106694
106937
  if (isPercent(datum.x)) {
106695
106938
  x = convertPercentToValue(datum.x, regionWidth) + regionStartLayoutStartPoint.x;
@@ -106701,12 +106944,13 @@ function getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStar
106701
106944
  }
106702
106945
  return x;
106703
106946
  }
106704
- function getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint) {
106947
+ function getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint, autoRangeExtendDomainKeyPrefix) {
106705
106948
  var _a, _b;
106706
106949
  const { relativeSeries } = refSeries;
106707
106950
  isNumber$2(datum.y) &&
106708
106951
  isNeedExtendDomain(yDomain, datum.y, autoRange) &&
106709
- ((_b = (_a = relativeSeries.getYAxisHelper()) === null || _a === void 0 ? void 0 : _a.setExtendDomain) === null || _b === void 0 ? void 0 : _b.call(_a, 'marker_yAxis_extend', datum.y));
106952
+ ((_b = (_a = relativeSeries
106953
+ .getYAxisHelper()) === null || _a === void 0 ? void 0 : _a.setExtendDomain) === null || _b === void 0 ? void 0 : _b.call(_a, getAutoRangeExtendDomainKey(autoRangeExtendDomainKeyPrefix, 'yAxis'), datum.y));
106710
106954
  let y;
106711
106955
  if (isPercent(datum.y)) {
106712
106956
  y = convertPercentToValue(datum.y, regionHeight) + regionStartLayoutStartPoint.y;
@@ -106718,20 +106962,20 @@ function getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionSta
106718
106962
  }
106719
106963
  return y;
106720
106964
  }
106721
- function getAngleValue(datum, angleDomain, autoRange, refSeries) {
106965
+ function getAngleValue(datum, angleDomain, autoRange, refSeries, autoRangeExtendDomainKeyPrefix) {
106722
106966
  var _a, _b;
106723
106967
  const { relativeSeries } = refSeries;
106724
106968
  isNumber$2(datum.angle) &&
106725
106969
  isNeedExtendDomain(angleDomain, datum.angle, autoRange) &&
106726
- ((_b = (_a = relativeSeries.angleAxisHelper) === null || _a === void 0 ? void 0 : _a.setExtendDomain) === null || _b === void 0 ? void 0 : _b.call(_a, 'marker_angleAxis_extend', datum.angle));
106970
+ ((_b = (_a = relativeSeries.angleAxisHelper) === null || _a === void 0 ? void 0 : _a.setExtendDomain) === null || _b === void 0 ? void 0 : _b.call(_a, getAutoRangeExtendDomainKey(autoRangeExtendDomainKeyPrefix, 'angleAxis'), datum.angle));
106727
106971
  return convertDatumToValue(relativeSeries.angleAxisHelper, [datum.angle]);
106728
106972
  }
106729
- function getRadiusValue(datum, radiusDomain, autoRange, refSeries) {
106973
+ function getRadiusValue(datum, radiusDomain, autoRange, refSeries, autoRangeExtendDomainKeyPrefix) {
106730
106974
  var _a, _b;
106731
106975
  const { relativeSeries } = refSeries;
106732
106976
  isNumber$2(datum.radius) &&
106733
106977
  isNeedExtendDomain(radiusDomain, datum.radius, autoRange) &&
106734
- ((_b = (_a = relativeSeries.radiusAxisHelper) === null || _a === void 0 ? void 0 : _a.setExtendDomain) === null || _b === void 0 ? void 0 : _b.call(_a, 'marker_radiusAxis_extend', datum.radius));
106978
+ ((_b = (_a = relativeSeries.radiusAxisHelper) === null || _a === void 0 ? void 0 : _a.setExtendDomain) === null || _b === void 0 ? void 0 : _b.call(_a, getAutoRangeExtendDomainKey(autoRangeExtendDomainKeyPrefix, 'radiusAxis'), datum.radius));
106735
106979
  return convertDatumToValue(relativeSeries.radiusAxisHelper, [datum.radius]);
106736
106980
  }
106737
106981
  function convertPercentToValue(percent, relativeLength) {
@@ -106747,7 +106991,7 @@ function convertDatumToValue(axisHelper, datum) {
106747
106991
  function isAggrSpec(spec) {
106748
106992
  return AGGR_TYPE.includes(spec);
106749
106993
  }
106750
- function xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand = false) {
106994
+ function xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand = false, autoRangeExtendDomainKeyPrefix) {
106751
106995
  const regionStart = startRelativeSeries.getRegion();
106752
106996
  const regionStartLayoutStartPoint = regionStart.getLayoutStartPoint();
106753
106997
  const regionEnd = endRelativeSeries.getRegion();
@@ -106777,14 +107021,14 @@ function xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries,
106777
107021
  let x;
106778
107022
  let y;
106779
107023
  if (isValidX && isValidY) {
106780
- x = getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint);
106781
- y = getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint);
107024
+ x = getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint, autoRangeExtendDomainKeyPrefix);
107025
+ y = getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint, autoRangeExtendDomainKeyPrefix);
106782
107026
  setTempWithValid(x, isXExpand, xTemp, lines.length);
106783
107027
  setTempWithValid(y, isyExpand, yTemp, lines.length);
106784
107028
  lines.push([{ x, y }]);
106785
107029
  }
106786
107030
  else if (isValidX) {
106787
- x = getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint);
107031
+ x = getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint, autoRangeExtendDomainKeyPrefix);
106788
107032
  y = Math.max(regionStartLayoutStartPoint.y + regionStart.getLayoutRect().height, regionEndLayoutStartPoint.y + regionEnd.getLayoutRect().height);
106789
107033
  const y1 = Math.min(regionStartLayoutStartPoint.y, regionEndLayoutStartPoint.y);
106790
107034
  setTempWithValid(x, isXExpand, xTemp, lines.length);
@@ -106801,7 +107045,7 @@ function xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries,
106801
107045
  }
106802
107046
  else if (isValidY) {
106803
107047
  x = Math.min(regionStartLayoutStartPoint.x, regionEndLayoutStartPoint.x);
106804
- y = getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint);
107048
+ y = getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint, autoRangeExtendDomainKeyPrefix);
106805
107049
  const x1 = Math.max(regionStartLayoutStartPoint.x + regionStart.getLayoutRect().width, regionEndLayoutStartPoint.x + regionEnd.getLayoutRect().width);
106806
107050
  setTempWithValid(y, isyExpand, yTemp, lines.length);
106807
107051
  lines.push([
@@ -106856,7 +107100,7 @@ function setTempWithValid(v, isExpand, temp, index) {
106856
107100
  }
106857
107101
  return v;
106858
107102
  }
106859
- function polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange) {
107103
+ function polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, autoRangeExtendDomainKeyPrefix) {
106860
107104
  const refSeries = {
106861
107105
  relativeSeries,
106862
107106
  startRelativeSeries,
@@ -106871,12 +107115,12 @@ function polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSerie
106871
107115
  const isValidAngle = isValid$1(datum.angle);
106872
107116
  const isValidRadius = isValid$1(datum.radius);
106873
107117
  if (isValidAngle && isValidRadius) {
106874
- const angle = getAngleValue(datum, angleDomain, autoRange, refSeries);
106875
- const radius = getRadiusValue(datum, radiusDomain, autoRange, refSeries);
107118
+ const angle = getAngleValue(datum, angleDomain, autoRange, refSeries, autoRangeExtendDomainKeyPrefix);
107119
+ const radius = getRadiusValue(datum, radiusDomain, autoRange, refSeries, autoRangeExtendDomainKeyPrefix);
106876
107120
  lines.push([{ angle, radius }]);
106877
107121
  }
106878
107122
  else if (isValidAngle) {
106879
- const angle = getAngleValue(datum, angleDomain, autoRange, refSeries);
107123
+ const angle = getAngleValue(datum, angleDomain, autoRange, refSeries, autoRangeExtendDomainKeyPrefix);
106880
107124
  lines.push([
106881
107125
  {
106882
107126
  angle,
@@ -106889,7 +107133,7 @@ function polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSerie
106889
107133
  ]);
106890
107134
  }
106891
107135
  else if (isValidRadius) {
106892
- const radius = getRadiusValue(datum, radiusDomain, autoRange, refSeries);
107136
+ const radius = getRadiusValue(datum, radiusDomain, autoRange, refSeries, autoRangeExtendDomainKeyPrefix);
106893
107137
  lines.push([
106894
107138
  {
106895
107139
  radius,
@@ -106922,7 +107166,7 @@ function geoLayout(data, relativeSeries) {
106922
107166
  });
106923
107167
  return lines;
106924
107168
  }
106925
- function cartesianCoordinateLayout(data, relativeSeries, autoRange, coordinatesOffset) {
107169
+ function cartesianCoordinateLayout(data, relativeSeries, autoRange, coordinatesOffset, autoRangeExtendDomainKeyPrefix) {
106926
107170
  const points = [];
106927
107171
  const dataPoints = data.latestData[0] && data.latestData[0].latestData ? data.latestData[0].latestData : data.latestData;
106928
107172
  const isArrayCoordinatesOffset = isArray$1(coordinatesOffset);
@@ -106952,11 +107196,13 @@ function cartesianCoordinateLayout(data, relativeSeries, autoRange, coordinatesO
106952
107196
  xValue.length === 1 &&
106953
107197
  isNumber$2(xValue[0]) &&
106954
107198
  isNeedExtendDomain(xDomain, xValue[0], autoRange) &&
106955
- ((_b = (_a = refRelativeSeries.getXAxisHelper()) === null || _a === void 0 ? void 0 : _a.setExtendDomain) === null || _b === void 0 ? void 0 : _b.call(_a, 'marker_xAxis_extend', xValue[0]));
107199
+ ((_b = (_a = refRelativeSeries
107200
+ .getXAxisHelper()) === null || _a === void 0 ? void 0 : _a.setExtendDomain) === null || _b === void 0 ? void 0 : _b.call(_a, getAutoRangeExtendDomainKey(autoRangeExtendDomainKeyPrefix, 'xAxis'), xValue[0]));
106956
107201
  yValue.length === 1 &&
106957
107202
  isNumber$2(yValue[0]) &&
106958
107203
  isNeedExtendDomain(yDomain, yValue[0], autoRange) &&
106959
- ((_d = (_c = refRelativeSeries.getYAxisHelper()) === null || _c === void 0 ? void 0 : _c.setExtendDomain) === null || _d === void 0 ? void 0 : _d.call(_c, 'marker_yAxis_extend', yValue[0]));
107204
+ ((_d = (_c = refRelativeSeries
107205
+ .getYAxisHelper()) === null || _c === void 0 ? void 0 : _c.setExtendDomain) === null || _d === void 0 ? void 0 : _d.call(_c, getAutoRangeExtendDomainKey(autoRangeExtendDomainKeyPrefix, 'yAxis'), yValue[0]));
106960
107206
  points.push({
106961
107207
  x: convertDatumToValue(refRelativeSeries.getXAxisHelper(), xValue) + regionStartLayoutStartPoint.x + offsetX,
106962
107208
  y: convertDatumToValue(refRelativeSeries.getYAxisHelper(), yValue) + regionStartLayoutStartPoint.y + offsetY
@@ -106964,7 +107210,7 @@ function cartesianCoordinateLayout(data, relativeSeries, autoRange, coordinatesO
106964
107210
  });
106965
107211
  return points;
106966
107212
  }
106967
- function polarCoordinateLayout(data, relativeSeries, autoRange) {
107213
+ function polarCoordinateLayout(data, relativeSeries, autoRange, autoRangeExtendDomainKeyPrefix) {
106968
107214
  const points = [];
106969
107215
  const dataPoints = data.latestData[0] && data.latestData[0].latestData ? data.latestData[0].latestData : data.latestData;
106970
107216
  dataPoints.forEach((datum) => {
@@ -106977,11 +107223,11 @@ function polarCoordinateLayout(data, relativeSeries, autoRange) {
106977
107223
  angleValue.length === 1 &&
106978
107224
  isNumber$2(angleValue[0]) &&
106979
107225
  isNeedExtendDomain(angleDomain, angleValue[0], autoRange) &&
106980
- ((_b = (_a = refRelativeSeries.angleAxisHelper) === null || _a === void 0 ? void 0 : _a.setExtendDomain) === null || _b === void 0 ? void 0 : _b.call(_a, 'marker_xAxis_extend', angleValue[0]));
107226
+ ((_b = (_a = refRelativeSeries.angleAxisHelper) === null || _a === void 0 ? void 0 : _a.setExtendDomain) === null || _b === void 0 ? void 0 : _b.call(_a, getAutoRangeExtendDomainKey(autoRangeExtendDomainKeyPrefix, 'angleAxis'), angleValue[0]));
106981
107227
  radiusValue.length === 1 &&
106982
107228
  isNumber$2(radiusValue[0]) &&
106983
107229
  isNeedExtendDomain(radiusDomain, radiusValue[0], autoRange) &&
106984
- ((_d = (_c = refRelativeSeries.radiusAxisHelper) === null || _c === void 0 ? void 0 : _c.setExtendDomain) === null || _d === void 0 ? void 0 : _d.call(_c, 'marker_yAxis_extend', radiusValue[0]));
107230
+ ((_d = (_c = refRelativeSeries.radiusAxisHelper) === null || _c === void 0 ? void 0 : _c.setExtendDomain) === null || _d === void 0 ? void 0 : _d.call(_c, getAutoRangeExtendDomainKey(autoRangeExtendDomainKeyPrefix, 'radiusAxis'), radiusValue[0]));
106985
107231
  points.push({
106986
107232
  angle: convertDatumToValue(refRelativeSeries.angleAxisHelper, angleValue),
106987
107233
  radius: convertDatumToValue(refRelativeSeries.radiusAxisHelper, radiusValue)
@@ -107510,6 +107756,65 @@ const releaseDataViewWithDependencies = (dataView, shouldReleaseDependency) => {
107510
107756
  releaseDataViews([dataView, ...releaseDependencies]);
107511
107757
  };
107512
107758
 
107759
+ const MARKER_FORMAT_METHOD_PLACEHOLDER = '__vchart_marker_format_method__';
107760
+ const MARKER_COORDINATE_PLACEHOLDER = '__vchart_marker_coordinate__';
107761
+ const MARKER_TEXT_PLACEHOLDER = '__vchart_marker_text__';
107762
+ const MARKER_AUTO_RANGE_PLACEHOLDER = '__vchart_marker_auto_range__';
107763
+ const MARKER_DOMAIN_POSITION_SPEC_KEYS = [
107764
+ 'coordinate',
107765
+ 'coordinates',
107766
+ 'x',
107767
+ 'y',
107768
+ 'x1',
107769
+ 'y1',
107770
+ 'angle',
107771
+ 'angle1',
107772
+ 'radius',
107773
+ 'radius1'
107774
+ ];
107775
+ const MARKER_LAYOUT_POSITION_SPEC_KEYS = ['position', 'positions', 'coordinatesOffset', 'regionRelative'];
107776
+ const normalizeMarkerLabelFormatMethod = (label) => {
107777
+ if (Array.isArray(label)) {
107778
+ return label.map(normalizeMarkerLabelFormatMethod);
107779
+ }
107780
+ if (!label || typeof label !== 'object') {
107781
+ return label;
107782
+ }
107783
+ if (typeof label.formatMethod !== 'function') {
107784
+ return label;
107785
+ }
107786
+ return Object.assign(Object.assign({}, label), { formatMethod: MARKER_FORMAT_METHOD_PLACEHOLDER });
107787
+ };
107788
+ const normalizeMarkerSpecForComponentOnlyUpdate = (spec, options) => {
107789
+ var _a;
107790
+ if (!spec || typeof spec !== 'object') {
107791
+ return spec;
107792
+ }
107793
+ const normalized = Object.assign({}, spec);
107794
+ if (options.normalizeDomainPosition) {
107795
+ MARKER_DOMAIN_POSITION_SPEC_KEYS.forEach(key => {
107796
+ if (key in normalized) {
107797
+ normalized[key] = MARKER_COORDINATE_PLACEHOLDER;
107798
+ }
107799
+ });
107800
+ }
107801
+ if (options.normalizeAutoRange && 'autoRange' in normalized) {
107802
+ normalized.autoRange = MARKER_AUTO_RANGE_PLACEHOLDER;
107803
+ }
107804
+ MARKER_LAYOUT_POSITION_SPEC_KEYS.forEach(key => {
107805
+ if (key in normalized) {
107806
+ normalized[key] = MARKER_COORDINATE_PLACEHOLDER;
107807
+ }
107808
+ });
107809
+ if ('label' in normalized) {
107810
+ normalized.label = normalizeMarkerLabelFormatMethod(normalized.label);
107811
+ }
107812
+ const text = (_a = normalized.itemContent) === null || _a === void 0 ? void 0 : _a.text;
107813
+ if (text && typeof text === 'object') {
107814
+ normalized.itemContent = Object.assign(Object.assign({}, normalized.itemContent), { text: Object.assign(Object.assign({}, normalizeMarkerLabelFormatMethod(text)), { text: MARKER_TEXT_PLACEHOLDER }) });
107815
+ }
107816
+ return normalized;
107817
+ };
107513
107818
  class BaseMarker extends BaseComponent {
107514
107819
  constructor() {
107515
107820
  super(...arguments);
@@ -107558,6 +107863,27 @@ class BaseMarker extends BaseComponent {
107558
107863
  getEndRelativeSeries: () => this._endRelativeSeries
107559
107864
  };
107560
107865
  }
107866
+ _getAutoRangeExtendDomainKeyPrefix() {
107867
+ return `marker_${this.type}_${this.id}`;
107868
+ }
107869
+ _getAutoRangeExtendDomainKey(axisKey) {
107870
+ return `${this._getAutoRangeExtendDomainKeyPrefix()}_${axisKey}_extend`;
107871
+ }
107872
+ _clearAutoRangeExtendDomain() {
107873
+ var _a, _b;
107874
+ const seriesList = array((_b = (_a = this._option).getAllSeries) === null || _b === void 0 ? void 0 : _b.call(_a));
107875
+ seriesList.forEach((series) => {
107876
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
107877
+ (_c = (_b = (_a = series === null || series === void 0 ? void 0 : series.getXAxisHelper) === null || _a === void 0 ? void 0 : _a.call(series)) === null || _b === void 0 ? void 0 : _b.setExtendDomain) === null || _c === void 0 ? void 0 : _c.call(_b, this._getAutoRangeExtendDomainKey('xAxis'), undefined);
107878
+ (_f = (_e = (_d = series === null || series === void 0 ? void 0 : series.getYAxisHelper) === null || _d === void 0 ? void 0 : _d.call(series)) === null || _e === void 0 ? void 0 : _e.setExtendDomain) === null || _f === void 0 ? void 0 : _f.call(_e, this._getAutoRangeExtendDomainKey('yAxis'), undefined);
107879
+ (_h = (_g = series === null || series === void 0 ? void 0 : series.angleAxisHelper) === null || _g === void 0 ? void 0 : _g.setExtendDomain) === null || _h === void 0 ? void 0 : _h.call(_g, this._getAutoRangeExtendDomainKey('angleAxis'), undefined);
107880
+ (_k = (_j = series === null || series === void 0 ? void 0 : series.radiusAxisHelper) === null || _j === void 0 ? void 0 : _j.setExtendDomain) === null || _k === void 0 ? void 0 : _k.call(_j, this._getAutoRangeExtendDomainKey('radiusAxis'), undefined);
107881
+ });
107882
+ }
107883
+ _updateMarkerLayout() {
107884
+ this._clearAutoRangeExtendDomain();
107885
+ this._markerLayout();
107886
+ }
107561
107887
  _getFieldInfoFromSpec(dim, spec, relativeSeries) {
107562
107888
  const specKeyByDim = {
107563
107889
  x: 'xField',
@@ -107606,7 +107932,7 @@ class BaseMarker extends BaseComponent {
107606
107932
  return;
107607
107933
  }
107608
107934
  this._markerDataChangeHandler = () => {
107609
- this._markerLayout();
107935
+ this._updateMarkerLayout();
107610
107936
  };
107611
107937
  this._markerData.target.on('change', this._markerDataChangeHandler);
107612
107938
  }
@@ -107636,7 +107962,7 @@ class BaseMarker extends BaseComponent {
107636
107962
  this._delegateEvent(this._markerComponent, event, type, null, this.getMarkerData.bind(this));
107637
107963
  });
107638
107964
  }
107639
- this._markerLayout();
107965
+ this._updateMarkerLayout();
107640
107966
  }
107641
107967
  super.updateLayoutAttribute();
107642
107968
  }
@@ -107666,9 +107992,9 @@ class BaseMarker extends BaseComponent {
107666
107992
  }
107667
107993
  initEvent() {
107668
107994
  if (this._relativeSeries.coordinate !== 'cartesian') {
107669
- this._relativeSeries.event.on('zoom', this._markerLayout.bind(this));
107670
- this._relativeSeries.event.on('panmove', this._markerLayout.bind(this));
107671
- this._relativeSeries.event.on('scroll', this._markerLayout.bind(this));
107995
+ this._relativeSeries.event.on('zoom', this._updateMarkerLayout.bind(this));
107996
+ this._relativeSeries.event.on('panmove', this._updateMarkerLayout.bind(this));
107997
+ this._relativeSeries.event.on('scroll', this._updateMarkerLayout.bind(this));
107672
107998
  }
107673
107999
  }
107674
108000
  clear() {
@@ -107709,16 +108035,50 @@ class BaseMarker extends BaseComponent {
107709
108035
  const result = super._compareSpec(spec, prevSpec);
107710
108036
  if (!isEqual(prevSpec, spec)) {
107711
108037
  result.reRender = true;
107712
- result.reMake = true;
107713
108038
  result.change = true;
108039
+ if (!result.reMake && !result.reCompile && this._isComponentOnlySpecChange(spec, prevSpec)) {
108040
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, layout: true, render: true });
108041
+ }
108042
+ else if (!result.reMake && !result.reCompile && this._isAutoRangeSpecChange(spec, prevSpec)) {
108043
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, scaleDomain: true, layout: true, render: true });
108044
+ }
108045
+ else {
108046
+ result.reMake = true;
108047
+ }
107714
108048
  }
107715
108049
  return result;
107716
108050
  }
108051
+ _isComponentOnlySpecChange(spec, prevSpec) {
108052
+ const normalizeDomainPosition = !(spec === null || spec === void 0 ? void 0 : spec.autoRange) && !(prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec.autoRange);
108053
+ return isEqual(normalizeMarkerSpecForComponentOnlyUpdate(prevSpec, { normalizeDomainPosition }), normalizeMarkerSpecForComponentOnlyUpdate(spec, { normalizeDomainPosition }));
108054
+ }
108055
+ _isAutoRangeSpecChange(spec, prevSpec) {
108056
+ if (!(spec === null || spec === void 0 ? void 0 : spec.autoRange) && !(prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec.autoRange)) {
108057
+ return false;
108058
+ }
108059
+ return isEqual(normalizeMarkerSpecForComponentOnlyUpdate(prevSpec, {
108060
+ normalizeDomainPosition: true,
108061
+ normalizeAutoRange: true
108062
+ }), normalizeMarkerSpecForComponentOnlyUpdate(spec, {
108063
+ normalizeDomainPosition: true,
108064
+ normalizeAutoRange: true
108065
+ }));
108066
+ }
108067
+ reInit(spec) {
108068
+ super.reInit(spec);
108069
+ this._bindSeries();
108070
+ this._initDataView();
108071
+ this._buildMarkerAttributeContext();
108072
+ if (this._markerComponent) {
108073
+ this._updateMarkerLayout();
108074
+ }
108075
+ }
107717
108076
  _initCommonDataView() {
107718
108077
  const { options } = this._computeOptions();
107719
108078
  const seriesData = this._getRelativeDataView();
107720
108079
  registerDataSetInstanceTransform(this._option.dataSet, 'markerAggregation', markerAggregation);
107721
108080
  registerDataSetInstanceTransform(this._option.dataSet, 'markerFilter', markerFilter);
108081
+ this._releaseMarkerData();
107722
108082
  const data = new DataView(this._option.dataSet, { name: `${this.type}_${this.id}_data` });
107723
108083
  data.parse([seriesData], {
107724
108084
  type: 'dataview'
@@ -107988,11 +108348,11 @@ class CartesianMarkLine extends BaseMarkLine {
107988
108348
  doXYProcess ||
107989
108349
  (isValidCoordinates && isValidProcessX) ||
107990
108350
  (isValidCoordinates && isValidProcessY)) {
107991
- const xyPoints = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange);
108351
+ const xyPoints = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, false, this._getAutoRangeExtendDomainKeyPrefix());
107992
108352
  points = (xyPoints.length === 1 ? xyPoints[0] : xyPoints.map(point => point[0]));
107993
108353
  }
107994
108354
  else if (doCoordinatesProcess) {
107995
- points = cartesianCoordinateLayout(data, relativeSeries, autoRange, spec.coordinatesOffset);
108355
+ points = cartesianCoordinateLayout(data, relativeSeries, autoRange, spec.coordinatesOffset, this._getAutoRangeExtendDomainKeyPrefix());
107996
108356
  }
107997
108357
  else if (isPositionLayout) {
107998
108358
  points = positionLayout(spec.positions, relativeSeries, spec.regionRelative);
@@ -108216,7 +108576,7 @@ class PolarMarkLine extends BaseMarkLine {
108216
108576
  this._relativeSeries.angleAxisHelper.center().y
108217
108577
  };
108218
108578
  if (doAngleProcess || doRadiusProcess || doAngRadRad1Process || doRadAngAng1Process || doRadAngProcess) {
108219
- const polarPoints = polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange);
108579
+ const polarPoints = polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, this._getAutoRangeExtendDomainKeyPrefix());
108220
108580
  points = (polarPoints.length === 1 ? polarPoints[0] : polarPoints.map(point => point[0]));
108221
108581
  if (points[0].radius === points[1].radius) {
108222
108582
  pointsAttr = {
@@ -108235,7 +108595,7 @@ class PolarMarkLine extends BaseMarkLine {
108235
108595
  }
108236
108596
  }
108237
108597
  else if (doCoordinatesProcess) {
108238
- points = polarCoordinateLayout(data, relativeSeries, autoRange);
108598
+ points = polarCoordinateLayout(data, relativeSeries, autoRange, this._getAutoRangeExtendDomainKeyPrefix());
108239
108599
  pointsAttr = {
108240
108600
  points: points.map(point => {
108241
108601
  return polarToCartesian(center, point.radius, point.angle);
@@ -108613,7 +108973,7 @@ class CartesianMarkArea extends BaseMarkArea {
108613
108973
  let points = [];
108614
108974
  let lines = [];
108615
108975
  if (doXYProcess) {
108616
- lines = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand);
108976
+ lines = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand, this._getAutoRangeExtendDomainKeyPrefix());
108617
108977
  const [start, end] = lines;
108618
108978
  if (start && start.length && end && end.length) {
108619
108979
  points = [
@@ -108631,14 +108991,14 @@ class CartesianMarkArea extends BaseMarkArea {
108631
108991
  }
108632
108992
  }
108633
108993
  else if (doXProcess || doYProcess) {
108634
- lines = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand);
108994
+ lines = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand, this._getAutoRangeExtendDomainKeyPrefix());
108635
108995
  const [start, end] = lines;
108636
108996
  if (start && start.length && end && end.length) {
108637
108997
  points = [...start, end[1], end[0]];
108638
108998
  }
108639
108999
  }
108640
109000
  else if (doCoordinatesProcess) {
108641
- points = cartesianCoordinateLayout(data, relativeSeries, autoRange, spec.coordinatesOffset);
109001
+ points = cartesianCoordinateLayout(data, relativeSeries, autoRange, spec.coordinatesOffset, this._getAutoRangeExtendDomainKeyPrefix());
108642
109002
  }
108643
109003
  else if (isPositionLayout) {
108644
109004
  points = positionLayout(spec.positions, relativeSeries, spec.regionRelative);
@@ -108721,7 +109081,7 @@ class PolarMarkArea extends BaseMarkArea {
108721
109081
  this._relativeSeries.angleAxisHelper.center().y
108722
109082
  };
108723
109083
  if (doAngleProcess || doRadiusProcess || doRadAngProcess) {
108724
- const polarLines = polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange);
109084
+ const polarLines = polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, this._getAutoRangeExtendDomainKeyPrefix());
108725
109085
  if (doRadAngProcess) {
108726
109086
  pointsAttr = {
108727
109087
  innerRadius: polarLines[0][0].radius,
@@ -108751,7 +109111,7 @@ class PolarMarkArea extends BaseMarkArea {
108751
109111
  }
108752
109112
  }
108753
109113
  else if (doCoordinatesProcess) {
108754
- points = polarCoordinateLayout(data, relativeSeries, autoRange);
109114
+ points = polarCoordinateLayout(data, relativeSeries, autoRange, this._getAutoRangeExtendDomainKeyPrefix());
108755
109115
  pointsAttr = {
108756
109116
  points: points.map(point => {
108757
109117
  return polarToCartesian(center, point.radius, point.angle);
@@ -109060,6 +109420,20 @@ class Player extends BaseComponent {
109060
109420
  this._position = (_g = this._spec.position) !== null && _g !== void 0 ? _g : 'middle';
109061
109421
  this._visible = (_h = this._spec.visible) !== null && _h !== void 0 ? _h : true;
109062
109422
  }
109423
+ _compareSpec(spec, prevSpec) {
109424
+ const result = super._compareSpec(spec, prevSpec);
109425
+ const specChanged = !isEqual(prevSpec, spec);
109426
+ if ((prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec.type) !== (spec === null || spec === void 0 ? void 0 : spec.type)) {
109427
+ result.reMake = true;
109428
+ return result;
109429
+ }
109430
+ if (specChanged && !result.reMake && !result.reCompile) {
109431
+ result.change = true;
109432
+ result.reRender = true;
109433
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, layout: true, render: true });
109434
+ }
109435
+ return result;
109436
+ }
109063
109437
  afterSetLayoutStartPoint(pos) {
109064
109438
  super.afterSetLayoutStartPoint(pos);
109065
109439
  if (isValidNumber$1(pos.x)) {
@@ -109199,7 +109573,13 @@ class BaseLabelComponent extends BaseComponent {
109199
109573
  const result = super._compareSpec(spec, prevSpec);
109200
109574
  result.reRender = true;
109201
109575
  if (!isEqual(prevSpec, spec)) {
109202
- result.reMake = true;
109576
+ result.change = true;
109577
+ if (!result.reMake && !result.reCompile) {
109578
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, layout: true, render: true });
109579
+ }
109580
+ else {
109581
+ result.reMake = true;
109582
+ }
109203
109583
  }
109204
109584
  return result;
109205
109585
  }
@@ -109948,7 +110328,7 @@ class BaseMarkPoint extends BaseMarker {
109948
110328
  return markPoint;
109949
110329
  }
109950
110330
  _markerLayout() {
109951
- var _a, _b, _c, _d, _e;
110331
+ var _a, _b, _c, _d, _e, _f;
109952
110332
  const spec = this._spec;
109953
110333
  const data = this._markerData;
109954
110334
  const relativeSeries = this._relativeSeries;
@@ -109972,12 +110352,15 @@ class BaseMarkPoint extends BaseMarker {
109972
110352
  if (this._markerComponent) {
109973
110353
  const attribute = (_b = this._markerComponent.attribute) !== null && _b !== void 0 ? _b : {};
109974
110354
  const textStyle = (_d = (_c = attribute.itemContent) === null || _c === void 0 ? void 0 : _c.textStyle) !== null && _d !== void 0 ? _d : {};
110355
+ const specText = (_e = this._spec.itemContent.text) === null || _e === void 0 ? void 0 : _e.text;
109975
110356
  this._markerComponent.setAttributes({
109976
110357
  position: point === undefined ? { x: null, y: null } : point,
109977
- itemContent: Object.assign(Object.assign({}, attribute.itemContent), { textStyle: Object.assign(Object.assign({}, textStyle), { text: ((_e = this._spec.itemContent.text) === null || _e === void 0 ? void 0 : _e.formatMethod)
110358
+ itemContent: Object.assign(Object.assign({}, attribute.itemContent), { textStyle: Object.assign(Object.assign({}, textStyle), { text: ((_f = this._spec.itemContent.text) === null || _f === void 0 ? void 0 : _f.formatMethod)
109978
110359
  ?
109979
110360
  this._spec.itemContent.text.formatMethod(dataPoints, seriesData)
109980
- : textStyle.text }), offsetX: computeOffsetFromRegion(point, attribute.itemContent.offsetX, this._relativeSeries.getRegion()), offsetY: computeOffsetFromRegion(point, attribute.itemContent.offsetY, this._relativeSeries.getRegion()) }),
110361
+ : isValid$1(specText)
110362
+ ? specText
110363
+ : textStyle.text }), offsetX: computeOffsetFromRegion(point, attribute.itemContent.offsetX, this._relativeSeries.getRegion()), offsetY: computeOffsetFromRegion(point, attribute.itemContent.offsetY, this._relativeSeries.getRegion()) }),
109981
110364
  limitRect,
109982
110365
  dx: this._layoutOffsetX,
109983
110366
  dy: this._layoutOffsetY
@@ -110046,10 +110429,10 @@ class CartesianMarkPoint extends BaseMarkPoint {
110046
110429
  const autoRange = (_a = spec === null || spec === void 0 ? void 0 : spec.autoRange) !== null && _a !== void 0 ? _a : false;
110047
110430
  let point;
110048
110431
  if (isXYLayout) {
110049
- point = (_c = (_b = xyLayout(data, relativeSeries, relativeSeries, relativeSeries, autoRange)) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c[0];
110432
+ point = (_c = (_b = xyLayout(data, relativeSeries, relativeSeries, relativeSeries, autoRange, false, this._getAutoRangeExtendDomainKeyPrefix())) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c[0];
110050
110433
  }
110051
110434
  else if (isCoordinateLayout) {
110052
- point = cartesianCoordinateLayout(data, relativeSeries, autoRange, spec.coordinatesOffset)[0];
110435
+ point = cartesianCoordinateLayout(data, relativeSeries, autoRange, spec.coordinatesOffset, this._getAutoRangeExtendDomainKeyPrefix())[0];
110053
110436
  }
110054
110437
  else if (isPositionLayout) {
110055
110438
  point = positionLayout(spec.position, relativeSeries, spec.regionRelative)[0];
@@ -110097,7 +110480,7 @@ class PolarMarkPoint extends BaseMarkPoint {
110097
110480
  const data = this._markerData;
110098
110481
  const relativeSeries = this._relativeSeries;
110099
110482
  const autoRange = (_b = (_a = this._spec) === null || _a === void 0 ? void 0 : _a.autoRange) !== null && _b !== void 0 ? _b : false;
110100
- const polarPoint = polarLayout(data, relativeSeries, relativeSeries, relativeSeries, autoRange)[0][0];
110483
+ const polarPoint = polarLayout(data, relativeSeries, relativeSeries, relativeSeries, autoRange, this._getAutoRangeExtendDomainKeyPrefix())[0][0];
110101
110484
  const center = {
110102
110485
  x: this._relativeSeries.getRegion().getLayoutStartPoint().x +
110103
110486
  this._relativeSeries.angleAxisHelper.center().x,
@@ -110174,6 +110557,11 @@ const brush = {
110174
110557
 
110175
110558
  const IN_BRUSH_STATE = 'inBrush';
110176
110559
  const OUT_BRUSH_STATE = 'outOfBrush';
110560
+ const BRUSH_COMPONENT_ONLY_CHANGE_KEYS = {
110561
+ style: true,
110562
+ inBrush: true,
110563
+ outOfBrush: true
110564
+ };
110177
110565
  class Brush extends BaseComponent {
110178
110566
  constructor() {
110179
110567
  super(...arguments);
@@ -110299,11 +110687,23 @@ class Brush extends BaseComponent {
110299
110687
  }
110300
110688
  const result = super._compareSpec(spec, prevSpec);
110301
110689
  if (!isEqual(prevSpec, spec)) {
110690
+ result.change = true;
110302
110691
  result.reRender = true;
110303
- result.reMake = true;
110692
+ if (!result.reMake && !result.reCompile && this._isComponentOnlySpecChange(spec, prevSpec)) {
110693
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, layout: true, render: true });
110694
+ }
110695
+ else {
110696
+ result.reMake = true;
110697
+ }
110304
110698
  }
110305
110699
  return result;
110306
110700
  }
110701
+ _isComponentOnlySpecChange(spec, prevSpec) {
110702
+ const keys = Object.keys(Object.assign(Object.assign({}, prevSpec), spec));
110703
+ return keys.every(key => {
110704
+ return isEqual(prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec[key], spec === null || spec === void 0 ? void 0 : spec[key]) || BRUSH_COMPONENT_ONLY_CHANGE_KEYS[key];
110705
+ });
110706
+ }
110307
110707
  onLayoutEnd() {
110308
110708
  var _a;
110309
110709
  super.onLayoutEnd();
@@ -110326,9 +110726,10 @@ class Brush extends BaseComponent {
110326
110726
  }
110327
110727
  }
110328
110728
  _updateBrushComponent(region, componentIndex) {
110729
+ var _a;
110329
110730
  const interactiveAttr = this._getBrushInteractiveAttr(region);
110330
110731
  const brushComponent = this._brushComponents[componentIndex];
110331
- brushComponent.setAttributes(interactiveAttr);
110732
+ brushComponent.setAttributes(Object.assign({ brushStyle: transformToGraphic((_a = this._spec) === null || _a === void 0 ? void 0 : _a.style) }, interactiveAttr));
110332
110733
  this._initMarkBrushState(componentIndex, '');
110333
110734
  brushComponent.children[0].removeAllChild();
110334
110735
  }
@@ -110767,6 +111168,10 @@ const registerBrush = () => {
110767
111168
  Factory.registerComponent(Brush.type, Brush);
110768
111169
  };
110769
111170
 
111171
+ const CUSTOM_MARK_COMPONENT_ONLY_CHANGE_KEYS = {
111172
+ style: true,
111173
+ state: true
111174
+ };
110770
111175
  class CustomMark extends BaseComponent {
110771
111176
  constructor() {
110772
111177
  super(...arguments);
@@ -110857,12 +111262,43 @@ class CustomMark extends BaseComponent {
110857
111262
  _compareSpec(spec, prevSpec) {
110858
111263
  const result = super._compareSpec(spec, prevSpec);
110859
111264
  if (!isEqual(prevSpec, spec)) {
110860
- result.reMake = true;
111265
+ if (!result.reMake && !result.reCompile && this._isComponentOnlySpecChange(spec, prevSpec)) {
111266
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, render: true });
111267
+ }
111268
+ else {
111269
+ result.reMake = true;
111270
+ }
110861
111271
  }
110862
111272
  result.change = true;
110863
111273
  result.reRender = true;
110864
111274
  return result;
110865
111275
  }
111276
+ _isComponentOnlySpecChange(spec, prevSpec) {
111277
+ const keys = Object.keys(Object.assign(Object.assign({}, prevSpec), spec));
111278
+ return keys.every(key => {
111279
+ return isEqual(prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec[key], spec === null || spec === void 0 ? void 0 : spec[key]) || CUSTOM_MARK_COMPONENT_ONLY_CHANGE_KEYS[key];
111280
+ });
111281
+ }
111282
+ reInit(spec) {
111283
+ super.reInit(spec);
111284
+ this._updateMarkStyleWithSpec(this._spec, this.getMarks()[0]);
111285
+ this.getMarks().forEach(mark => {
111286
+ mark.commit(false, true);
111287
+ });
111288
+ }
111289
+ _updateMarkStyleWithSpec(spec, mark) {
111290
+ var _a, _b, _c, _d;
111291
+ if (!spec || !mark) {
111292
+ return;
111293
+ }
111294
+ this.initMarkStyleWithSpec(mark, spec);
111295
+ if (spec.type === 'group') {
111296
+ const children = (_c = (_b = (_a = mark).getMarks) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : [];
111297
+ (_d = spec.children) === null || _d === void 0 ? void 0 : _d.forEach((childSpec, index) => {
111298
+ this._updateMarkStyleWithSpec(childSpec, children[index]);
111299
+ });
111300
+ }
111301
+ }
110866
111302
  _getMarkAttributeContext() {
110867
111303
  return {
110868
111304
  vchart: this._option.globalInstance,