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

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 (122) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.es.js +413 -74
  3. package/build/index.js +413 -74
  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 +1 -0
  9. package/cjs/chart/base/base-chart.js +8 -4
  10. package/cjs/chart/base/base-chart.js.map +1 -1
  11. package/cjs/component/axis/mixin/linear-axis-mixin.js +7 -10
  12. package/cjs/component/axis/mixin/linear-axis-mixin.js.map +1 -1
  13. package/cjs/component/brush/brush.d.ts +1 -0
  14. package/cjs/component/brush/brush.js +19 -5
  15. package/cjs/component/brush/brush.js.map +1 -1
  16. package/cjs/component/crosshair/base.d.ts +3 -0
  17. package/cjs/component/crosshair/base.js +30 -2
  18. package/cjs/component/crosshair/base.js.map +1 -1
  19. package/cjs/component/custom-mark/custom-mark.d.ts +3 -0
  20. package/cjs/component/custom-mark/custom-mark.js +27 -3
  21. package/cjs/component/custom-mark/custom-mark.js.map +1 -1
  22. package/cjs/component/data-zoom/data-filter-base-component.d.ts +2 -0
  23. package/cjs/component/data-zoom/data-filter-base-component.js +15 -2
  24. package/cjs/component/data-zoom/data-filter-base-component.js.map +1 -1
  25. package/cjs/component/data-zoom/data-zoom/data-zoom.d.ts +1 -0
  26. package/cjs/component/data-zoom/data-zoom/data-zoom.js +19 -1
  27. package/cjs/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
  28. package/cjs/component/data-zoom/scroll-bar/scroll-bar.d.ts +1 -0
  29. package/cjs/component/data-zoom/scroll-bar/scroll-bar.js +12 -1
  30. package/cjs/component/data-zoom/scroll-bar/scroll-bar.js.map +1 -1
  31. package/cjs/component/indicator/indicator.d.ts +1 -0
  32. package/cjs/component/indicator/indicator.js +9 -0
  33. package/cjs/component/indicator/indicator.js.map +1 -1
  34. package/cjs/component/label/base-label.js +6 -2
  35. package/cjs/component/label/base-label.js.map +1 -1
  36. package/cjs/component/marker/base-marker.d.ts +7 -0
  37. package/cjs/component/marker/base-marker.js +77 -8
  38. package/cjs/component/marker/base-marker.js.map +1 -1
  39. package/cjs/component/marker/mark-area/cartesian-mark-area.js +3 -3
  40. package/cjs/component/marker/mark-area/cartesian-mark-area.js.map +1 -1
  41. package/cjs/component/marker/mark-area/polar-mark-area.js +2 -2
  42. package/cjs/component/marker/mark-area/polar-mark-area.js.map +1 -1
  43. package/cjs/component/marker/mark-line/cartesian-mark-line.js +2 -2
  44. package/cjs/component/marker/mark-line/cartesian-mark-line.js.map +1 -1
  45. package/cjs/component/marker/mark-line/polar-mark-line.js +2 -2
  46. package/cjs/component/marker/mark-line/polar-mark-line.js.map +1 -1
  47. package/cjs/component/marker/mark-point/base-mark-point.js +4 -3
  48. package/cjs/component/marker/mark-point/base-mark-point.js.map +1 -1
  49. package/cjs/component/marker/mark-point/cartesian-mark-point.js +2 -2
  50. package/cjs/component/marker/mark-point/cartesian-mark-point.js.map +1 -1
  51. package/cjs/component/marker/mark-point/polar-mark-point.js +1 -1
  52. package/cjs/component/marker/mark-point/polar-mark-point.js.map +1 -1
  53. package/cjs/component/marker/utils.d.ts +4 -4
  54. package/cjs/component/marker/utils.js +27 -23
  55. package/cjs/component/marker/utils.js.map +1 -1
  56. package/cjs/component/player/player.d.ts +1 -0
  57. package/cjs/component/player/player.js +10 -0
  58. package/cjs/component/player/player.js.map +1 -1
  59. package/cjs/component/tooltip/tooltip.d.ts +1 -0
  60. package/cjs/component/tooltip/tooltip.js +8 -0
  61. package/cjs/component/tooltip/tooltip.js.map +1 -1
  62. package/cjs/series/base/base-series.js +13 -5
  63. package/cjs/series/base/base-series.js.map +1 -1
  64. package/esm/chart/base/base-chart-transformer.js +2 -2
  65. package/esm/chart/base/base-chart-transformer.js.map +1 -1
  66. package/esm/chart/base/base-chart.d.ts +1 -0
  67. package/esm/chart/base/base-chart.js +7 -3
  68. package/esm/chart/base/base-chart.js.map +1 -1
  69. package/esm/component/axis/mixin/linear-axis-mixin.js +7 -10
  70. package/esm/component/axis/mixin/linear-axis-mixin.js.map +1 -1
  71. package/esm/component/brush/brush.d.ts +1 -0
  72. package/esm/component/brush/brush.js +17 -4
  73. package/esm/component/brush/brush.js.map +1 -1
  74. package/esm/component/crosshair/base.d.ts +3 -0
  75. package/esm/component/crosshair/base.js +26 -2
  76. package/esm/component/crosshair/base.js.map +1 -1
  77. package/esm/component/custom-mark/custom-mark.d.ts +3 -0
  78. package/esm/component/custom-mark/custom-mark.js +27 -2
  79. package/esm/component/custom-mark/custom-mark.js.map +1 -1
  80. package/esm/component/data-zoom/data-filter-base-component.d.ts +2 -0
  81. package/esm/component/data-zoom/data-filter-base-component.js +14 -2
  82. package/esm/component/data-zoom/data-filter-base-component.js.map +1 -1
  83. package/esm/component/data-zoom/data-zoom/data-zoom.d.ts +1 -0
  84. package/esm/component/data-zoom/data-zoom/data-zoom.js +20 -0
  85. package/esm/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
  86. package/esm/component/data-zoom/scroll-bar/scroll-bar.d.ts +1 -0
  87. package/esm/component/data-zoom/scroll-bar/scroll-bar.js +12 -1
  88. package/esm/component/data-zoom/scroll-bar/scroll-bar.js.map +1 -1
  89. package/esm/component/indicator/indicator.d.ts +1 -0
  90. package/esm/component/indicator/indicator.js +9 -0
  91. package/esm/component/indicator/indicator.js.map +1 -1
  92. package/esm/component/label/base-label.js +5 -1
  93. package/esm/component/label/base-label.js.map +1 -1
  94. package/esm/component/marker/base-marker.d.ts +7 -0
  95. package/esm/component/marker/base-marker.js +76 -7
  96. package/esm/component/marker/base-marker.js.map +1 -1
  97. package/esm/component/marker/mark-area/cartesian-mark-area.js +3 -3
  98. package/esm/component/marker/mark-area/cartesian-mark-area.js.map +1 -1
  99. package/esm/component/marker/mark-area/polar-mark-area.js +2 -2
  100. package/esm/component/marker/mark-area/polar-mark-area.js.map +1 -1
  101. package/esm/component/marker/mark-line/cartesian-mark-line.js +2 -2
  102. package/esm/component/marker/mark-line/cartesian-mark-line.js.map +1 -1
  103. package/esm/component/marker/mark-line/polar-mark-line.js +2 -2
  104. package/esm/component/marker/mark-line/polar-mark-line.js.map +1 -1
  105. package/esm/component/marker/mark-point/base-mark-point.js +3 -3
  106. package/esm/component/marker/mark-point/base-mark-point.js.map +1 -1
  107. package/esm/component/marker/mark-point/cartesian-mark-point.js +1 -1
  108. package/esm/component/marker/mark-point/cartesian-mark-point.js.map +1 -1
  109. package/esm/component/marker/mark-point/polar-mark-point.js +1 -1
  110. package/esm/component/marker/mark-point/polar-mark-point.js.map +1 -1
  111. package/esm/component/marker/utils.d.ts +4 -4
  112. package/esm/component/marker/utils.js +27 -23
  113. package/esm/component/marker/utils.js.map +1 -1
  114. package/esm/component/player/player.d.ts +1 -0
  115. package/esm/component/player/player.js +10 -0
  116. package/esm/component/player/player.js.map +1 -1
  117. package/esm/component/tooltip/tooltip.d.ts +1 -0
  118. package/esm/component/tooltip/tooltip.js +9 -1
  119. package/esm/component/tooltip/tooltip.js.map +1 -1
  120. package/esm/series/base/base-series.js +13 -5
  121. package/esm/series/base/base-series.js.map +1 -1
  122. package/package.json +5 -5
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) => {
@@ -74005,21 +74015,18 @@
74005
74015
  }
74006
74016
  setExtendDomain(key, value) {
74007
74017
  if (value === undefined) {
74018
+ if (!Object.prototype.hasOwnProperty.call(this._extend, key)) {
74019
+ return;
74020
+ }
74008
74021
  delete this._extend[key];
74009
- return;
74010
74022
  }
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();
74023
+ else {
74024
+ if (this._extend[key] === value) {
74025
+ return;
74026
+ }
74027
+ this._extend[key] = value;
74021
74028
  }
74022
- this.event.emit(exports.ChartEvent.scaleUpdate, { model: this, value: 'domain' });
74029
+ this.updateScaleDomain();
74023
74030
  }
74024
74031
  extendDomain(domain) {
74025
74032
  let temp;
@@ -76595,7 +76602,7 @@
76595
76602
  }
76596
76603
  if (onlyComponentSpecsChanged &&
76597
76604
  !componentUpdateResult.hasNonComponentOnlyUpdate &&
76598
- isUpdateSpecResultComponentOnly(result)) {
76605
+ (isUpdateSpecResultComponentOnly(result) || this._isComponentScaleDomainOnlyUpdate(result))) {
76599
76606
  componentUpdateResult.componentOnlyUpdatedComponents.forEach(component => {
76600
76607
  component.reInit(component.getSpec());
76601
76608
  });
@@ -76673,7 +76680,8 @@
76673
76680
  const componentSpec = (_b = cmpSpec[c.getSpecIndex()]) !== null && _b !== void 0 ? _b : {};
76674
76681
  const previousComponentSpec = c.getSpec();
76675
76682
  const componentResult = c.updateSpec(componentSpec, cmpSpec);
76676
- if (isUpdateSpecResultComponentOnly(componentResult)) {
76683
+ if (isUpdateSpecResultComponentOnly(componentResult) ||
76684
+ this._isComponentScaleDomainOnlyUpdate(componentResult)) {
76677
76685
  componentOnlyUpdatedComponents.push(c);
76678
76686
  }
76679
76687
  else if (!isEqual(previousComponentSpec, componentSpec)) {
@@ -76684,7 +76692,8 @@
76684
76692
  else {
76685
76693
  const previousComponentSpec = c.getSpec();
76686
76694
  const componentResult = c.updateSpec(cmpSpec);
76687
- if (isUpdateSpecResultComponentOnly(componentResult)) {
76695
+ if (isUpdateSpecResultComponentOnly(componentResult) ||
76696
+ this._isComponentScaleDomainOnlyUpdate(componentResult)) {
76688
76697
  componentOnlyUpdatedComponents.push(c);
76689
76698
  }
76690
76699
  else if (!isEqual(previousComponentSpec, cmpSpec)) {
@@ -76784,6 +76793,23 @@
76784
76793
  const effects = result.effects;
76785
76794
  return !!(effects === null || effects === void 0 ? void 0 : effects.series) && !effects.remake && !effects.data && !effects.scaleDomain && !result.reMake;
76786
76795
  }
76796
+ _isComponentScaleDomainOnlyUpdate(result) {
76797
+ const effects = result.effects;
76798
+ return (!!(effects === null || effects === void 0 ? void 0 : effects.component) &&
76799
+ !!effects.scaleDomain &&
76800
+ !result.reMake &&
76801
+ !result.reCompile &&
76802
+ !result.reSize &&
76803
+ !effects.remake &&
76804
+ !effects.compile &&
76805
+ !effects.data &&
76806
+ !effects.series &&
76807
+ !effects.animation &&
76808
+ !result.reTransformSpec &&
76809
+ !result.reAnimate &&
76810
+ !result.changeTheme &&
76811
+ !result.changeBackground);
76812
+ }
76787
76813
  _removeMarkerComponentsForEmptySpecs(result) {
76788
76814
  const removedComponents = this._components.filter(component => {
76789
76815
  var _a;
@@ -77326,6 +77352,7 @@
77326
77352
  };
77327
77353
  const seriesType = this.seriesType;
77328
77354
  if (seriesType) {
77355
+ this._addSeriesRelatedSpecKeys([seriesType]);
77329
77356
  series.type = seriesType;
77330
77357
  series[seriesType] = chartSpec[seriesType];
77331
77358
  }
@@ -103269,6 +103296,16 @@
103269
103296
  this._regions = this._option.getAllRegions();
103270
103297
  this._initEvent();
103271
103298
  }
103299
+ _compareSpec(spec, prevSpec) {
103300
+ const result = super._compareSpec(spec, prevSpec);
103301
+ const specChanged = !isEqual(prevSpec, spec);
103302
+ if (specChanged && !result.reMake && !result.reCompile) {
103303
+ result.change = true;
103304
+ result.reRender = true;
103305
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, render: true });
103306
+ }
103307
+ return result;
103308
+ }
103272
103309
  release() {
103273
103310
  var _a, _b;
103274
103311
  super.release();
@@ -103579,6 +103616,21 @@
103579
103616
  category: ['angle'],
103580
103617
  value: ['radius']
103581
103618
  };
103619
+ const CROSSHAIR_COMPONENT_ONLY_TOP_LEVEL_CHANGE_KEYS = {
103620
+ labelZIndex: true,
103621
+ gridZIndex: true
103622
+ };
103623
+ const CROSSHAIR_FIELD_KEYS = {
103624
+ xField: true,
103625
+ yField: true,
103626
+ categoryField: true,
103627
+ valueField: true
103628
+ };
103629
+ const CROSSHAIR_LINE_COMPONENT_ONLY_CHANGE_KEYS = {
103630
+ visible: true,
103631
+ width: true,
103632
+ style: true
103633
+ };
103582
103634
  class BaseCrossHair extends BaseComponent {
103583
103635
  get enableRemain() {
103584
103636
  return this.triggerOff === 'none';
@@ -103773,12 +103825,43 @@
103773
103825
  }
103774
103826
  _compareSpec(spec, prevSpec) {
103775
103827
  const result = super._compareSpec(spec, prevSpec);
103776
- if (!result.reMake && !isEqual(prevSpec, spec)) {
103828
+ const specChanged = !isEqual(prevSpec, spec);
103829
+ if (specChanged) {
103830
+ result.change = true;
103777
103831
  result.reRender = true;
103778
- result.reMake = true;
103832
+ if (!result.reMake) {
103833
+ if (this._isComponentOnlySpecChange(spec, prevSpec)) {
103834
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, layout: true, render: true });
103835
+ }
103836
+ else {
103837
+ result.reMake = true;
103838
+ }
103839
+ }
103779
103840
  }
103780
103841
  return result;
103781
103842
  }
103843
+ _isComponentOnlySpecChange(spec, prevSpec) {
103844
+ const keys = Object.keys(Object.assign(Object.assign({}, prevSpec), spec));
103845
+ return keys.every(key => {
103846
+ return (isEqual(prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec[key], spec === null || spec === void 0 ? void 0 : spec[key]) ||
103847
+ CROSSHAIR_COMPONENT_ONLY_TOP_LEVEL_CHANGE_KEYS[key] ||
103848
+ (CROSSHAIR_FIELD_KEYS[key] && this._isFieldComponentOnlySpecChange(prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec[key], spec === null || spec === void 0 ? void 0 : spec[key])));
103849
+ });
103850
+ }
103851
+ _isFieldComponentOnlySpecChange(prevSpec, spec) {
103852
+ const keys = Object.keys(Object.assign(Object.assign({}, prevSpec), spec));
103853
+ return keys.every(key => {
103854
+ return (isEqual(prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec[key], spec === null || spec === void 0 ? void 0 : spec[key]) ||
103855
+ key === 'label' ||
103856
+ (key === 'line' && this._isLineComponentOnlySpecChange(prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec.line, spec === null || spec === void 0 ? void 0 : spec.line)));
103857
+ });
103858
+ }
103859
+ _isLineComponentOnlySpecChange(prevSpec, spec) {
103860
+ const keys = Object.keys(Object.assign(Object.assign({}, prevSpec), spec));
103861
+ return keys.every(key => {
103862
+ 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];
103863
+ });
103864
+ }
103782
103865
  _initEvent() {
103783
103866
  if (this._option.disableTriggerEvent) {
103784
103867
  return;
@@ -105202,11 +105285,30 @@
105202
105285
  _compareSpec(spec, prevSpec) {
105203
105286
  const result = super._compareSpec(spec, prevSpec);
105204
105287
  if (!result.reMake && !isEqual(prevSpec, spec)) {
105288
+ result.change = true;
105205
105289
  result.reRender = true;
105206
- result.reMake = true;
105290
+ if (!result.reCompile && this._isComponentOnlySpecChange(spec, prevSpec)) {
105291
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, layout: true, render: true });
105292
+ }
105293
+ else {
105294
+ result.reMake = true;
105295
+ }
105207
105296
  }
105208
105297
  return result;
105209
105298
  }
105299
+ _getComponentOnlySpecKeys() {
105300
+ return null;
105301
+ }
105302
+ _isComponentOnlySpecChange(spec, prevSpec) {
105303
+ const componentOnlySpecKeys = this._getComponentOnlySpecKeys();
105304
+ if (!componentOnlySpecKeys) {
105305
+ return false;
105306
+ }
105307
+ const keys = Object.keys(Object.assign(Object.assign({}, prevSpec), spec));
105308
+ return keys.every(key => {
105309
+ return isEqual(prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec[key], spec === null || spec === void 0 ? void 0 : spec[key]) || componentOnlySpecKeys[key];
105310
+ });
105311
+ }
105210
105312
  reInit(spec) {
105211
105313
  super.reInit(spec);
105212
105314
  this._marks.forEach(g => {
@@ -105832,6 +105934,22 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
105832
105934
  backgroundChart: getBackgroundChartTheme(true)
105833
105935
  };
105834
105936
 
105937
+ const DATA_ZOOM_COMPONENT_ONLY_CHANGE_KEYS = {
105938
+ width: true,
105939
+ height: true,
105940
+ showDetail: true,
105941
+ middleHandler: true,
105942
+ background: true,
105943
+ startHandler: true,
105944
+ endHandler: true,
105945
+ startText: true,
105946
+ endText: true,
105947
+ dragMask: true,
105948
+ selectedBackground: true,
105949
+ backgroundChart: true,
105950
+ selectedBackgroundChart: true,
105951
+ showBackgroundChart: true
105952
+ };
105835
105953
  class DataZoom extends DataFilterBaseComponent {
105836
105954
  constructor(spec, options) {
105837
105955
  var _a;
@@ -105942,6 +106060,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
105942
106060
  this.effect.onZoomChange();
105943
106061
  }
105944
106062
  }
106063
+ _getComponentOnlySpecKeys() {
106064
+ return DATA_ZOOM_COMPONENT_ONLY_CHANGE_KEYS;
106065
+ }
105945
106066
  clear() {
105946
106067
  if (this._component) {
105947
106068
  const container = this.getContainer();
@@ -106297,6 +106418,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106297
106418
 
106298
106419
  const SCROLLBAR_EVENT = 'scrollDrag';
106299
106420
  const SCROLLBAR_END_EVENT = 'scrollUp';
106421
+ const SCROLL_BAR_COMPONENT_ONLY_CHANGE_KEYS = {
106422
+ width: true,
106423
+ height: true,
106424
+ rail: true,
106425
+ slider: true,
106426
+ round: true,
106427
+ innerPadding: true,
106428
+ minSliderSize: true
106429
+ };
106300
106430
  class ScrollBar extends DataFilterBaseComponent {
106301
106431
  constructor(spec, options) {
106302
106432
  var _a;
@@ -106346,6 +106476,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106346
106476
  data.reRunAllTransform();
106347
106477
  }
106348
106478
  }
106479
+ _getComponentOnlySpecKeys() {
106480
+ return SCROLL_BAR_COMPONENT_ONLY_CHANGE_KEYS;
106481
+ }
106349
106482
  _beforeLayoutEnd() {
106350
106483
  var _a, _b;
106351
106484
  super._beforeLayoutEnd();
@@ -106519,6 +106652,16 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106519
106652
  this._content = array(this._spec.content);
106520
106653
  this._regions = this._option.getRegionsInUserIdOrIndex(array(this._spec.regionId), array(this._spec.regionIndex));
106521
106654
  }
106655
+ _compareSpec(spec, prevSpec) {
106656
+ const result = super._compareSpec(spec, prevSpec);
106657
+ const specChanged = !isEqual(prevSpec, spec);
106658
+ if (specChanged && !result.reMake && !result.reCompile) {
106659
+ result.change = true;
106660
+ result.reRender = true;
106661
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, layout: true, render: true });
106662
+ }
106663
+ return result;
106664
+ }
106522
106665
  initEvent() {
106523
106666
  if (this._option.disableTriggerEvent) {
106524
106667
  return;
@@ -106690,12 +106833,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106690
106833
  }
106691
106834
  return false;
106692
106835
  }
106693
- function getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint) {
106836
+ function getAutoRangeExtendDomainKey(keyPrefix, axisKey) {
106837
+ return keyPrefix ? `${keyPrefix}_${axisKey}_extend` : `marker_${axisKey}_extend`;
106838
+ }
106839
+ function getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint, autoRangeExtendDomainKeyPrefix) {
106694
106840
  var _a, _b;
106695
106841
  const { relativeSeries } = refSeries;
106696
106842
  isNumber$2(datum.x) &&
106697
106843
  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));
106844
+ ((_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
106845
  let x;
106700
106846
  if (isPercent(datum.x)) {
106701
106847
  x = convertPercentToValue(datum.x, regionWidth) + regionStartLayoutStartPoint.x;
@@ -106707,12 +106853,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106707
106853
  }
106708
106854
  return x;
106709
106855
  }
106710
- function getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint) {
106856
+ function getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint, autoRangeExtendDomainKeyPrefix) {
106711
106857
  var _a, _b;
106712
106858
  const { relativeSeries } = refSeries;
106713
106859
  isNumber$2(datum.y) &&
106714
106860
  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));
106861
+ ((_b = (_a = relativeSeries
106862
+ .getYAxisHelper()) === null || _a === void 0 ? void 0 : _a.setExtendDomain) === null || _b === void 0 ? void 0 : _b.call(_a, getAutoRangeExtendDomainKey(autoRangeExtendDomainKeyPrefix, 'yAxis'), datum.y));
106716
106863
  let y;
106717
106864
  if (isPercent(datum.y)) {
106718
106865
  y = convertPercentToValue(datum.y, regionHeight) + regionStartLayoutStartPoint.y;
@@ -106724,20 +106871,20 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106724
106871
  }
106725
106872
  return y;
106726
106873
  }
106727
- function getAngleValue(datum, angleDomain, autoRange, refSeries) {
106874
+ function getAngleValue(datum, angleDomain, autoRange, refSeries, autoRangeExtendDomainKeyPrefix) {
106728
106875
  var _a, _b;
106729
106876
  const { relativeSeries } = refSeries;
106730
106877
  isNumber$2(datum.angle) &&
106731
106878
  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));
106879
+ ((_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
106880
  return convertDatumToValue(relativeSeries.angleAxisHelper, [datum.angle]);
106734
106881
  }
106735
- function getRadiusValue(datum, radiusDomain, autoRange, refSeries) {
106882
+ function getRadiusValue(datum, radiusDomain, autoRange, refSeries, autoRangeExtendDomainKeyPrefix) {
106736
106883
  var _a, _b;
106737
106884
  const { relativeSeries } = refSeries;
106738
106885
  isNumber$2(datum.radius) &&
106739
106886
  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));
106887
+ ((_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
106888
  return convertDatumToValue(relativeSeries.radiusAxisHelper, [datum.radius]);
106742
106889
  }
106743
106890
  function convertPercentToValue(percent, relativeLength) {
@@ -106753,7 +106900,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106753
106900
  function isAggrSpec(spec) {
106754
106901
  return AGGR_TYPE.includes(spec);
106755
106902
  }
106756
- function xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand = false) {
106903
+ function xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand = false, autoRangeExtendDomainKeyPrefix) {
106757
106904
  const regionStart = startRelativeSeries.getRegion();
106758
106905
  const regionStartLayoutStartPoint = regionStart.getLayoutStartPoint();
106759
106906
  const regionEnd = endRelativeSeries.getRegion();
@@ -106783,14 +106930,14 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106783
106930
  let x;
106784
106931
  let y;
106785
106932
  if (isValidX && isValidY) {
106786
- x = getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint);
106787
- y = getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint);
106933
+ x = getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint, autoRangeExtendDomainKeyPrefix);
106934
+ y = getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint, autoRangeExtendDomainKeyPrefix);
106788
106935
  setTempWithValid(x, isXExpand, xTemp, lines.length);
106789
106936
  setTempWithValid(y, isyExpand, yTemp, lines.length);
106790
106937
  lines.push([{ x, y }]);
106791
106938
  }
106792
106939
  else if (isValidX) {
106793
- x = getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint);
106940
+ x = getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint, autoRangeExtendDomainKeyPrefix);
106794
106941
  y = Math.max(regionStartLayoutStartPoint.y + regionStart.getLayoutRect().height, regionEndLayoutStartPoint.y + regionEnd.getLayoutRect().height);
106795
106942
  const y1 = Math.min(regionStartLayoutStartPoint.y, regionEndLayoutStartPoint.y);
106796
106943
  setTempWithValid(x, isXExpand, xTemp, lines.length);
@@ -106807,7 +106954,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106807
106954
  }
106808
106955
  else if (isValidY) {
106809
106956
  x = Math.min(regionStartLayoutStartPoint.x, regionEndLayoutStartPoint.x);
106810
- y = getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint);
106957
+ y = getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint, autoRangeExtendDomainKeyPrefix);
106811
106958
  const x1 = Math.max(regionStartLayoutStartPoint.x + regionStart.getLayoutRect().width, regionEndLayoutStartPoint.x + regionEnd.getLayoutRect().width);
106812
106959
  setTempWithValid(y, isyExpand, yTemp, lines.length);
106813
106960
  lines.push([
@@ -106862,7 +107009,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106862
107009
  }
106863
107010
  return v;
106864
107011
  }
106865
- function polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange) {
107012
+ function polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, autoRangeExtendDomainKeyPrefix) {
106866
107013
  const refSeries = {
106867
107014
  relativeSeries,
106868
107015
  startRelativeSeries,
@@ -106877,12 +107024,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106877
107024
  const isValidAngle = isValid$1(datum.angle);
106878
107025
  const isValidRadius = isValid$1(datum.radius);
106879
107026
  if (isValidAngle && isValidRadius) {
106880
- const angle = getAngleValue(datum, angleDomain, autoRange, refSeries);
106881
- const radius = getRadiusValue(datum, radiusDomain, autoRange, refSeries);
107027
+ const angle = getAngleValue(datum, angleDomain, autoRange, refSeries, autoRangeExtendDomainKeyPrefix);
107028
+ const radius = getRadiusValue(datum, radiusDomain, autoRange, refSeries, autoRangeExtendDomainKeyPrefix);
106882
107029
  lines.push([{ angle, radius }]);
106883
107030
  }
106884
107031
  else if (isValidAngle) {
106885
- const angle = getAngleValue(datum, angleDomain, autoRange, refSeries);
107032
+ const angle = getAngleValue(datum, angleDomain, autoRange, refSeries, autoRangeExtendDomainKeyPrefix);
106886
107033
  lines.push([
106887
107034
  {
106888
107035
  angle,
@@ -106895,7 +107042,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106895
107042
  ]);
106896
107043
  }
106897
107044
  else if (isValidRadius) {
106898
- const radius = getRadiusValue(datum, radiusDomain, autoRange, refSeries);
107045
+ const radius = getRadiusValue(datum, radiusDomain, autoRange, refSeries, autoRangeExtendDomainKeyPrefix);
106899
107046
  lines.push([
106900
107047
  {
106901
107048
  radius,
@@ -106928,7 +107075,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106928
107075
  });
106929
107076
  return lines;
106930
107077
  }
106931
- function cartesianCoordinateLayout(data, relativeSeries, autoRange, coordinatesOffset) {
107078
+ function cartesianCoordinateLayout(data, relativeSeries, autoRange, coordinatesOffset, autoRangeExtendDomainKeyPrefix) {
106932
107079
  const points = [];
106933
107080
  const dataPoints = data.latestData[0] && data.latestData[0].latestData ? data.latestData[0].latestData : data.latestData;
106934
107081
  const isArrayCoordinatesOffset = isArray$1(coordinatesOffset);
@@ -106958,11 +107105,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106958
107105
  xValue.length === 1 &&
106959
107106
  isNumber$2(xValue[0]) &&
106960
107107
  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]));
107108
+ ((_b = (_a = refRelativeSeries
107109
+ .getXAxisHelper()) === null || _a === void 0 ? void 0 : _a.setExtendDomain) === null || _b === void 0 ? void 0 : _b.call(_a, getAutoRangeExtendDomainKey(autoRangeExtendDomainKeyPrefix, 'xAxis'), xValue[0]));
106962
107110
  yValue.length === 1 &&
106963
107111
  isNumber$2(yValue[0]) &&
106964
107112
  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]));
107113
+ ((_d = (_c = refRelativeSeries
107114
+ .getYAxisHelper()) === null || _c === void 0 ? void 0 : _c.setExtendDomain) === null || _d === void 0 ? void 0 : _d.call(_c, getAutoRangeExtendDomainKey(autoRangeExtendDomainKeyPrefix, 'yAxis'), yValue[0]));
106966
107115
  points.push({
106967
107116
  x: convertDatumToValue(refRelativeSeries.getXAxisHelper(), xValue) + regionStartLayoutStartPoint.x + offsetX,
106968
107117
  y: convertDatumToValue(refRelativeSeries.getYAxisHelper(), yValue) + regionStartLayoutStartPoint.y + offsetY
@@ -106970,7 +107119,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106970
107119
  });
106971
107120
  return points;
106972
107121
  }
106973
- function polarCoordinateLayout(data, relativeSeries, autoRange) {
107122
+ function polarCoordinateLayout(data, relativeSeries, autoRange, autoRangeExtendDomainKeyPrefix) {
106974
107123
  const points = [];
106975
107124
  const dataPoints = data.latestData[0] && data.latestData[0].latestData ? data.latestData[0].latestData : data.latestData;
106976
107125
  dataPoints.forEach((datum) => {
@@ -106983,11 +107132,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
106983
107132
  angleValue.length === 1 &&
106984
107133
  isNumber$2(angleValue[0]) &&
106985
107134
  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]));
107135
+ ((_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
107136
  radiusValue.length === 1 &&
106988
107137
  isNumber$2(radiusValue[0]) &&
106989
107138
  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]));
107139
+ ((_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
107140
  points.push({
106992
107141
  angle: convertDatumToValue(refRelativeSeries.angleAxisHelper, angleValue),
106993
107142
  radius: convertDatumToValue(refRelativeSeries.radiusAxisHelper, radiusValue)
@@ -107516,6 +107665,65 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
107516
107665
  releaseDataViews([dataView, ...releaseDependencies]);
107517
107666
  };
107518
107667
 
107668
+ const MARKER_FORMAT_METHOD_PLACEHOLDER = '__vchart_marker_format_method__';
107669
+ const MARKER_COORDINATE_PLACEHOLDER = '__vchart_marker_coordinate__';
107670
+ const MARKER_TEXT_PLACEHOLDER = '__vchart_marker_text__';
107671
+ const MARKER_AUTO_RANGE_PLACEHOLDER = '__vchart_marker_auto_range__';
107672
+ const MARKER_DOMAIN_POSITION_SPEC_KEYS = [
107673
+ 'coordinate',
107674
+ 'coordinates',
107675
+ 'x',
107676
+ 'y',
107677
+ 'x1',
107678
+ 'y1',
107679
+ 'angle',
107680
+ 'angle1',
107681
+ 'radius',
107682
+ 'radius1'
107683
+ ];
107684
+ const MARKER_LAYOUT_POSITION_SPEC_KEYS = ['position', 'positions', 'coordinatesOffset', 'regionRelative'];
107685
+ const normalizeMarkerLabelFormatMethod = (label) => {
107686
+ if (Array.isArray(label)) {
107687
+ return label.map(normalizeMarkerLabelFormatMethod);
107688
+ }
107689
+ if (!label || typeof label !== 'object') {
107690
+ return label;
107691
+ }
107692
+ if (typeof label.formatMethod !== 'function') {
107693
+ return label;
107694
+ }
107695
+ return Object.assign(Object.assign({}, label), { formatMethod: MARKER_FORMAT_METHOD_PLACEHOLDER });
107696
+ };
107697
+ const normalizeMarkerSpecForComponentOnlyUpdate = (spec, options) => {
107698
+ var _a;
107699
+ if (!spec || typeof spec !== 'object') {
107700
+ return spec;
107701
+ }
107702
+ const normalized = Object.assign({}, spec);
107703
+ if (options.normalizeDomainPosition) {
107704
+ MARKER_DOMAIN_POSITION_SPEC_KEYS.forEach(key => {
107705
+ if (key in normalized) {
107706
+ normalized[key] = MARKER_COORDINATE_PLACEHOLDER;
107707
+ }
107708
+ });
107709
+ }
107710
+ if (options.normalizeAutoRange && 'autoRange' in normalized) {
107711
+ normalized.autoRange = MARKER_AUTO_RANGE_PLACEHOLDER;
107712
+ }
107713
+ MARKER_LAYOUT_POSITION_SPEC_KEYS.forEach(key => {
107714
+ if (key in normalized) {
107715
+ normalized[key] = MARKER_COORDINATE_PLACEHOLDER;
107716
+ }
107717
+ });
107718
+ if ('label' in normalized) {
107719
+ normalized.label = normalizeMarkerLabelFormatMethod(normalized.label);
107720
+ }
107721
+ const text = (_a = normalized.itemContent) === null || _a === void 0 ? void 0 : _a.text;
107722
+ if (text && typeof text === 'object') {
107723
+ normalized.itemContent = Object.assign(Object.assign({}, normalized.itemContent), { text: Object.assign(Object.assign({}, normalizeMarkerLabelFormatMethod(text)), { text: MARKER_TEXT_PLACEHOLDER }) });
107724
+ }
107725
+ return normalized;
107726
+ };
107519
107727
  class BaseMarker extends BaseComponent {
107520
107728
  constructor() {
107521
107729
  super(...arguments);
@@ -107564,6 +107772,27 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
107564
107772
  getEndRelativeSeries: () => this._endRelativeSeries
107565
107773
  };
107566
107774
  }
107775
+ _getAutoRangeExtendDomainKeyPrefix() {
107776
+ return `marker_${this.type}_${this.id}`;
107777
+ }
107778
+ _getAutoRangeExtendDomainKey(axisKey) {
107779
+ return `${this._getAutoRangeExtendDomainKeyPrefix()}_${axisKey}_extend`;
107780
+ }
107781
+ _clearAutoRangeExtendDomain() {
107782
+ var _a, _b;
107783
+ const seriesList = array((_b = (_a = this._option).getAllSeries) === null || _b === void 0 ? void 0 : _b.call(_a));
107784
+ seriesList.forEach((series) => {
107785
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
107786
+ (_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);
107787
+ (_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);
107788
+ (_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);
107789
+ (_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);
107790
+ });
107791
+ }
107792
+ _updateMarkerLayout() {
107793
+ this._clearAutoRangeExtendDomain();
107794
+ this._markerLayout();
107795
+ }
107567
107796
  _getFieldInfoFromSpec(dim, spec, relativeSeries) {
107568
107797
  const specKeyByDim = {
107569
107798
  x: 'xField',
@@ -107612,7 +107841,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
107612
107841
  return;
107613
107842
  }
107614
107843
  this._markerDataChangeHandler = () => {
107615
- this._markerLayout();
107844
+ this._updateMarkerLayout();
107616
107845
  };
107617
107846
  this._markerData.target.on('change', this._markerDataChangeHandler);
107618
107847
  }
@@ -107642,7 +107871,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
107642
107871
  this._delegateEvent(this._markerComponent, event, type, null, this.getMarkerData.bind(this));
107643
107872
  });
107644
107873
  }
107645
- this._markerLayout();
107874
+ this._updateMarkerLayout();
107646
107875
  }
107647
107876
  super.updateLayoutAttribute();
107648
107877
  }
@@ -107672,9 +107901,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
107672
107901
  }
107673
107902
  initEvent() {
107674
107903
  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));
107904
+ this._relativeSeries.event.on('zoom', this._updateMarkerLayout.bind(this));
107905
+ this._relativeSeries.event.on('panmove', this._updateMarkerLayout.bind(this));
107906
+ this._relativeSeries.event.on('scroll', this._updateMarkerLayout.bind(this));
107678
107907
  }
107679
107908
  }
107680
107909
  clear() {
@@ -107715,16 +107944,50 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
107715
107944
  const result = super._compareSpec(spec, prevSpec);
107716
107945
  if (!isEqual(prevSpec, spec)) {
107717
107946
  result.reRender = true;
107718
- result.reMake = true;
107719
107947
  result.change = true;
107948
+ if (!result.reMake && !result.reCompile && this._isComponentOnlySpecChange(spec, prevSpec)) {
107949
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, layout: true, render: true });
107950
+ }
107951
+ else if (!result.reMake && !result.reCompile && this._isAutoRangeSpecChange(spec, prevSpec)) {
107952
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, scaleDomain: true, layout: true, render: true });
107953
+ }
107954
+ else {
107955
+ result.reMake = true;
107956
+ }
107720
107957
  }
107721
107958
  return result;
107722
107959
  }
107960
+ _isComponentOnlySpecChange(spec, prevSpec) {
107961
+ const normalizeDomainPosition = !(spec === null || spec === void 0 ? void 0 : spec.autoRange) && !(prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec.autoRange);
107962
+ return isEqual(normalizeMarkerSpecForComponentOnlyUpdate(prevSpec, { normalizeDomainPosition }), normalizeMarkerSpecForComponentOnlyUpdate(spec, { normalizeDomainPosition }));
107963
+ }
107964
+ _isAutoRangeSpecChange(spec, prevSpec) {
107965
+ if (!(spec === null || spec === void 0 ? void 0 : spec.autoRange) && !(prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec.autoRange)) {
107966
+ return false;
107967
+ }
107968
+ return isEqual(normalizeMarkerSpecForComponentOnlyUpdate(prevSpec, {
107969
+ normalizeDomainPosition: true,
107970
+ normalizeAutoRange: true
107971
+ }), normalizeMarkerSpecForComponentOnlyUpdate(spec, {
107972
+ normalizeDomainPosition: true,
107973
+ normalizeAutoRange: true
107974
+ }));
107975
+ }
107976
+ reInit(spec) {
107977
+ super.reInit(spec);
107978
+ this._bindSeries();
107979
+ this._initDataView();
107980
+ this._buildMarkerAttributeContext();
107981
+ if (this._markerComponent) {
107982
+ this._updateMarkerLayout();
107983
+ }
107984
+ }
107723
107985
  _initCommonDataView() {
107724
107986
  const { options } = this._computeOptions();
107725
107987
  const seriesData = this._getRelativeDataView();
107726
107988
  registerDataSetInstanceTransform(this._option.dataSet, 'markerAggregation', markerAggregation);
107727
107989
  registerDataSetInstanceTransform(this._option.dataSet, 'markerFilter', markerFilter);
107990
+ this._releaseMarkerData();
107728
107991
  const data = new DataView(this._option.dataSet, { name: `${this.type}_${this.id}_data` });
107729
107992
  data.parse([seriesData], {
107730
107993
  type: 'dataview'
@@ -107994,11 +108257,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
107994
108257
  doXYProcess ||
107995
108258
  (isValidCoordinates && isValidProcessX) ||
107996
108259
  (isValidCoordinates && isValidProcessY)) {
107997
- const xyPoints = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange);
108260
+ const xyPoints = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, false, this._getAutoRangeExtendDomainKeyPrefix());
107998
108261
  points = (xyPoints.length === 1 ? xyPoints[0] : xyPoints.map(point => point[0]));
107999
108262
  }
108000
108263
  else if (doCoordinatesProcess) {
108001
- points = cartesianCoordinateLayout(data, relativeSeries, autoRange, spec.coordinatesOffset);
108264
+ points = cartesianCoordinateLayout(data, relativeSeries, autoRange, spec.coordinatesOffset, this._getAutoRangeExtendDomainKeyPrefix());
108002
108265
  }
108003
108266
  else if (isPositionLayout) {
108004
108267
  points = positionLayout(spec.positions, relativeSeries, spec.regionRelative);
@@ -108222,7 +108485,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
108222
108485
  this._relativeSeries.angleAxisHelper.center().y
108223
108486
  };
108224
108487
  if (doAngleProcess || doRadiusProcess || doAngRadRad1Process || doRadAngAng1Process || doRadAngProcess) {
108225
- const polarPoints = polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange);
108488
+ const polarPoints = polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, this._getAutoRangeExtendDomainKeyPrefix());
108226
108489
  points = (polarPoints.length === 1 ? polarPoints[0] : polarPoints.map(point => point[0]));
108227
108490
  if (points[0].radius === points[1].radius) {
108228
108491
  pointsAttr = {
@@ -108241,7 +108504,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
108241
108504
  }
108242
108505
  }
108243
108506
  else if (doCoordinatesProcess) {
108244
- points = polarCoordinateLayout(data, relativeSeries, autoRange);
108507
+ points = polarCoordinateLayout(data, relativeSeries, autoRange, this._getAutoRangeExtendDomainKeyPrefix());
108245
108508
  pointsAttr = {
108246
108509
  points: points.map(point => {
108247
108510
  return polarToCartesian(center, point.radius, point.angle);
@@ -108619,7 +108882,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
108619
108882
  let points = [];
108620
108883
  let lines = [];
108621
108884
  if (doXYProcess) {
108622
- lines = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand);
108885
+ lines = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand, this._getAutoRangeExtendDomainKeyPrefix());
108623
108886
  const [start, end] = lines;
108624
108887
  if (start && start.length && end && end.length) {
108625
108888
  points = [
@@ -108637,14 +108900,14 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
108637
108900
  }
108638
108901
  }
108639
108902
  else if (doXProcess || doYProcess) {
108640
- lines = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand);
108903
+ lines = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand, this._getAutoRangeExtendDomainKeyPrefix());
108641
108904
  const [start, end] = lines;
108642
108905
  if (start && start.length && end && end.length) {
108643
108906
  points = [...start, end[1], end[0]];
108644
108907
  }
108645
108908
  }
108646
108909
  else if (doCoordinatesProcess) {
108647
- points = cartesianCoordinateLayout(data, relativeSeries, autoRange, spec.coordinatesOffset);
108910
+ points = cartesianCoordinateLayout(data, relativeSeries, autoRange, spec.coordinatesOffset, this._getAutoRangeExtendDomainKeyPrefix());
108648
108911
  }
108649
108912
  else if (isPositionLayout) {
108650
108913
  points = positionLayout(spec.positions, relativeSeries, spec.regionRelative);
@@ -108727,7 +108990,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
108727
108990
  this._relativeSeries.angleAxisHelper.center().y
108728
108991
  };
108729
108992
  if (doAngleProcess || doRadiusProcess || doRadAngProcess) {
108730
- const polarLines = polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange);
108993
+ const polarLines = polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, this._getAutoRangeExtendDomainKeyPrefix());
108731
108994
  if (doRadAngProcess) {
108732
108995
  pointsAttr = {
108733
108996
  innerRadius: polarLines[0][0].radius,
@@ -108757,7 +109020,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
108757
109020
  }
108758
109021
  }
108759
109022
  else if (doCoordinatesProcess) {
108760
- points = polarCoordinateLayout(data, relativeSeries, autoRange);
109023
+ points = polarCoordinateLayout(data, relativeSeries, autoRange, this._getAutoRangeExtendDomainKeyPrefix());
108761
109024
  pointsAttr = {
108762
109025
  points: points.map(point => {
108763
109026
  return polarToCartesian(center, point.radius, point.angle);
@@ -109066,6 +109329,20 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
109066
109329
  this._position = (_g = this._spec.position) !== null && _g !== void 0 ? _g : 'middle';
109067
109330
  this._visible = (_h = this._spec.visible) !== null && _h !== void 0 ? _h : true;
109068
109331
  }
109332
+ _compareSpec(spec, prevSpec) {
109333
+ const result = super._compareSpec(spec, prevSpec);
109334
+ const specChanged = !isEqual(prevSpec, spec);
109335
+ if ((prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec.type) !== (spec === null || spec === void 0 ? void 0 : spec.type)) {
109336
+ result.reMake = true;
109337
+ return result;
109338
+ }
109339
+ if (specChanged && !result.reMake && !result.reCompile) {
109340
+ result.change = true;
109341
+ result.reRender = true;
109342
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, layout: true, render: true });
109343
+ }
109344
+ return result;
109345
+ }
109069
109346
  afterSetLayoutStartPoint(pos) {
109070
109347
  super.afterSetLayoutStartPoint(pos);
109071
109348
  if (isValidNumber$1(pos.x)) {
@@ -109205,7 +109482,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
109205
109482
  const result = super._compareSpec(spec, prevSpec);
109206
109483
  result.reRender = true;
109207
109484
  if (!isEqual(prevSpec, spec)) {
109208
- result.reMake = true;
109485
+ result.change = true;
109486
+ if (!result.reMake && !result.reCompile) {
109487
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, layout: true, render: true });
109488
+ }
109489
+ else {
109490
+ result.reMake = true;
109491
+ }
109209
109492
  }
109210
109493
  return result;
109211
109494
  }
@@ -109954,7 +110237,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
109954
110237
  return markPoint;
109955
110238
  }
109956
110239
  _markerLayout() {
109957
- var _a, _b, _c, _d, _e;
110240
+ var _a, _b, _c, _d, _e, _f;
109958
110241
  const spec = this._spec;
109959
110242
  const data = this._markerData;
109960
110243
  const relativeSeries = this._relativeSeries;
@@ -109978,12 +110261,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
109978
110261
  if (this._markerComponent) {
109979
110262
  const attribute = (_b = this._markerComponent.attribute) !== null && _b !== void 0 ? _b : {};
109980
110263
  const textStyle = (_d = (_c = attribute.itemContent) === null || _c === void 0 ? void 0 : _c.textStyle) !== null && _d !== void 0 ? _d : {};
110264
+ const specText = (_e = this._spec.itemContent.text) === null || _e === void 0 ? void 0 : _e.text;
109981
110265
  this._markerComponent.setAttributes({
109982
110266
  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)
110267
+ 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
110268
  ?
109985
110269
  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()) }),
110270
+ : isValid$1(specText)
110271
+ ? specText
110272
+ : textStyle.text }), offsetX: computeOffsetFromRegion(point, attribute.itemContent.offsetX, this._relativeSeries.getRegion()), offsetY: computeOffsetFromRegion(point, attribute.itemContent.offsetY, this._relativeSeries.getRegion()) }),
109987
110273
  limitRect,
109988
110274
  dx: this._layoutOffsetX,
109989
110275
  dy: this._layoutOffsetY
@@ -110052,10 +110338,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
110052
110338
  const autoRange = (_a = spec === null || spec === void 0 ? void 0 : spec.autoRange) !== null && _a !== void 0 ? _a : false;
110053
110339
  let point;
110054
110340
  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];
110341
+ 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
110342
  }
110057
110343
  else if (isCoordinateLayout) {
110058
- point = cartesianCoordinateLayout(data, relativeSeries, autoRange, spec.coordinatesOffset)[0];
110344
+ point = cartesianCoordinateLayout(data, relativeSeries, autoRange, spec.coordinatesOffset, this._getAutoRangeExtendDomainKeyPrefix())[0];
110059
110345
  }
110060
110346
  else if (isPositionLayout) {
110061
110347
  point = positionLayout(spec.position, relativeSeries, spec.regionRelative)[0];
@@ -110103,7 +110389,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
110103
110389
  const data = this._markerData;
110104
110390
  const relativeSeries = this._relativeSeries;
110105
110391
  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];
110392
+ const polarPoint = polarLayout(data, relativeSeries, relativeSeries, relativeSeries, autoRange, this._getAutoRangeExtendDomainKeyPrefix())[0][0];
110107
110393
  const center = {
110108
110394
  x: this._relativeSeries.getRegion().getLayoutStartPoint().x +
110109
110395
  this._relativeSeries.angleAxisHelper.center().x,
@@ -110180,6 +110466,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
110180
110466
 
110181
110467
  const IN_BRUSH_STATE = 'inBrush';
110182
110468
  const OUT_BRUSH_STATE = 'outOfBrush';
110469
+ const BRUSH_COMPONENT_ONLY_CHANGE_KEYS = {
110470
+ style: true,
110471
+ inBrush: true,
110472
+ outOfBrush: true
110473
+ };
110183
110474
  class Brush extends BaseComponent {
110184
110475
  constructor() {
110185
110476
  super(...arguments);
@@ -110305,11 +110596,23 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
110305
110596
  }
110306
110597
  const result = super._compareSpec(spec, prevSpec);
110307
110598
  if (!isEqual(prevSpec, spec)) {
110599
+ result.change = true;
110308
110600
  result.reRender = true;
110309
- result.reMake = true;
110601
+ if (!result.reMake && !result.reCompile && this._isComponentOnlySpecChange(spec, prevSpec)) {
110602
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, layout: true, render: true });
110603
+ }
110604
+ else {
110605
+ result.reMake = true;
110606
+ }
110310
110607
  }
110311
110608
  return result;
110312
110609
  }
110610
+ _isComponentOnlySpecChange(spec, prevSpec) {
110611
+ const keys = Object.keys(Object.assign(Object.assign({}, prevSpec), spec));
110612
+ return keys.every(key => {
110613
+ 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];
110614
+ });
110615
+ }
110313
110616
  onLayoutEnd() {
110314
110617
  var _a;
110315
110618
  super.onLayoutEnd();
@@ -110332,9 +110635,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
110332
110635
  }
110333
110636
  }
110334
110637
  _updateBrushComponent(region, componentIndex) {
110638
+ var _a;
110335
110639
  const interactiveAttr = this._getBrushInteractiveAttr(region);
110336
110640
  const brushComponent = this._brushComponents[componentIndex];
110337
- brushComponent.setAttributes(interactiveAttr);
110641
+ brushComponent.setAttributes(Object.assign({ brushStyle: transformToGraphic((_a = this._spec) === null || _a === void 0 ? void 0 : _a.style) }, interactiveAttr));
110338
110642
  this._initMarkBrushState(componentIndex, '');
110339
110643
  brushComponent.children[0].removeAllChild();
110340
110644
  }
@@ -110773,6 +111077,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
110773
111077
  Factory.registerComponent(Brush.type, Brush);
110774
111078
  };
110775
111079
 
111080
+ const CUSTOM_MARK_COMPONENT_ONLY_CHANGE_KEYS = {
111081
+ style: true,
111082
+ state: true
111083
+ };
110776
111084
  class CustomMark extends BaseComponent {
110777
111085
  constructor() {
110778
111086
  super(...arguments);
@@ -110863,12 +111171,43 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
110863
111171
  _compareSpec(spec, prevSpec) {
110864
111172
  const result = super._compareSpec(spec, prevSpec);
110865
111173
  if (!isEqual(prevSpec, spec)) {
110866
- result.reMake = true;
111174
+ if (!result.reMake && !result.reCompile && this._isComponentOnlySpecChange(spec, prevSpec)) {
111175
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, render: true });
111176
+ }
111177
+ else {
111178
+ result.reMake = true;
111179
+ }
110867
111180
  }
110868
111181
  result.change = true;
110869
111182
  result.reRender = true;
110870
111183
  return result;
110871
111184
  }
111185
+ _isComponentOnlySpecChange(spec, prevSpec) {
111186
+ const keys = Object.keys(Object.assign(Object.assign({}, prevSpec), spec));
111187
+ return keys.every(key => {
111188
+ 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];
111189
+ });
111190
+ }
111191
+ reInit(spec) {
111192
+ super.reInit(spec);
111193
+ this._updateMarkStyleWithSpec(this._spec, this.getMarks()[0]);
111194
+ this.getMarks().forEach(mark => {
111195
+ mark.commit(false, true);
111196
+ });
111197
+ }
111198
+ _updateMarkStyleWithSpec(spec, mark) {
111199
+ var _a, _b, _c, _d;
111200
+ if (!spec || !mark) {
111201
+ return;
111202
+ }
111203
+ this.initMarkStyleWithSpec(mark, spec);
111204
+ if (spec.type === 'group') {
111205
+ const children = (_c = (_b = (_a = mark).getMarks) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : [];
111206
+ (_d = spec.children) === null || _d === void 0 ? void 0 : _d.forEach((childSpec, index) => {
111207
+ this._updateMarkStyleWithSpec(childSpec, children[index]);
111208
+ });
111209
+ }
111210
+ }
110872
111211
  _getMarkAttributeContext() {
110873
111212
  return {
110874
111213
  vchart: this._option.globalInstance,