@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.js CHANGED
@@ -68797,6 +68797,15 @@
68797
68797
  compileOnlyKeys: defaultSeriesCompileOnlyCheckKeys,
68798
68798
  dataRelatedKeys: defaultSeriesDataRelatedCheckKeys
68799
68799
  };
68800
+ const defaultSeriesMarkCompileOnlySubKeys = {
68801
+ interactive: true,
68802
+ zIndex: true,
68803
+ visible: true,
68804
+ style: true,
68805
+ state: true,
68806
+ stateSort: true,
68807
+ customShape: true
68808
+ };
68800
68809
  const isSpecObject = (value) => isObject$2(value) && !isArray$1(value) && !isFunction$1(value);
68801
68810
  const hasOnlyAllowedSubKeyChanges = (specValue, prevSpecValue, allowedSubKeys) => {
68802
68811
  if (!isSpecObject(specValue) || !isSpecObject(prevSpecValue)) {
@@ -69547,12 +69556,13 @@
69547
69556
  if (result.reMake) {
69548
69557
  return result;
69549
69558
  }
69550
- if (!result.reCompile &&
69551
- this._marks.getMarks().some(m => {
69552
- var _a, _b;
69553
- ignores[m.name] = true;
69554
- 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);
69555
- })) {
69559
+ const changedMarkCompileOnlyKeys = this.getMarksWithoutRoot()
69560
+ .map(m => m.name)
69561
+ .filter(name => hasOnlyAllowedSubKeyChanges(spec[name], prevSpec[name], defaultSeriesMarkCompileOnlySubKeys));
69562
+ changedMarkCompileOnlyKeys.forEach(k => {
69563
+ ignores[k] = true;
69564
+ });
69565
+ if (!result.reCompile && changedMarkCompileOnlyKeys.length) {
69556
69566
  result.reCompile = true;
69557
69567
  }
69558
69568
  const changedCompileKeys = currentKeys.filter((k) => {
@@ -69573,7 +69583,7 @@
69573
69583
  }
69574
69584
  else if (result.reCompile &&
69575
69585
  !((_d = result.effects) === null || _d === void 0 ? void 0 : _d.series) &&
69576
- (changedCompileKeys.length || changedCompileOnlySubKeys.length)) {
69586
+ (changedCompileKeys.length || changedCompileOnlySubKeys.length || changedMarkCompileOnlyKeys.length)) {
69577
69587
  markSeriesCompileEffect(result);
69578
69588
  }
69579
69589
  if (currentKeys.some((k) => {
@@ -72653,6 +72663,7 @@
72653
72663
  }
72654
72664
  }
72655
72665
  _compareSpec(spec, prevSpec) {
72666
+ var _a, _b;
72656
72667
  const result = super._compareSpec(spec, prevSpec);
72657
72668
  if (result.reMake) {
72658
72669
  return result;
@@ -72663,10 +72674,10 @@
72663
72674
  result.reMake = true;
72664
72675
  return result;
72665
72676
  }
72666
- result.reMake = ['grid', 'subGrid', 'tick', 'subTick', 'label', 'domainLine', 'title'].some(k => {
72667
- var _a, _b;
72668
- 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);
72669
- });
72677
+ 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) {
72678
+ result.reMake = true;
72679
+ return result;
72680
+ }
72670
72681
  if (specChanged && !result.reMake && this._isComponentOnlySpecChange(spec, prevSpec)) {
72671
72682
  result.effects = Object.assign(Object.assign({}, result.effects), { component: true, layout: true, render: true });
72672
72683
  }
@@ -74005,21 +74016,18 @@
74005
74016
  }
74006
74017
  setExtendDomain(key, value) {
74007
74018
  if (value === undefined) {
74019
+ if (!Object.prototype.hasOwnProperty.call(this._extend, key)) {
74020
+ return;
74021
+ }
74008
74022
  delete this._extend[key];
74009
- return;
74010
74023
  }
74011
- this._extend[key] = value;
74012
- const domain = this._scale.domain();
74013
- this.extendDomain(domain);
74014
- this.includeZero(domain);
74015
- this.setDomainMinMax(domain);
74016
- this.niceDomain(domain);
74017
- this._scale.domain(domain, this._nice);
74018
- if (this._nice) {
74019
- const niced = this.setScaleNice();
74020
- !niced && this._scale.rescale();
74024
+ else {
74025
+ if (this._extend[key] === value) {
74026
+ return;
74027
+ }
74028
+ this._extend[key] = value;
74021
74029
  }
74022
- this.event.emit(exports.ChartEvent.scaleUpdate, { model: this, value: 'domain' });
74030
+ this.updateScaleDomain();
74023
74031
  }
74024
74032
  extendDomain(domain) {
74025
74033
  let temp;
@@ -75956,6 +75964,21 @@
75956
75964
  [ComponentTypeEnum.markLine]: true,
75957
75965
  [ComponentTypeEnum.markArea]: true
75958
75966
  };
75967
+ const MARKER_ADDITION_REMAKE_SPEC_KEYS = {
75968
+ autoRange: true,
75969
+ regionId: true,
75970
+ regionIndex: true,
75971
+ seriesId: true,
75972
+ seriesIndex: true,
75973
+ relativeSeriesId: true,
75974
+ relativeSeriesIndex: true,
75975
+ startRelativeSeriesId: true,
75976
+ startRelativeSeriesIndex: true,
75977
+ endRelativeSeriesId: true,
75978
+ endRelativeSeriesIndex: true,
75979
+ specifiedDataSeriesId: true,
75980
+ specifiedDataSeriesIndex: true
75981
+ };
75959
75982
  class BaseChart extends CompilableBase {
75960
75983
  getSpec() {
75961
75984
  return this._spec;
@@ -76130,6 +76153,12 @@
76130
76153
  this.getComponentsByType = (type) => {
76131
76154
  return this._components.filter(c => c.type === type);
76132
76155
  };
76156
+ this._isMarkerAdditionSpecSafeWithoutRemake = (spec) => {
76157
+ if (!spec || typeof spec !== 'object' || spec.visible === false) {
76158
+ return false;
76159
+ }
76160
+ return !Object.keys(MARKER_ADDITION_REMAKE_SPEC_KEYS).some(key => !isNil$1(spec[key]));
76161
+ };
76133
76162
  this._paddingSpec = normalizeLayoutPaddingSpec((_a = spec.padding) !== null && _a !== void 0 ? _a : option.getTheme('padding'));
76134
76163
  this._event = new Event$1(option.eventDispatcher, option.mode);
76135
76164
  this._dataSet = option.dataSet;
@@ -76529,7 +76558,7 @@
76529
76558
  .sort();
76530
76559
  }
76531
76560
  updateSpec(spec) {
76532
- var _a;
76561
+ var _a, _b;
76533
76562
  const result = {
76534
76563
  change: false,
76535
76564
  reMake: false,
@@ -76555,7 +76584,7 @@
76555
76584
  const nextSpec = spec[key];
76556
76585
  if (isArray$1(currentSpec) &&
76557
76586
  currentSpec.length !== array(nextSpec).length &&
76558
- !this._canRemoveMarkerComponentsWithoutRemake(key, currentSpec, nextSpec)) {
76587
+ !this._canChangeMarkerComponentsWithoutRemake(key, currentSpec, nextSpec)) {
76559
76588
  result.reMake = true;
76560
76589
  this.setLayoutTag(true, null, false);
76561
76590
  return result;
@@ -76590,16 +76619,19 @@
76590
76619
  this.setLayoutTag(true, null, false);
76591
76620
  return result;
76592
76621
  }
76622
+ if (!onlyComponentSpecsChanged && ((_a = result.effects) === null || _a === void 0 ? void 0 : _a.localOnly)) {
76623
+ delete result.effects.localOnly;
76624
+ }
76593
76625
  if (isUpdateSpecResultLocalOnly(result)) {
76594
76626
  return result;
76595
76627
  }
76596
76628
  if (onlyComponentSpecsChanged &&
76597
76629
  !componentUpdateResult.hasNonComponentOnlyUpdate &&
76598
- isUpdateSpecResultComponentOnly(result)) {
76630
+ (isUpdateSpecResultComponentOnly(result) || this._isComponentScaleDomainOnlyUpdate(result))) {
76599
76631
  componentUpdateResult.componentOnlyUpdatedComponents.forEach(component => {
76600
76632
  component.reInit(component.getSpec());
76601
76633
  });
76602
- if ((_a = result.effects) === null || _a === void 0 ? void 0 : _a.layout) {
76634
+ if ((_b = result.effects) === null || _b === void 0 ? void 0 : _b.layout) {
76603
76635
  this.setLayoutTag(true, null, false);
76604
76636
  }
76605
76637
  return result;
@@ -76612,7 +76644,9 @@
76612
76644
  this.reInit();
76613
76645
  if (!onlySeriesSpecsChanged || !this._canSkipChartDataStages(result)) {
76614
76646
  this.updateDataSpec();
76615
- this.updateGlobalScaleDomain();
76647
+ this.reDataFlow();
76648
+ this._reRunStackDataFlow();
76649
+ this.getAllModels().forEach(model => model.onDataUpdate());
76616
76650
  }
76617
76651
  return result;
76618
76652
  }
@@ -76673,7 +76707,8 @@
76673
76707
  const componentSpec = (_b = cmpSpec[c.getSpecIndex()]) !== null && _b !== void 0 ? _b : {};
76674
76708
  const previousComponentSpec = c.getSpec();
76675
76709
  const componentResult = c.updateSpec(componentSpec, cmpSpec);
76676
- if (isUpdateSpecResultComponentOnly(componentResult)) {
76710
+ if (isUpdateSpecResultComponentOnly(componentResult) ||
76711
+ this._isComponentScaleDomainOnlyUpdate(componentResult)) {
76677
76712
  componentOnlyUpdatedComponents.push(c);
76678
76713
  }
76679
76714
  else if (!isEqual(previousComponentSpec, componentSpec)) {
@@ -76684,7 +76719,8 @@
76684
76719
  else {
76685
76720
  const previousComponentSpec = c.getSpec();
76686
76721
  const componentResult = c.updateSpec(cmpSpec);
76687
- if (isUpdateSpecResultComponentOnly(componentResult)) {
76722
+ if (isUpdateSpecResultComponentOnly(componentResult) ||
76723
+ this._isComponentScaleDomainOnlyUpdate(componentResult)) {
76688
76724
  componentOnlyUpdatedComponents.push(c);
76689
76725
  }
76690
76726
  else if (!isEqual(previousComponentSpec, cmpSpec)) {
@@ -76693,6 +76729,9 @@
76693
76729
  mergeUpdateResult(result, componentResult);
76694
76730
  }
76695
76731
  });
76732
+ if (!result.reMake) {
76733
+ this._createMissingMarkerComponentsForSpecs(result, componentCache);
76734
+ }
76696
76735
  for (const key in componentCache) {
76697
76736
  if (Object.prototype.hasOwnProperty.call(componentCache, key)) {
76698
76737
  const element = componentCache[key];
@@ -76723,6 +76762,19 @@
76723
76762
  hasNonComponentOnlyUpdate
76724
76763
  };
76725
76764
  }
76765
+ _canChangeMarkerComponentsWithoutRemake(key, currentSpec, nextSpec) {
76766
+ return (this._canRemoveMarkerComponentsWithoutRemake(key, currentSpec, nextSpec) ||
76767
+ this._canAddMarkerComponentsWithoutRemake(key, currentSpec, nextSpec));
76768
+ }
76769
+ _canAddMarkerComponentsWithoutRemake(key, currentSpec, nextSpec) {
76770
+ if (!MARKER_COMPONENT_SPEC_KEYS[key] || !isArray$1(currentSpec) || !isArray$1(nextSpec)) {
76771
+ return false;
76772
+ }
76773
+ if (nextSpec.length <= currentSpec.length) {
76774
+ return false;
76775
+ }
76776
+ return nextSpec.slice(currentSpec.length).every(this._isMarkerAdditionSpecSafeWithoutRemake);
76777
+ }
76726
76778
  _canRemoveMarkerComponentsWithoutRemake(key, currentSpec, nextSpec) {
76727
76779
  return (MARKER_COMPONENT_SPEC_KEYS[key] &&
76728
76780
  isArray$1(currentSpec) &&
@@ -76742,6 +76794,9 @@
76742
76794
  return hasMarkerRemoval && onlyMarkerRemoval;
76743
76795
  }
76744
76796
  _isComponentSpecKey(key) {
76797
+ if (MARKER_COMPONENT_SPEC_KEYS[key]) {
76798
+ return true;
76799
+ }
76745
76800
  return this._components.some(component => {
76746
76801
  return (component.specKey || component.type) === key;
76747
76802
  });
@@ -76784,6 +76839,74 @@
76784
76839
  const effects = result.effects;
76785
76840
  return !!(effects === null || effects === void 0 ? void 0 : effects.series) && !effects.remake && !effects.data && !effects.scaleDomain && !result.reMake;
76786
76841
  }
76842
+ _isComponentScaleDomainOnlyUpdate(result) {
76843
+ const effects = result.effects;
76844
+ return (!!(effects === null || effects === void 0 ? void 0 : effects.component) &&
76845
+ !!effects.scaleDomain &&
76846
+ !result.reMake &&
76847
+ !result.reCompile &&
76848
+ !result.reSize &&
76849
+ !effects.remake &&
76850
+ !effects.compile &&
76851
+ !effects.data &&
76852
+ !effects.series &&
76853
+ !effects.animation &&
76854
+ !result.reTransformSpec &&
76855
+ !result.reAnimate &&
76856
+ !result.changeTheme &&
76857
+ !result.changeBackground);
76858
+ }
76859
+ _reRunStackDataFlow() {
76860
+ var _a, _b;
76861
+ if (!this._series.some(series => { var _a; return (_a = series.getStack) === null || _a === void 0 ? void 0 : _a.call(series); })) {
76862
+ return;
76863
+ }
76864
+ (_b = (_a = this._stack) === null || _a === void 0 ? void 0 : _a.stackAll) === null || _b === void 0 ? void 0 : _b.call(_a);
76865
+ this._series.forEach(series => {
76866
+ if (series.getViewDataFilter()) {
76867
+ series.reTransformViewData();
76868
+ }
76869
+ });
76870
+ }
76871
+ _getModelSpecIndex(specInfo) {
76872
+ var _a;
76873
+ const specPath = (_a = specInfo.specPath) !== null && _a !== void 0 ? _a : [];
76874
+ const specIndex = specPath[specPath.length - 1];
76875
+ return typeof specIndex === 'number' ? specIndex : 0;
76876
+ }
76877
+ _hasComponentForSpecInfo(key, specInfo) {
76878
+ const specIndex = this._getModelSpecIndex(specInfo);
76879
+ return this._components.some(component => {
76880
+ return (component.specKey || component.type) === key && component.getSpecIndex() === specIndex;
76881
+ });
76882
+ }
76883
+ _createMissingMarkerComponentsForSpecs(result, componentCache) {
76884
+ var _a;
76885
+ let createdCount = 0;
76886
+ (_a = this._specTransformer) === null || _a === void 0 ? void 0 : _a.forEachComponentInSpec(this._spec, (constructor, specInfo) => {
76887
+ if (result.reMake) {
76888
+ return;
76889
+ }
76890
+ const compSpecKey = constructor.specKey || constructor.type;
76891
+ if (!MARKER_COMPONENT_SPEC_KEYS[compSpecKey] || this._hasComponentForSpecInfo(compSpecKey, specInfo)) {
76892
+ return;
76893
+ }
76894
+ if (!this._isMarkerAdditionSpecSafeWithoutRemake(specInfo.spec)) {
76895
+ result.reMake = true;
76896
+ return;
76897
+ }
76898
+ this._createComponent(constructor, specInfo);
76899
+ if (componentCache[compSpecKey]) {
76900
+ componentCache[compSpecKey].componentCount++;
76901
+ }
76902
+ createdCount++;
76903
+ }, this._option.getSpecInfo());
76904
+ if (!createdCount) {
76905
+ return;
76906
+ }
76907
+ result.change = true;
76908
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, layout: true, render: true });
76909
+ }
76787
76910
  _removeMarkerComponentsForEmptySpecs(result) {
76788
76911
  const removedComponents = this._components.filter(component => {
76789
76912
  var _a;
@@ -77326,6 +77449,7 @@
77326
77449
  };
77327
77450
  const seriesType = this.seriesType;
77328
77451
  if (seriesType) {
77452
+ this._addSeriesRelatedSpecKeys([seriesType]);
77329
77453
  series.type = seriesType;
77330
77454
  series[seriesType] = chartSpec[seriesType];
77331
77455
  }
@@ -103269,6 +103393,16 @@
103269
103393
  this._regions = this._option.getAllRegions();
103270
103394
  this._initEvent();
103271
103395
  }
103396
+ _compareSpec(spec, prevSpec) {
103397
+ const result = super._compareSpec(spec, prevSpec);
103398
+ const specChanged = !isEqual(prevSpec, spec);
103399
+ if (specChanged && !result.reMake && !result.reCompile) {
103400
+ result.change = true;
103401
+ result.reRender = true;
103402
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, render: true });
103403
+ }
103404
+ return result;
103405
+ }
103272
103406
  release() {
103273
103407
  var _a, _b;
103274
103408
  super.release();
@@ -103579,6 +103713,21 @@
103579
103713
  category: ['angle'],
103580
103714
  value: ['radius']
103581
103715
  };
103716
+ const CROSSHAIR_COMPONENT_ONLY_TOP_LEVEL_CHANGE_KEYS = {
103717
+ labelZIndex: true,
103718
+ gridZIndex: true
103719
+ };
103720
+ const CROSSHAIR_FIELD_KEYS = {
103721
+ xField: true,
103722
+ yField: true,
103723
+ categoryField: true,
103724
+ valueField: true
103725
+ };
103726
+ const CROSSHAIR_LINE_COMPONENT_ONLY_CHANGE_KEYS = {
103727
+ visible: true,
103728
+ width: true,
103729
+ style: true
103730
+ };
103582
103731
  class BaseCrossHair extends BaseComponent {
103583
103732
  get enableRemain() {
103584
103733
  return this.triggerOff === 'none';
@@ -103773,12 +103922,43 @@
103773
103922
  }
103774
103923
  _compareSpec(spec, prevSpec) {
103775
103924
  const result = super._compareSpec(spec, prevSpec);
103776
- if (!result.reMake && !isEqual(prevSpec, spec)) {
103925
+ const specChanged = !isEqual(prevSpec, spec);
103926
+ if (specChanged) {
103927
+ result.change = true;
103777
103928
  result.reRender = true;
103778
- result.reMake = true;
103929
+ if (!result.reMake) {
103930
+ if (this._isComponentOnlySpecChange(spec, prevSpec)) {
103931
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, layout: true, render: true });
103932
+ }
103933
+ else {
103934
+ result.reMake = true;
103935
+ }
103936
+ }
103779
103937
  }
103780
103938
  return result;
103781
103939
  }
103940
+ _isComponentOnlySpecChange(spec, prevSpec) {
103941
+ const keys = Object.keys(Object.assign(Object.assign({}, prevSpec), spec));
103942
+ return keys.every(key => {
103943
+ return (isEqual(prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec[key], spec === null || spec === void 0 ? void 0 : spec[key]) ||
103944
+ CROSSHAIR_COMPONENT_ONLY_TOP_LEVEL_CHANGE_KEYS[key] ||
103945
+ (CROSSHAIR_FIELD_KEYS[key] && this._isFieldComponentOnlySpecChange(prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec[key], spec === null || spec === void 0 ? void 0 : spec[key])));
103946
+ });
103947
+ }
103948
+ _isFieldComponentOnlySpecChange(prevSpec, spec) {
103949
+ const keys = Object.keys(Object.assign(Object.assign({}, prevSpec), spec));
103950
+ return keys.every(key => {
103951
+ return (isEqual(prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec[key], spec === null || spec === void 0 ? void 0 : spec[key]) ||
103952
+ key === 'label' ||
103953
+ (key === 'line' && this._isLineComponentOnlySpecChange(prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec.line, spec === null || spec === void 0 ? void 0 : spec.line)));
103954
+ });
103955
+ }
103956
+ _isLineComponentOnlySpecChange(prevSpec, spec) {
103957
+ const keys = Object.keys(Object.assign(Object.assign({}, prevSpec), spec));
103958
+ return keys.every(key => {
103959
+ 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];
103960
+ });
103961
+ }
103782
103962
  _initEvent() {
103783
103963
  if (this._option.disableTriggerEvent) {
103784
103964
  return;
@@ -105202,11 +105382,30 @@
105202
105382
  _compareSpec(spec, prevSpec) {
105203
105383
  const result = super._compareSpec(spec, prevSpec);
105204
105384
  if (!result.reMake && !isEqual(prevSpec, spec)) {
105385
+ result.change = true;
105205
105386
  result.reRender = true;
105206
- result.reMake = true;
105387
+ if (!result.reCompile && this._isComponentOnlySpecChange(spec, prevSpec)) {
105388
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, layout: true, render: true });
105389
+ }
105390
+ else {
105391
+ result.reMake = true;
105392
+ }
105207
105393
  }
105208
105394
  return result;
105209
105395
  }
105396
+ _getComponentOnlySpecKeys() {
105397
+ return null;
105398
+ }
105399
+ _isComponentOnlySpecChange(spec, prevSpec) {
105400
+ const componentOnlySpecKeys = this._getComponentOnlySpecKeys();
105401
+ if (!componentOnlySpecKeys) {
105402
+ return false;
105403
+ }
105404
+ const keys = Object.keys(Object.assign(Object.assign({}, prevSpec), spec));
105405
+ return keys.every(key => {
105406
+ return isEqual(prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec[key], spec === null || spec === void 0 ? void 0 : spec[key]) || componentOnlySpecKeys[key];
105407
+ });
105408
+ }
105210
105409
  reInit(spec) {
105211
105410
  super.reInit(spec);
105212
105411
  this._marks.forEach(g => {
@@ -105832,6 +106031,22 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
105832
106031
  backgroundChart: getBackgroundChartTheme(true)
105833
106032
  };
105834
106033
 
106034
+ const DATA_ZOOM_COMPONENT_ONLY_CHANGE_KEYS = {
106035
+ width: true,
106036
+ height: true,
106037
+ showDetail: true,
106038
+ middleHandler: true,
106039
+ background: true,
106040
+ startHandler: true,
106041
+ endHandler: true,
106042
+ startText: true,
106043
+ endText: true,
106044
+ dragMask: true,
106045
+ selectedBackground: true,
106046
+ backgroundChart: true,
106047
+ selectedBackgroundChart: true,
106048
+ showBackgroundChart: true
106049
+ };
105835
106050
  class DataZoom extends DataFilterBaseComponent {
105836
106051
  constructor(spec, options) {
105837
106052
  var _a;
@@ -105942,6 +106157,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
105942
106157
  this.effect.onZoomChange();
105943
106158
  }
105944
106159
  }
106160
+ _getComponentOnlySpecKeys() {
106161
+ return DATA_ZOOM_COMPONENT_ONLY_CHANGE_KEYS;
106162
+ }
105945
106163
  clear() {
105946
106164
  if (this._component) {
105947
106165
  const container = this.getContainer();
@@ -106297,6 +106515,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106297
106515
 
106298
106516
  const SCROLLBAR_EVENT = 'scrollDrag';
106299
106517
  const SCROLLBAR_END_EVENT = 'scrollUp';
106518
+ const SCROLL_BAR_COMPONENT_ONLY_CHANGE_KEYS = {
106519
+ width: true,
106520
+ height: true,
106521
+ rail: true,
106522
+ slider: true,
106523
+ round: true,
106524
+ innerPadding: true,
106525
+ minSliderSize: true
106526
+ };
106300
106527
  class ScrollBar extends DataFilterBaseComponent {
106301
106528
  constructor(spec, options) {
106302
106529
  var _a;
@@ -106346,6 +106573,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106346
106573
  data.reRunAllTransform();
106347
106574
  }
106348
106575
  }
106576
+ _getComponentOnlySpecKeys() {
106577
+ return SCROLL_BAR_COMPONENT_ONLY_CHANGE_KEYS;
106578
+ }
106349
106579
  _beforeLayoutEnd() {
106350
106580
  var _a, _b;
106351
106581
  super._beforeLayoutEnd();
@@ -106519,6 +106749,16 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106519
106749
  this._content = array(this._spec.content);
106520
106750
  this._regions = this._option.getRegionsInUserIdOrIndex(array(this._spec.regionId), array(this._spec.regionIndex));
106521
106751
  }
106752
+ _compareSpec(spec, prevSpec) {
106753
+ const result = super._compareSpec(spec, prevSpec);
106754
+ const specChanged = !isEqual(prevSpec, spec);
106755
+ if (specChanged && !result.reMake && !result.reCompile) {
106756
+ result.change = true;
106757
+ result.reRender = true;
106758
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, layout: true, render: true });
106759
+ }
106760
+ return result;
106761
+ }
106522
106762
  initEvent() {
106523
106763
  if (this._option.disableTriggerEvent) {
106524
106764
  return;
@@ -106690,12 +106930,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106690
106930
  }
106691
106931
  return false;
106692
106932
  }
106693
- function getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint) {
106933
+ function getAutoRangeExtendDomainKey(keyPrefix, axisKey) {
106934
+ return keyPrefix ? `${keyPrefix}_${axisKey}_extend` : `marker_${axisKey}_extend`;
106935
+ }
106936
+ function getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint, autoRangeExtendDomainKeyPrefix) {
106694
106937
  var _a, _b;
106695
106938
  const { relativeSeries } = refSeries;
106696
106939
  isNumber$2(datum.x) &&
106697
106940
  isNeedExtendDomain(xDomain, datum.x, autoRange) &&
106698
- ((_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));
106941
+ ((_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));
106699
106942
  let x;
106700
106943
  if (isPercent(datum.x)) {
106701
106944
  x = convertPercentToValue(datum.x, regionWidth) + regionStartLayoutStartPoint.x;
@@ -106707,12 +106950,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106707
106950
  }
106708
106951
  return x;
106709
106952
  }
106710
- function getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint) {
106953
+ function getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint, autoRangeExtendDomainKeyPrefix) {
106711
106954
  var _a, _b;
106712
106955
  const { relativeSeries } = refSeries;
106713
106956
  isNumber$2(datum.y) &&
106714
106957
  isNeedExtendDomain(yDomain, datum.y, autoRange) &&
106715
- ((_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));
106958
+ ((_b = (_a = relativeSeries
106959
+ .getYAxisHelper()) === null || _a === void 0 ? void 0 : _a.setExtendDomain) === null || _b === void 0 ? void 0 : _b.call(_a, getAutoRangeExtendDomainKey(autoRangeExtendDomainKeyPrefix, 'yAxis'), datum.y));
106716
106960
  let y;
106717
106961
  if (isPercent(datum.y)) {
106718
106962
  y = convertPercentToValue(datum.y, regionHeight) + regionStartLayoutStartPoint.y;
@@ -106724,20 +106968,20 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106724
106968
  }
106725
106969
  return y;
106726
106970
  }
106727
- function getAngleValue(datum, angleDomain, autoRange, refSeries) {
106971
+ function getAngleValue(datum, angleDomain, autoRange, refSeries, autoRangeExtendDomainKeyPrefix) {
106728
106972
  var _a, _b;
106729
106973
  const { relativeSeries } = refSeries;
106730
106974
  isNumber$2(datum.angle) &&
106731
106975
  isNeedExtendDomain(angleDomain, datum.angle, autoRange) &&
106732
- ((_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));
106976
+ ((_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));
106733
106977
  return convertDatumToValue(relativeSeries.angleAxisHelper, [datum.angle]);
106734
106978
  }
106735
- function getRadiusValue(datum, radiusDomain, autoRange, refSeries) {
106979
+ function getRadiusValue(datum, radiusDomain, autoRange, refSeries, autoRangeExtendDomainKeyPrefix) {
106736
106980
  var _a, _b;
106737
106981
  const { relativeSeries } = refSeries;
106738
106982
  isNumber$2(datum.radius) &&
106739
106983
  isNeedExtendDomain(radiusDomain, datum.radius, autoRange) &&
106740
- ((_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));
106984
+ ((_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));
106741
106985
  return convertDatumToValue(relativeSeries.radiusAxisHelper, [datum.radius]);
106742
106986
  }
106743
106987
  function convertPercentToValue(percent, relativeLength) {
@@ -106753,7 +106997,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106753
106997
  function isAggrSpec(spec) {
106754
106998
  return AGGR_TYPE.includes(spec);
106755
106999
  }
106756
- function xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand = false) {
107000
+ function xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand = false, autoRangeExtendDomainKeyPrefix) {
106757
107001
  const regionStart = startRelativeSeries.getRegion();
106758
107002
  const regionStartLayoutStartPoint = regionStart.getLayoutStartPoint();
106759
107003
  const regionEnd = endRelativeSeries.getRegion();
@@ -106783,14 +107027,14 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106783
107027
  let x;
106784
107028
  let y;
106785
107029
  if (isValidX && isValidY) {
106786
- x = getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint);
106787
- y = getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint);
107030
+ x = getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint, autoRangeExtendDomainKeyPrefix);
107031
+ y = getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint, autoRangeExtendDomainKeyPrefix);
106788
107032
  setTempWithValid(x, isXExpand, xTemp, lines.length);
106789
107033
  setTempWithValid(y, isyExpand, yTemp, lines.length);
106790
107034
  lines.push([{ x, y }]);
106791
107035
  }
106792
107036
  else if (isValidX) {
106793
- x = getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint);
107037
+ x = getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint, autoRangeExtendDomainKeyPrefix);
106794
107038
  y = Math.max(regionStartLayoutStartPoint.y + regionStart.getLayoutRect().height, regionEndLayoutStartPoint.y + regionEnd.getLayoutRect().height);
106795
107039
  const y1 = Math.min(regionStartLayoutStartPoint.y, regionEndLayoutStartPoint.y);
106796
107040
  setTempWithValid(x, isXExpand, xTemp, lines.length);
@@ -106807,7 +107051,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106807
107051
  }
106808
107052
  else if (isValidY) {
106809
107053
  x = Math.min(regionStartLayoutStartPoint.x, regionEndLayoutStartPoint.x);
106810
- y = getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint);
107054
+ y = getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint, autoRangeExtendDomainKeyPrefix);
106811
107055
  const x1 = Math.max(regionStartLayoutStartPoint.x + regionStart.getLayoutRect().width, regionEndLayoutStartPoint.x + regionEnd.getLayoutRect().width);
106812
107056
  setTempWithValid(y, isyExpand, yTemp, lines.length);
106813
107057
  lines.push([
@@ -106862,7 +107106,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106862
107106
  }
106863
107107
  return v;
106864
107108
  }
106865
- function polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange) {
107109
+ function polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, autoRangeExtendDomainKeyPrefix) {
106866
107110
  const refSeries = {
106867
107111
  relativeSeries,
106868
107112
  startRelativeSeries,
@@ -106877,12 +107121,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106877
107121
  const isValidAngle = isValid$1(datum.angle);
106878
107122
  const isValidRadius = isValid$1(datum.radius);
106879
107123
  if (isValidAngle && isValidRadius) {
106880
- const angle = getAngleValue(datum, angleDomain, autoRange, refSeries);
106881
- const radius = getRadiusValue(datum, radiusDomain, autoRange, refSeries);
107124
+ const angle = getAngleValue(datum, angleDomain, autoRange, refSeries, autoRangeExtendDomainKeyPrefix);
107125
+ const radius = getRadiusValue(datum, radiusDomain, autoRange, refSeries, autoRangeExtendDomainKeyPrefix);
106882
107126
  lines.push([{ angle, radius }]);
106883
107127
  }
106884
107128
  else if (isValidAngle) {
106885
- const angle = getAngleValue(datum, angleDomain, autoRange, refSeries);
107129
+ const angle = getAngleValue(datum, angleDomain, autoRange, refSeries, autoRangeExtendDomainKeyPrefix);
106886
107130
  lines.push([
106887
107131
  {
106888
107132
  angle,
@@ -106895,7 +107139,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106895
107139
  ]);
106896
107140
  }
106897
107141
  else if (isValidRadius) {
106898
- const radius = getRadiusValue(datum, radiusDomain, autoRange, refSeries);
107142
+ const radius = getRadiusValue(datum, radiusDomain, autoRange, refSeries, autoRangeExtendDomainKeyPrefix);
106899
107143
  lines.push([
106900
107144
  {
106901
107145
  radius,
@@ -106928,7 +107172,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106928
107172
  });
106929
107173
  return lines;
106930
107174
  }
106931
- function cartesianCoordinateLayout(data, relativeSeries, autoRange, coordinatesOffset) {
107175
+ function cartesianCoordinateLayout(data, relativeSeries, autoRange, coordinatesOffset, autoRangeExtendDomainKeyPrefix) {
106932
107176
  const points = [];
106933
107177
  const dataPoints = data.latestData[0] && data.latestData[0].latestData ? data.latestData[0].latestData : data.latestData;
106934
107178
  const isArrayCoordinatesOffset = isArray$1(coordinatesOffset);
@@ -106958,11 +107202,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106958
107202
  xValue.length === 1 &&
106959
107203
  isNumber$2(xValue[0]) &&
106960
107204
  isNeedExtendDomain(xDomain, xValue[0], autoRange) &&
106961
- ((_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]));
107205
+ ((_b = (_a = refRelativeSeries
107206
+ .getXAxisHelper()) === null || _a === void 0 ? void 0 : _a.setExtendDomain) === null || _b === void 0 ? void 0 : _b.call(_a, getAutoRangeExtendDomainKey(autoRangeExtendDomainKeyPrefix, 'xAxis'), xValue[0]));
106962
107207
  yValue.length === 1 &&
106963
107208
  isNumber$2(yValue[0]) &&
106964
107209
  isNeedExtendDomain(yDomain, yValue[0], autoRange) &&
106965
- ((_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]));
107210
+ ((_d = (_c = refRelativeSeries
107211
+ .getYAxisHelper()) === null || _c === void 0 ? void 0 : _c.setExtendDomain) === null || _d === void 0 ? void 0 : _d.call(_c, getAutoRangeExtendDomainKey(autoRangeExtendDomainKeyPrefix, 'yAxis'), yValue[0]));
106966
107212
  points.push({
106967
107213
  x: convertDatumToValue(refRelativeSeries.getXAxisHelper(), xValue) + regionStartLayoutStartPoint.x + offsetX,
106968
107214
  y: convertDatumToValue(refRelativeSeries.getYAxisHelper(), yValue) + regionStartLayoutStartPoint.y + offsetY
@@ -106970,7 +107216,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106970
107216
  });
106971
107217
  return points;
106972
107218
  }
106973
- function polarCoordinateLayout(data, relativeSeries, autoRange) {
107219
+ function polarCoordinateLayout(data, relativeSeries, autoRange, autoRangeExtendDomainKeyPrefix) {
106974
107220
  const points = [];
106975
107221
  const dataPoints = data.latestData[0] && data.latestData[0].latestData ? data.latestData[0].latestData : data.latestData;
106976
107222
  dataPoints.forEach((datum) => {
@@ -106983,11 +107229,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106983
107229
  angleValue.length === 1 &&
106984
107230
  isNumber$2(angleValue[0]) &&
106985
107231
  isNeedExtendDomain(angleDomain, angleValue[0], autoRange) &&
106986
- ((_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]));
107232
+ ((_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]));
106987
107233
  radiusValue.length === 1 &&
106988
107234
  isNumber$2(radiusValue[0]) &&
106989
107235
  isNeedExtendDomain(radiusDomain, radiusValue[0], autoRange) &&
106990
- ((_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]));
107236
+ ((_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]));
106991
107237
  points.push({
106992
107238
  angle: convertDatumToValue(refRelativeSeries.angleAxisHelper, angleValue),
106993
107239
  radius: convertDatumToValue(refRelativeSeries.radiusAxisHelper, radiusValue)
@@ -107516,6 +107762,65 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
107516
107762
  releaseDataViews([dataView, ...releaseDependencies]);
107517
107763
  };
107518
107764
 
107765
+ const MARKER_FORMAT_METHOD_PLACEHOLDER = '__vchart_marker_format_method__';
107766
+ const MARKER_COORDINATE_PLACEHOLDER = '__vchart_marker_coordinate__';
107767
+ const MARKER_TEXT_PLACEHOLDER = '__vchart_marker_text__';
107768
+ const MARKER_AUTO_RANGE_PLACEHOLDER = '__vchart_marker_auto_range__';
107769
+ const MARKER_DOMAIN_POSITION_SPEC_KEYS = [
107770
+ 'coordinate',
107771
+ 'coordinates',
107772
+ 'x',
107773
+ 'y',
107774
+ 'x1',
107775
+ 'y1',
107776
+ 'angle',
107777
+ 'angle1',
107778
+ 'radius',
107779
+ 'radius1'
107780
+ ];
107781
+ const MARKER_LAYOUT_POSITION_SPEC_KEYS = ['position', 'positions', 'coordinatesOffset', 'regionRelative'];
107782
+ const normalizeMarkerLabelFormatMethod = (label) => {
107783
+ if (Array.isArray(label)) {
107784
+ return label.map(normalizeMarkerLabelFormatMethod);
107785
+ }
107786
+ if (!label || typeof label !== 'object') {
107787
+ return label;
107788
+ }
107789
+ if (typeof label.formatMethod !== 'function') {
107790
+ return label;
107791
+ }
107792
+ return Object.assign(Object.assign({}, label), { formatMethod: MARKER_FORMAT_METHOD_PLACEHOLDER });
107793
+ };
107794
+ const normalizeMarkerSpecForComponentOnlyUpdate = (spec, options) => {
107795
+ var _a;
107796
+ if (!spec || typeof spec !== 'object') {
107797
+ return spec;
107798
+ }
107799
+ const normalized = Object.assign({}, spec);
107800
+ if (options.normalizeDomainPosition) {
107801
+ MARKER_DOMAIN_POSITION_SPEC_KEYS.forEach(key => {
107802
+ if (key in normalized) {
107803
+ normalized[key] = MARKER_COORDINATE_PLACEHOLDER;
107804
+ }
107805
+ });
107806
+ }
107807
+ if (options.normalizeAutoRange && 'autoRange' in normalized) {
107808
+ normalized.autoRange = MARKER_AUTO_RANGE_PLACEHOLDER;
107809
+ }
107810
+ MARKER_LAYOUT_POSITION_SPEC_KEYS.forEach(key => {
107811
+ if (key in normalized) {
107812
+ normalized[key] = MARKER_COORDINATE_PLACEHOLDER;
107813
+ }
107814
+ });
107815
+ if ('label' in normalized) {
107816
+ normalized.label = normalizeMarkerLabelFormatMethod(normalized.label);
107817
+ }
107818
+ const text = (_a = normalized.itemContent) === null || _a === void 0 ? void 0 : _a.text;
107819
+ if (text && typeof text === 'object') {
107820
+ normalized.itemContent = Object.assign(Object.assign({}, normalized.itemContent), { text: Object.assign(Object.assign({}, normalizeMarkerLabelFormatMethod(text)), { text: MARKER_TEXT_PLACEHOLDER }) });
107821
+ }
107822
+ return normalized;
107823
+ };
107519
107824
  class BaseMarker extends BaseComponent {
107520
107825
  constructor() {
107521
107826
  super(...arguments);
@@ -107564,6 +107869,27 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
107564
107869
  getEndRelativeSeries: () => this._endRelativeSeries
107565
107870
  };
107566
107871
  }
107872
+ _getAutoRangeExtendDomainKeyPrefix() {
107873
+ return `marker_${this.type}_${this.id}`;
107874
+ }
107875
+ _getAutoRangeExtendDomainKey(axisKey) {
107876
+ return `${this._getAutoRangeExtendDomainKeyPrefix()}_${axisKey}_extend`;
107877
+ }
107878
+ _clearAutoRangeExtendDomain() {
107879
+ var _a, _b;
107880
+ const seriesList = array((_b = (_a = this._option).getAllSeries) === null || _b === void 0 ? void 0 : _b.call(_a));
107881
+ seriesList.forEach((series) => {
107882
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
107883
+ (_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);
107884
+ (_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);
107885
+ (_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);
107886
+ (_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);
107887
+ });
107888
+ }
107889
+ _updateMarkerLayout() {
107890
+ this._clearAutoRangeExtendDomain();
107891
+ this._markerLayout();
107892
+ }
107567
107893
  _getFieldInfoFromSpec(dim, spec, relativeSeries) {
107568
107894
  const specKeyByDim = {
107569
107895
  x: 'xField',
@@ -107612,7 +107938,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
107612
107938
  return;
107613
107939
  }
107614
107940
  this._markerDataChangeHandler = () => {
107615
- this._markerLayout();
107941
+ this._updateMarkerLayout();
107616
107942
  };
107617
107943
  this._markerData.target.on('change', this._markerDataChangeHandler);
107618
107944
  }
@@ -107642,7 +107968,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
107642
107968
  this._delegateEvent(this._markerComponent, event, type, null, this.getMarkerData.bind(this));
107643
107969
  });
107644
107970
  }
107645
- this._markerLayout();
107971
+ this._updateMarkerLayout();
107646
107972
  }
107647
107973
  super.updateLayoutAttribute();
107648
107974
  }
@@ -107672,9 +107998,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
107672
107998
  }
107673
107999
  initEvent() {
107674
108000
  if (this._relativeSeries.coordinate !== 'cartesian') {
107675
- this._relativeSeries.event.on('zoom', this._markerLayout.bind(this));
107676
- this._relativeSeries.event.on('panmove', this._markerLayout.bind(this));
107677
- this._relativeSeries.event.on('scroll', this._markerLayout.bind(this));
108001
+ this._relativeSeries.event.on('zoom', this._updateMarkerLayout.bind(this));
108002
+ this._relativeSeries.event.on('panmove', this._updateMarkerLayout.bind(this));
108003
+ this._relativeSeries.event.on('scroll', this._updateMarkerLayout.bind(this));
107678
108004
  }
107679
108005
  }
107680
108006
  clear() {
@@ -107715,16 +108041,50 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
107715
108041
  const result = super._compareSpec(spec, prevSpec);
107716
108042
  if (!isEqual(prevSpec, spec)) {
107717
108043
  result.reRender = true;
107718
- result.reMake = true;
107719
108044
  result.change = true;
108045
+ if (!result.reMake && !result.reCompile && this._isComponentOnlySpecChange(spec, prevSpec)) {
108046
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, layout: true, render: true });
108047
+ }
108048
+ else if (!result.reMake && !result.reCompile && this._isAutoRangeSpecChange(spec, prevSpec)) {
108049
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, scaleDomain: true, layout: true, render: true });
108050
+ }
108051
+ else {
108052
+ result.reMake = true;
108053
+ }
107720
108054
  }
107721
108055
  return result;
107722
108056
  }
108057
+ _isComponentOnlySpecChange(spec, prevSpec) {
108058
+ const normalizeDomainPosition = !(spec === null || spec === void 0 ? void 0 : spec.autoRange) && !(prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec.autoRange);
108059
+ return isEqual(normalizeMarkerSpecForComponentOnlyUpdate(prevSpec, { normalizeDomainPosition }), normalizeMarkerSpecForComponentOnlyUpdate(spec, { normalizeDomainPosition }));
108060
+ }
108061
+ _isAutoRangeSpecChange(spec, prevSpec) {
108062
+ if (!(spec === null || spec === void 0 ? void 0 : spec.autoRange) && !(prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec.autoRange)) {
108063
+ return false;
108064
+ }
108065
+ return isEqual(normalizeMarkerSpecForComponentOnlyUpdate(prevSpec, {
108066
+ normalizeDomainPosition: true,
108067
+ normalizeAutoRange: true
108068
+ }), normalizeMarkerSpecForComponentOnlyUpdate(spec, {
108069
+ normalizeDomainPosition: true,
108070
+ normalizeAutoRange: true
108071
+ }));
108072
+ }
108073
+ reInit(spec) {
108074
+ super.reInit(spec);
108075
+ this._bindSeries();
108076
+ this._initDataView();
108077
+ this._buildMarkerAttributeContext();
108078
+ if (this._markerComponent) {
108079
+ this._updateMarkerLayout();
108080
+ }
108081
+ }
107723
108082
  _initCommonDataView() {
107724
108083
  const { options } = this._computeOptions();
107725
108084
  const seriesData = this._getRelativeDataView();
107726
108085
  registerDataSetInstanceTransform(this._option.dataSet, 'markerAggregation', markerAggregation);
107727
108086
  registerDataSetInstanceTransform(this._option.dataSet, 'markerFilter', markerFilter);
108087
+ this._releaseMarkerData();
107728
108088
  const data = new DataView(this._option.dataSet, { name: `${this.type}_${this.id}_data` });
107729
108089
  data.parse([seriesData], {
107730
108090
  type: 'dataview'
@@ -107994,11 +108354,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
107994
108354
  doXYProcess ||
107995
108355
  (isValidCoordinates && isValidProcessX) ||
107996
108356
  (isValidCoordinates && isValidProcessY)) {
107997
- const xyPoints = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange);
108357
+ const xyPoints = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, false, this._getAutoRangeExtendDomainKeyPrefix());
107998
108358
  points = (xyPoints.length === 1 ? xyPoints[0] : xyPoints.map(point => point[0]));
107999
108359
  }
108000
108360
  else if (doCoordinatesProcess) {
108001
- points = cartesianCoordinateLayout(data, relativeSeries, autoRange, spec.coordinatesOffset);
108361
+ points = cartesianCoordinateLayout(data, relativeSeries, autoRange, spec.coordinatesOffset, this._getAutoRangeExtendDomainKeyPrefix());
108002
108362
  }
108003
108363
  else if (isPositionLayout) {
108004
108364
  points = positionLayout(spec.positions, relativeSeries, spec.regionRelative);
@@ -108222,7 +108582,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
108222
108582
  this._relativeSeries.angleAxisHelper.center().y
108223
108583
  };
108224
108584
  if (doAngleProcess || doRadiusProcess || doAngRadRad1Process || doRadAngAng1Process || doRadAngProcess) {
108225
- const polarPoints = polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange);
108585
+ const polarPoints = polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, this._getAutoRangeExtendDomainKeyPrefix());
108226
108586
  points = (polarPoints.length === 1 ? polarPoints[0] : polarPoints.map(point => point[0]));
108227
108587
  if (points[0].radius === points[1].radius) {
108228
108588
  pointsAttr = {
@@ -108241,7 +108601,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
108241
108601
  }
108242
108602
  }
108243
108603
  else if (doCoordinatesProcess) {
108244
- points = polarCoordinateLayout(data, relativeSeries, autoRange);
108604
+ points = polarCoordinateLayout(data, relativeSeries, autoRange, this._getAutoRangeExtendDomainKeyPrefix());
108245
108605
  pointsAttr = {
108246
108606
  points: points.map(point => {
108247
108607
  return polarToCartesian(center, point.radius, point.angle);
@@ -108619,7 +108979,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
108619
108979
  let points = [];
108620
108980
  let lines = [];
108621
108981
  if (doXYProcess) {
108622
- lines = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand);
108982
+ lines = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand, this._getAutoRangeExtendDomainKeyPrefix());
108623
108983
  const [start, end] = lines;
108624
108984
  if (start && start.length && end && end.length) {
108625
108985
  points = [
@@ -108637,14 +108997,14 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
108637
108997
  }
108638
108998
  }
108639
108999
  else if (doXProcess || doYProcess) {
108640
- lines = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand);
109000
+ lines = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand, this._getAutoRangeExtendDomainKeyPrefix());
108641
109001
  const [start, end] = lines;
108642
109002
  if (start && start.length && end && end.length) {
108643
109003
  points = [...start, end[1], end[0]];
108644
109004
  }
108645
109005
  }
108646
109006
  else if (doCoordinatesProcess) {
108647
- points = cartesianCoordinateLayout(data, relativeSeries, autoRange, spec.coordinatesOffset);
109007
+ points = cartesianCoordinateLayout(data, relativeSeries, autoRange, spec.coordinatesOffset, this._getAutoRangeExtendDomainKeyPrefix());
108648
109008
  }
108649
109009
  else if (isPositionLayout) {
108650
109010
  points = positionLayout(spec.positions, relativeSeries, spec.regionRelative);
@@ -108727,7 +109087,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
108727
109087
  this._relativeSeries.angleAxisHelper.center().y
108728
109088
  };
108729
109089
  if (doAngleProcess || doRadiusProcess || doRadAngProcess) {
108730
- const polarLines = polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange);
109090
+ const polarLines = polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, this._getAutoRangeExtendDomainKeyPrefix());
108731
109091
  if (doRadAngProcess) {
108732
109092
  pointsAttr = {
108733
109093
  innerRadius: polarLines[0][0].radius,
@@ -108757,7 +109117,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
108757
109117
  }
108758
109118
  }
108759
109119
  else if (doCoordinatesProcess) {
108760
- points = polarCoordinateLayout(data, relativeSeries, autoRange);
109120
+ points = polarCoordinateLayout(data, relativeSeries, autoRange, this._getAutoRangeExtendDomainKeyPrefix());
108761
109121
  pointsAttr = {
108762
109122
  points: points.map(point => {
108763
109123
  return polarToCartesian(center, point.radius, point.angle);
@@ -109066,6 +109426,20 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
109066
109426
  this._position = (_g = this._spec.position) !== null && _g !== void 0 ? _g : 'middle';
109067
109427
  this._visible = (_h = this._spec.visible) !== null && _h !== void 0 ? _h : true;
109068
109428
  }
109429
+ _compareSpec(spec, prevSpec) {
109430
+ const result = super._compareSpec(spec, prevSpec);
109431
+ const specChanged = !isEqual(prevSpec, spec);
109432
+ if ((prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec.type) !== (spec === null || spec === void 0 ? void 0 : spec.type)) {
109433
+ result.reMake = true;
109434
+ return result;
109435
+ }
109436
+ if (specChanged && !result.reMake && !result.reCompile) {
109437
+ result.change = true;
109438
+ result.reRender = true;
109439
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, layout: true, render: true });
109440
+ }
109441
+ return result;
109442
+ }
109069
109443
  afterSetLayoutStartPoint(pos) {
109070
109444
  super.afterSetLayoutStartPoint(pos);
109071
109445
  if (isValidNumber$1(pos.x)) {
@@ -109205,7 +109579,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
109205
109579
  const result = super._compareSpec(spec, prevSpec);
109206
109580
  result.reRender = true;
109207
109581
  if (!isEqual(prevSpec, spec)) {
109208
- result.reMake = true;
109582
+ result.change = true;
109583
+ if (!result.reMake && !result.reCompile) {
109584
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, layout: true, render: true });
109585
+ }
109586
+ else {
109587
+ result.reMake = true;
109588
+ }
109209
109589
  }
109210
109590
  return result;
109211
109591
  }
@@ -109954,7 +110334,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
109954
110334
  return markPoint;
109955
110335
  }
109956
110336
  _markerLayout() {
109957
- var _a, _b, _c, _d, _e;
110337
+ var _a, _b, _c, _d, _e, _f;
109958
110338
  const spec = this._spec;
109959
110339
  const data = this._markerData;
109960
110340
  const relativeSeries = this._relativeSeries;
@@ -109978,12 +110358,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
109978
110358
  if (this._markerComponent) {
109979
110359
  const attribute = (_b = this._markerComponent.attribute) !== null && _b !== void 0 ? _b : {};
109980
110360
  const textStyle = (_d = (_c = attribute.itemContent) === null || _c === void 0 ? void 0 : _c.textStyle) !== null && _d !== void 0 ? _d : {};
110361
+ const specText = (_e = this._spec.itemContent.text) === null || _e === void 0 ? void 0 : _e.text;
109981
110362
  this._markerComponent.setAttributes({
109982
110363
  position: point === undefined ? { x: null, y: null } : point,
109983
- 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)
110364
+ 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)
109984
110365
  ?
109985
110366
  this._spec.itemContent.text.formatMethod(dataPoints, seriesData)
109986
- : textStyle.text }), offsetX: computeOffsetFromRegion(point, attribute.itemContent.offsetX, this._relativeSeries.getRegion()), offsetY: computeOffsetFromRegion(point, attribute.itemContent.offsetY, this._relativeSeries.getRegion()) }),
110367
+ : isValid$1(specText)
110368
+ ? specText
110369
+ : textStyle.text }), offsetX: computeOffsetFromRegion(point, attribute.itemContent.offsetX, this._relativeSeries.getRegion()), offsetY: computeOffsetFromRegion(point, attribute.itemContent.offsetY, this._relativeSeries.getRegion()) }),
109987
110370
  limitRect,
109988
110371
  dx: this._layoutOffsetX,
109989
110372
  dy: this._layoutOffsetY
@@ -110052,10 +110435,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
110052
110435
  const autoRange = (_a = spec === null || spec === void 0 ? void 0 : spec.autoRange) !== null && _a !== void 0 ? _a : false;
110053
110436
  let point;
110054
110437
  if (isXYLayout) {
110055
- 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];
110438
+ 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];
110056
110439
  }
110057
110440
  else if (isCoordinateLayout) {
110058
- point = cartesianCoordinateLayout(data, relativeSeries, autoRange, spec.coordinatesOffset)[0];
110441
+ point = cartesianCoordinateLayout(data, relativeSeries, autoRange, spec.coordinatesOffset, this._getAutoRangeExtendDomainKeyPrefix())[0];
110059
110442
  }
110060
110443
  else if (isPositionLayout) {
110061
110444
  point = positionLayout(spec.position, relativeSeries, spec.regionRelative)[0];
@@ -110103,7 +110486,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
110103
110486
  const data = this._markerData;
110104
110487
  const relativeSeries = this._relativeSeries;
110105
110488
  const autoRange = (_b = (_a = this._spec) === null || _a === void 0 ? void 0 : _a.autoRange) !== null && _b !== void 0 ? _b : false;
110106
- const polarPoint = polarLayout(data, relativeSeries, relativeSeries, relativeSeries, autoRange)[0][0];
110489
+ const polarPoint = polarLayout(data, relativeSeries, relativeSeries, relativeSeries, autoRange, this._getAutoRangeExtendDomainKeyPrefix())[0][0];
110107
110490
  const center = {
110108
110491
  x: this._relativeSeries.getRegion().getLayoutStartPoint().x +
110109
110492
  this._relativeSeries.angleAxisHelper.center().x,
@@ -110180,6 +110563,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
110180
110563
 
110181
110564
  const IN_BRUSH_STATE = 'inBrush';
110182
110565
  const OUT_BRUSH_STATE = 'outOfBrush';
110566
+ const BRUSH_COMPONENT_ONLY_CHANGE_KEYS = {
110567
+ style: true,
110568
+ inBrush: true,
110569
+ outOfBrush: true
110570
+ };
110183
110571
  class Brush extends BaseComponent {
110184
110572
  constructor() {
110185
110573
  super(...arguments);
@@ -110305,11 +110693,23 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
110305
110693
  }
110306
110694
  const result = super._compareSpec(spec, prevSpec);
110307
110695
  if (!isEqual(prevSpec, spec)) {
110696
+ result.change = true;
110308
110697
  result.reRender = true;
110309
- result.reMake = true;
110698
+ if (!result.reMake && !result.reCompile && this._isComponentOnlySpecChange(spec, prevSpec)) {
110699
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, layout: true, render: true });
110700
+ }
110701
+ else {
110702
+ result.reMake = true;
110703
+ }
110310
110704
  }
110311
110705
  return result;
110312
110706
  }
110707
+ _isComponentOnlySpecChange(spec, prevSpec) {
110708
+ const keys = Object.keys(Object.assign(Object.assign({}, prevSpec), spec));
110709
+ return keys.every(key => {
110710
+ 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];
110711
+ });
110712
+ }
110313
110713
  onLayoutEnd() {
110314
110714
  var _a;
110315
110715
  super.onLayoutEnd();
@@ -110332,9 +110732,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
110332
110732
  }
110333
110733
  }
110334
110734
  _updateBrushComponent(region, componentIndex) {
110735
+ var _a;
110335
110736
  const interactiveAttr = this._getBrushInteractiveAttr(region);
110336
110737
  const brushComponent = this._brushComponents[componentIndex];
110337
- brushComponent.setAttributes(interactiveAttr);
110738
+ brushComponent.setAttributes(Object.assign({ brushStyle: transformToGraphic((_a = this._spec) === null || _a === void 0 ? void 0 : _a.style) }, interactiveAttr));
110338
110739
  this._initMarkBrushState(componentIndex, '');
110339
110740
  brushComponent.children[0].removeAllChild();
110340
110741
  }
@@ -110773,6 +111174,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
110773
111174
  Factory.registerComponent(Brush.type, Brush);
110774
111175
  };
110775
111176
 
111177
+ const CUSTOM_MARK_COMPONENT_ONLY_CHANGE_KEYS = {
111178
+ style: true,
111179
+ state: true
111180
+ };
110776
111181
  class CustomMark extends BaseComponent {
110777
111182
  constructor() {
110778
111183
  super(...arguments);
@@ -110863,12 +111268,43 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
110863
111268
  _compareSpec(spec, prevSpec) {
110864
111269
  const result = super._compareSpec(spec, prevSpec);
110865
111270
  if (!isEqual(prevSpec, spec)) {
110866
- result.reMake = true;
111271
+ if (!result.reMake && !result.reCompile && this._isComponentOnlySpecChange(spec, prevSpec)) {
111272
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, render: true });
111273
+ }
111274
+ else {
111275
+ result.reMake = true;
111276
+ }
110867
111277
  }
110868
111278
  result.change = true;
110869
111279
  result.reRender = true;
110870
111280
  return result;
110871
111281
  }
111282
+ _isComponentOnlySpecChange(spec, prevSpec) {
111283
+ const keys = Object.keys(Object.assign(Object.assign({}, prevSpec), spec));
111284
+ return keys.every(key => {
111285
+ 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];
111286
+ });
111287
+ }
111288
+ reInit(spec) {
111289
+ super.reInit(spec);
111290
+ this._updateMarkStyleWithSpec(this._spec, this.getMarks()[0]);
111291
+ this.getMarks().forEach(mark => {
111292
+ mark.commit(false, true);
111293
+ });
111294
+ }
111295
+ _updateMarkStyleWithSpec(spec, mark) {
111296
+ var _a, _b, _c, _d;
111297
+ if (!spec || !mark) {
111298
+ return;
111299
+ }
111300
+ this.initMarkStyleWithSpec(mark, spec);
111301
+ if (spec.type === 'group') {
111302
+ const children = (_c = (_b = (_a = mark).getMarks) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : [];
111303
+ (_d = spec.children) === null || _d === void 0 ? void 0 : _d.forEach((childSpec, index) => {
111304
+ this._updateMarkStyleWithSpec(childSpec, children[index]);
111305
+ });
111306
+ }
111307
+ }
110872
111308
  _getMarkAttributeContext() {
110873
111309
  return {
110874
111310
  vchart: this._option.globalInstance,