@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.es.js CHANGED
@@ -68791,6 +68791,15 @@ const defaultSeriesSpecUpdatePolicy = {
68791
68791
  compileOnlyKeys: defaultSeriesCompileOnlyCheckKeys,
68792
68792
  dataRelatedKeys: defaultSeriesDataRelatedCheckKeys
68793
68793
  };
68794
+ const defaultSeriesMarkCompileOnlySubKeys = {
68795
+ interactive: true,
68796
+ zIndex: true,
68797
+ visible: true,
68798
+ style: true,
68799
+ state: true,
68800
+ stateSort: true,
68801
+ customShape: true
68802
+ };
68794
68803
  const isSpecObject = (value) => isObject$2(value) && !isArray$1(value) && !isFunction$1(value);
68795
68804
  const hasOnlyAllowedSubKeyChanges = (specValue, prevSpecValue, allowedSubKeys) => {
68796
68805
  if (!isSpecObject(specValue) || !isSpecObject(prevSpecValue)) {
@@ -69541,12 +69550,13 @@ class BaseSeries extends BaseModel {
69541
69550
  if (result.reMake) {
69542
69551
  return result;
69543
69552
  }
69544
- if (!result.reCompile &&
69545
- this._marks.getMarks().some(m => {
69546
- var _a, _b;
69547
- ignores[m.name] = true;
69548
- return ((_a = prevSpec[m.name]) === null || _a === void 0 ? void 0 : _a.visible) !== ((_b = spec[m.name]) === null || _b === void 0 ? void 0 : _b.visible);
69549
- })) {
69553
+ const changedMarkCompileOnlyKeys = this.getMarksWithoutRoot()
69554
+ .map(m => m.name)
69555
+ .filter(name => hasOnlyAllowedSubKeyChanges(spec[name], prevSpec[name], defaultSeriesMarkCompileOnlySubKeys));
69556
+ changedMarkCompileOnlyKeys.forEach(k => {
69557
+ ignores[k] = true;
69558
+ });
69559
+ if (!result.reCompile && changedMarkCompileOnlyKeys.length) {
69550
69560
  result.reCompile = true;
69551
69561
  }
69552
69562
  const changedCompileKeys = currentKeys.filter((k) => {
@@ -69567,7 +69577,7 @@ class BaseSeries extends BaseModel {
69567
69577
  }
69568
69578
  else if (result.reCompile &&
69569
69579
  !((_d = result.effects) === null || _d === void 0 ? void 0 : _d.series) &&
69570
- (changedCompileKeys.length || changedCompileOnlySubKeys.length)) {
69580
+ (changedCompileKeys.length || changedCompileOnlySubKeys.length || changedMarkCompileOnlyKeys.length)) {
69571
69581
  markSeriesCompileEffect(result);
69572
69582
  }
69573
69583
  if (currentKeys.some((k) => {
@@ -73999,21 +74009,18 @@ class LinearAxisMixin {
73999
74009
  }
74000
74010
  setExtendDomain(key, value) {
74001
74011
  if (value === undefined) {
74012
+ if (!Object.prototype.hasOwnProperty.call(this._extend, key)) {
74013
+ return;
74014
+ }
74002
74015
  delete this._extend[key];
74003
- return;
74004
74016
  }
74005
- this._extend[key] = value;
74006
- const domain = this._scale.domain();
74007
- this.extendDomain(domain);
74008
- this.includeZero(domain);
74009
- this.setDomainMinMax(domain);
74010
- this.niceDomain(domain);
74011
- this._scale.domain(domain, this._nice);
74012
- if (this._nice) {
74013
- const niced = this.setScaleNice();
74014
- !niced && this._scale.rescale();
74017
+ else {
74018
+ if (this._extend[key] === value) {
74019
+ return;
74020
+ }
74021
+ this._extend[key] = value;
74015
74022
  }
74016
- this.event.emit(ChartEvent.scaleUpdate, { model: this, value: 'domain' });
74023
+ this.updateScaleDomain();
74017
74024
  }
74018
74025
  extendDomain(domain) {
74019
74026
  let temp;
@@ -76589,7 +76596,7 @@ class BaseChart extends CompilableBase {
76589
76596
  }
76590
76597
  if (onlyComponentSpecsChanged &&
76591
76598
  !componentUpdateResult.hasNonComponentOnlyUpdate &&
76592
- isUpdateSpecResultComponentOnly(result)) {
76599
+ (isUpdateSpecResultComponentOnly(result) || this._isComponentScaleDomainOnlyUpdate(result))) {
76593
76600
  componentUpdateResult.componentOnlyUpdatedComponents.forEach(component => {
76594
76601
  component.reInit(component.getSpec());
76595
76602
  });
@@ -76667,7 +76674,8 @@ class BaseChart extends CompilableBase {
76667
76674
  const componentSpec = (_b = cmpSpec[c.getSpecIndex()]) !== null && _b !== void 0 ? _b : {};
76668
76675
  const previousComponentSpec = c.getSpec();
76669
76676
  const componentResult = c.updateSpec(componentSpec, cmpSpec);
76670
- if (isUpdateSpecResultComponentOnly(componentResult)) {
76677
+ if (isUpdateSpecResultComponentOnly(componentResult) ||
76678
+ this._isComponentScaleDomainOnlyUpdate(componentResult)) {
76671
76679
  componentOnlyUpdatedComponents.push(c);
76672
76680
  }
76673
76681
  else if (!isEqual(previousComponentSpec, componentSpec)) {
@@ -76678,7 +76686,8 @@ class BaseChart extends CompilableBase {
76678
76686
  else {
76679
76687
  const previousComponentSpec = c.getSpec();
76680
76688
  const componentResult = c.updateSpec(cmpSpec);
76681
- if (isUpdateSpecResultComponentOnly(componentResult)) {
76689
+ if (isUpdateSpecResultComponentOnly(componentResult) ||
76690
+ this._isComponentScaleDomainOnlyUpdate(componentResult)) {
76682
76691
  componentOnlyUpdatedComponents.push(c);
76683
76692
  }
76684
76693
  else if (!isEqual(previousComponentSpec, cmpSpec)) {
@@ -76778,6 +76787,23 @@ class BaseChart extends CompilableBase {
76778
76787
  const effects = result.effects;
76779
76788
  return !!(effects === null || effects === void 0 ? void 0 : effects.series) && !effects.remake && !effects.data && !effects.scaleDomain && !result.reMake;
76780
76789
  }
76790
+ _isComponentScaleDomainOnlyUpdate(result) {
76791
+ const effects = result.effects;
76792
+ return (!!(effects === null || effects === void 0 ? void 0 : effects.component) &&
76793
+ !!effects.scaleDomain &&
76794
+ !result.reMake &&
76795
+ !result.reCompile &&
76796
+ !result.reSize &&
76797
+ !effects.remake &&
76798
+ !effects.compile &&
76799
+ !effects.data &&
76800
+ !effects.series &&
76801
+ !effects.animation &&
76802
+ !result.reTransformSpec &&
76803
+ !result.reAnimate &&
76804
+ !result.changeTheme &&
76805
+ !result.changeBackground);
76806
+ }
76781
76807
  _removeMarkerComponentsForEmptySpecs(result) {
76782
76808
  const removedComponents = this._components.filter(component => {
76783
76809
  var _a;
@@ -77320,6 +77346,7 @@ class BaseChartSpecTransformer {
77320
77346
  };
77321
77347
  const seriesType = this.seriesType;
77322
77348
  if (seriesType) {
77349
+ this._addSeriesRelatedSpecKeys([seriesType]);
77323
77350
  series.type = seriesType;
77324
77351
  series[seriesType] = chartSpec[seriesType];
77325
77352
  }
@@ -103263,6 +103290,16 @@ class Tooltip extends BaseComponent {
103263
103290
  this._regions = this._option.getAllRegions();
103264
103291
  this._initEvent();
103265
103292
  }
103293
+ _compareSpec(spec, prevSpec) {
103294
+ const result = super._compareSpec(spec, prevSpec);
103295
+ const specChanged = !isEqual(prevSpec, spec);
103296
+ if (specChanged && !result.reMake && !result.reCompile) {
103297
+ result.change = true;
103298
+ result.reRender = true;
103299
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, render: true });
103300
+ }
103301
+ return result;
103302
+ }
103266
103303
  release() {
103267
103304
  var _a, _b;
103268
103305
  super.release();
@@ -103573,6 +103610,21 @@ const ORIENT_MAP = {
103573
103610
  category: ['angle'],
103574
103611
  value: ['radius']
103575
103612
  };
103613
+ const CROSSHAIR_COMPONENT_ONLY_TOP_LEVEL_CHANGE_KEYS = {
103614
+ labelZIndex: true,
103615
+ gridZIndex: true
103616
+ };
103617
+ const CROSSHAIR_FIELD_KEYS = {
103618
+ xField: true,
103619
+ yField: true,
103620
+ categoryField: true,
103621
+ valueField: true
103622
+ };
103623
+ const CROSSHAIR_LINE_COMPONENT_ONLY_CHANGE_KEYS = {
103624
+ visible: true,
103625
+ width: true,
103626
+ style: true
103627
+ };
103576
103628
  class BaseCrossHair extends BaseComponent {
103577
103629
  get enableRemain() {
103578
103630
  return this.triggerOff === 'none';
@@ -103767,12 +103819,43 @@ class BaseCrossHair extends BaseComponent {
103767
103819
  }
103768
103820
  _compareSpec(spec, prevSpec) {
103769
103821
  const result = super._compareSpec(spec, prevSpec);
103770
- if (!result.reMake && !isEqual(prevSpec, spec)) {
103822
+ const specChanged = !isEqual(prevSpec, spec);
103823
+ if (specChanged) {
103824
+ result.change = true;
103771
103825
  result.reRender = true;
103772
- result.reMake = true;
103826
+ if (!result.reMake) {
103827
+ if (this._isComponentOnlySpecChange(spec, prevSpec)) {
103828
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, layout: true, render: true });
103829
+ }
103830
+ else {
103831
+ result.reMake = true;
103832
+ }
103833
+ }
103773
103834
  }
103774
103835
  return result;
103775
103836
  }
103837
+ _isComponentOnlySpecChange(spec, prevSpec) {
103838
+ const keys = Object.keys(Object.assign(Object.assign({}, prevSpec), spec));
103839
+ return keys.every(key => {
103840
+ return (isEqual(prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec[key], spec === null || spec === void 0 ? void 0 : spec[key]) ||
103841
+ CROSSHAIR_COMPONENT_ONLY_TOP_LEVEL_CHANGE_KEYS[key] ||
103842
+ (CROSSHAIR_FIELD_KEYS[key] && this._isFieldComponentOnlySpecChange(prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec[key], spec === null || spec === void 0 ? void 0 : spec[key])));
103843
+ });
103844
+ }
103845
+ _isFieldComponentOnlySpecChange(prevSpec, spec) {
103846
+ const keys = Object.keys(Object.assign(Object.assign({}, prevSpec), spec));
103847
+ return keys.every(key => {
103848
+ return (isEqual(prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec[key], spec === null || spec === void 0 ? void 0 : spec[key]) ||
103849
+ key === 'label' ||
103850
+ (key === 'line' && this._isLineComponentOnlySpecChange(prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec.line, spec === null || spec === void 0 ? void 0 : spec.line)));
103851
+ });
103852
+ }
103853
+ _isLineComponentOnlySpecChange(prevSpec, spec) {
103854
+ const keys = Object.keys(Object.assign(Object.assign({}, prevSpec), spec));
103855
+ return keys.every(key => {
103856
+ 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];
103857
+ });
103858
+ }
103776
103859
  _initEvent() {
103777
103860
  if (this._option.disableTriggerEvent) {
103778
103861
  return;
@@ -105196,11 +105279,30 @@ class DataFilterBaseComponent extends BaseComponent {
105196
105279
  _compareSpec(spec, prevSpec) {
105197
105280
  const result = super._compareSpec(spec, prevSpec);
105198
105281
  if (!result.reMake && !isEqual(prevSpec, spec)) {
105282
+ result.change = true;
105199
105283
  result.reRender = true;
105200
- result.reMake = true;
105284
+ if (!result.reCompile && this._isComponentOnlySpecChange(spec, prevSpec)) {
105285
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, layout: true, render: true });
105286
+ }
105287
+ else {
105288
+ result.reMake = true;
105289
+ }
105201
105290
  }
105202
105291
  return result;
105203
105292
  }
105293
+ _getComponentOnlySpecKeys() {
105294
+ return null;
105295
+ }
105296
+ _isComponentOnlySpecChange(spec, prevSpec) {
105297
+ const componentOnlySpecKeys = this._getComponentOnlySpecKeys();
105298
+ if (!componentOnlySpecKeys) {
105299
+ return false;
105300
+ }
105301
+ const keys = Object.keys(Object.assign(Object.assign({}, prevSpec), spec));
105302
+ return keys.every(key => {
105303
+ return isEqual(prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec[key], spec === null || spec === void 0 ? void 0 : spec[key]) || componentOnlySpecKeys[key];
105304
+ });
105305
+ }
105204
105306
  reInit(spec) {
105205
105307
  super.reInit(spec);
105206
105308
  this._marks.forEach(g => {
@@ -105826,6 +105928,22 @@ const dataZoom = {
105826
105928
  backgroundChart: getBackgroundChartTheme(true)
105827
105929
  };
105828
105930
 
105931
+ const DATA_ZOOM_COMPONENT_ONLY_CHANGE_KEYS = {
105932
+ width: true,
105933
+ height: true,
105934
+ showDetail: true,
105935
+ middleHandler: true,
105936
+ background: true,
105937
+ startHandler: true,
105938
+ endHandler: true,
105939
+ startText: true,
105940
+ endText: true,
105941
+ dragMask: true,
105942
+ selectedBackground: true,
105943
+ backgroundChart: true,
105944
+ selectedBackgroundChart: true,
105945
+ showBackgroundChart: true
105946
+ };
105829
105947
  class DataZoom extends DataFilterBaseComponent {
105830
105948
  constructor(spec, options) {
105831
105949
  var _a;
@@ -105936,6 +106054,9 @@ class DataZoom extends DataFilterBaseComponent {
105936
106054
  this.effect.onZoomChange();
105937
106055
  }
105938
106056
  }
106057
+ _getComponentOnlySpecKeys() {
106058
+ return DATA_ZOOM_COMPONENT_ONLY_CHANGE_KEYS;
106059
+ }
105939
106060
  clear() {
105940
106061
  if (this._component) {
105941
106062
  const container = this.getContainer();
@@ -106291,6 +106412,15 @@ const scrollBar = {
106291
106412
 
106292
106413
  const SCROLLBAR_EVENT = 'scrollDrag';
106293
106414
  const SCROLLBAR_END_EVENT = 'scrollUp';
106415
+ const SCROLL_BAR_COMPONENT_ONLY_CHANGE_KEYS = {
106416
+ width: true,
106417
+ height: true,
106418
+ rail: true,
106419
+ slider: true,
106420
+ round: true,
106421
+ innerPadding: true,
106422
+ minSliderSize: true
106423
+ };
106294
106424
  class ScrollBar extends DataFilterBaseComponent {
106295
106425
  constructor(spec, options) {
106296
106426
  var _a;
@@ -106340,6 +106470,9 @@ class ScrollBar extends DataFilterBaseComponent {
106340
106470
  data.reRunAllTransform();
106341
106471
  }
106342
106472
  }
106473
+ _getComponentOnlySpecKeys() {
106474
+ return SCROLL_BAR_COMPONENT_ONLY_CHANGE_KEYS;
106475
+ }
106343
106476
  _beforeLayoutEnd() {
106344
106477
  var _a, _b;
106345
106478
  super._beforeLayoutEnd();
@@ -106513,6 +106646,16 @@ class Indicator extends BaseComponent {
106513
106646
  this._content = array(this._spec.content);
106514
106647
  this._regions = this._option.getRegionsInUserIdOrIndex(array(this._spec.regionId), array(this._spec.regionIndex));
106515
106648
  }
106649
+ _compareSpec(spec, prevSpec) {
106650
+ const result = super._compareSpec(spec, prevSpec);
106651
+ const specChanged = !isEqual(prevSpec, spec);
106652
+ if (specChanged && !result.reMake && !result.reCompile) {
106653
+ result.change = true;
106654
+ result.reRender = true;
106655
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, layout: true, render: true });
106656
+ }
106657
+ return result;
106658
+ }
106516
106659
  initEvent() {
106517
106660
  if (this._option.disableTriggerEvent) {
106518
106661
  return;
@@ -106684,12 +106827,15 @@ function isNeedExtendDomain(domain, datum, autoRange) {
106684
106827
  }
106685
106828
  return false;
106686
106829
  }
106687
- function getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint) {
106830
+ function getAutoRangeExtendDomainKey(keyPrefix, axisKey) {
106831
+ return keyPrefix ? `${keyPrefix}_${axisKey}_extend` : `marker_${axisKey}_extend`;
106832
+ }
106833
+ function getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint, autoRangeExtendDomainKeyPrefix) {
106688
106834
  var _a, _b;
106689
106835
  const { relativeSeries } = refSeries;
106690
106836
  isNumber$2(datum.x) &&
106691
106837
  isNeedExtendDomain(xDomain, datum.x, autoRange) &&
106692
- ((_b = relativeSeries === null || relativeSeries === void 0 ? void 0 : (_a = relativeSeries.getXAxisHelper()).setExtendDomain) === null || _b === void 0 ? void 0 : _b.call(_a, 'marker_xAxis_extend', datum.x));
106838
+ ((_b = relativeSeries === null || relativeSeries === void 0 ? void 0 : (_a = relativeSeries.getXAxisHelper()).setExtendDomain) === null || _b === void 0 ? void 0 : _b.call(_a, getAutoRangeExtendDomainKey(autoRangeExtendDomainKeyPrefix, 'xAxis'), datum.x));
106693
106839
  let x;
106694
106840
  if (isPercent(datum.x)) {
106695
106841
  x = convertPercentToValue(datum.x, regionWidth) + regionStartLayoutStartPoint.x;
@@ -106701,12 +106847,13 @@ function getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStar
106701
106847
  }
106702
106848
  return x;
106703
106849
  }
106704
- function getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint) {
106850
+ function getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint, autoRangeExtendDomainKeyPrefix) {
106705
106851
  var _a, _b;
106706
106852
  const { relativeSeries } = refSeries;
106707
106853
  isNumber$2(datum.y) &&
106708
106854
  isNeedExtendDomain(yDomain, datum.y, autoRange) &&
106709
- ((_b = (_a = relativeSeries.getYAxisHelper()) === null || _a === void 0 ? void 0 : _a.setExtendDomain) === null || _b === void 0 ? void 0 : _b.call(_a, 'marker_yAxis_extend', datum.y));
106855
+ ((_b = (_a = relativeSeries
106856
+ .getYAxisHelper()) === null || _a === void 0 ? void 0 : _a.setExtendDomain) === null || _b === void 0 ? void 0 : _b.call(_a, getAutoRangeExtendDomainKey(autoRangeExtendDomainKeyPrefix, 'yAxis'), datum.y));
106710
106857
  let y;
106711
106858
  if (isPercent(datum.y)) {
106712
106859
  y = convertPercentToValue(datum.y, regionHeight) + regionStartLayoutStartPoint.y;
@@ -106718,20 +106865,20 @@ function getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionSta
106718
106865
  }
106719
106866
  return y;
106720
106867
  }
106721
- function getAngleValue(datum, angleDomain, autoRange, refSeries) {
106868
+ function getAngleValue(datum, angleDomain, autoRange, refSeries, autoRangeExtendDomainKeyPrefix) {
106722
106869
  var _a, _b;
106723
106870
  const { relativeSeries } = refSeries;
106724
106871
  isNumber$2(datum.angle) &&
106725
106872
  isNeedExtendDomain(angleDomain, datum.angle, autoRange) &&
106726
- ((_b = (_a = relativeSeries.angleAxisHelper) === null || _a === void 0 ? void 0 : _a.setExtendDomain) === null || _b === void 0 ? void 0 : _b.call(_a, 'marker_angleAxis_extend', datum.angle));
106873
+ ((_b = (_a = relativeSeries.angleAxisHelper) === null || _a === void 0 ? void 0 : _a.setExtendDomain) === null || _b === void 0 ? void 0 : _b.call(_a, getAutoRangeExtendDomainKey(autoRangeExtendDomainKeyPrefix, 'angleAxis'), datum.angle));
106727
106874
  return convertDatumToValue(relativeSeries.angleAxisHelper, [datum.angle]);
106728
106875
  }
106729
- function getRadiusValue(datum, radiusDomain, autoRange, refSeries) {
106876
+ function getRadiusValue(datum, radiusDomain, autoRange, refSeries, autoRangeExtendDomainKeyPrefix) {
106730
106877
  var _a, _b;
106731
106878
  const { relativeSeries } = refSeries;
106732
106879
  isNumber$2(datum.radius) &&
106733
106880
  isNeedExtendDomain(radiusDomain, datum.radius, autoRange) &&
106734
- ((_b = (_a = relativeSeries.radiusAxisHelper) === null || _a === void 0 ? void 0 : _a.setExtendDomain) === null || _b === void 0 ? void 0 : _b.call(_a, 'marker_radiusAxis_extend', datum.radius));
106881
+ ((_b = (_a = relativeSeries.radiusAxisHelper) === null || _a === void 0 ? void 0 : _a.setExtendDomain) === null || _b === void 0 ? void 0 : _b.call(_a, getAutoRangeExtendDomainKey(autoRangeExtendDomainKeyPrefix, 'radiusAxis'), datum.radius));
106735
106882
  return convertDatumToValue(relativeSeries.radiusAxisHelper, [datum.radius]);
106736
106883
  }
106737
106884
  function convertPercentToValue(percent, relativeLength) {
@@ -106747,7 +106894,7 @@ function convertDatumToValue(axisHelper, datum) {
106747
106894
  function isAggrSpec(spec) {
106748
106895
  return AGGR_TYPE.includes(spec);
106749
106896
  }
106750
- function xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand = false) {
106897
+ function xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand = false, autoRangeExtendDomainKeyPrefix) {
106751
106898
  const regionStart = startRelativeSeries.getRegion();
106752
106899
  const regionStartLayoutStartPoint = regionStart.getLayoutStartPoint();
106753
106900
  const regionEnd = endRelativeSeries.getRegion();
@@ -106777,14 +106924,14 @@ function xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries,
106777
106924
  let x;
106778
106925
  let y;
106779
106926
  if (isValidX && isValidY) {
106780
- x = getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint);
106781
- y = getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint);
106927
+ x = getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint, autoRangeExtendDomainKeyPrefix);
106928
+ y = getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint, autoRangeExtendDomainKeyPrefix);
106782
106929
  setTempWithValid(x, isXExpand, xTemp, lines.length);
106783
106930
  setTempWithValid(y, isyExpand, yTemp, lines.length);
106784
106931
  lines.push([{ x, y }]);
106785
106932
  }
106786
106933
  else if (isValidX) {
106787
- x = getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint);
106934
+ x = getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint, autoRangeExtendDomainKeyPrefix);
106788
106935
  y = Math.max(regionStartLayoutStartPoint.y + regionStart.getLayoutRect().height, regionEndLayoutStartPoint.y + regionEnd.getLayoutRect().height);
106789
106936
  const y1 = Math.min(regionStartLayoutStartPoint.y, regionEndLayoutStartPoint.y);
106790
106937
  setTempWithValid(x, isXExpand, xTemp, lines.length);
@@ -106801,7 +106948,7 @@ function xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries,
106801
106948
  }
106802
106949
  else if (isValidY) {
106803
106950
  x = Math.min(regionStartLayoutStartPoint.x, regionEndLayoutStartPoint.x);
106804
- y = getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint);
106951
+ y = getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint, autoRangeExtendDomainKeyPrefix);
106805
106952
  const x1 = Math.max(regionStartLayoutStartPoint.x + regionStart.getLayoutRect().width, regionEndLayoutStartPoint.x + regionEnd.getLayoutRect().width);
106806
106953
  setTempWithValid(y, isyExpand, yTemp, lines.length);
106807
106954
  lines.push([
@@ -106856,7 +107003,7 @@ function setTempWithValid(v, isExpand, temp, index) {
106856
107003
  }
106857
107004
  return v;
106858
107005
  }
106859
- function polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange) {
107006
+ function polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, autoRangeExtendDomainKeyPrefix) {
106860
107007
  const refSeries = {
106861
107008
  relativeSeries,
106862
107009
  startRelativeSeries,
@@ -106871,12 +107018,12 @@ function polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSerie
106871
107018
  const isValidAngle = isValid$1(datum.angle);
106872
107019
  const isValidRadius = isValid$1(datum.radius);
106873
107020
  if (isValidAngle && isValidRadius) {
106874
- const angle = getAngleValue(datum, angleDomain, autoRange, refSeries);
106875
- const radius = getRadiusValue(datum, radiusDomain, autoRange, refSeries);
107021
+ const angle = getAngleValue(datum, angleDomain, autoRange, refSeries, autoRangeExtendDomainKeyPrefix);
107022
+ const radius = getRadiusValue(datum, radiusDomain, autoRange, refSeries, autoRangeExtendDomainKeyPrefix);
106876
107023
  lines.push([{ angle, radius }]);
106877
107024
  }
106878
107025
  else if (isValidAngle) {
106879
- const angle = getAngleValue(datum, angleDomain, autoRange, refSeries);
107026
+ const angle = getAngleValue(datum, angleDomain, autoRange, refSeries, autoRangeExtendDomainKeyPrefix);
106880
107027
  lines.push([
106881
107028
  {
106882
107029
  angle,
@@ -106889,7 +107036,7 @@ function polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSerie
106889
107036
  ]);
106890
107037
  }
106891
107038
  else if (isValidRadius) {
106892
- const radius = getRadiusValue(datum, radiusDomain, autoRange, refSeries);
107039
+ const radius = getRadiusValue(datum, radiusDomain, autoRange, refSeries, autoRangeExtendDomainKeyPrefix);
106893
107040
  lines.push([
106894
107041
  {
106895
107042
  radius,
@@ -106922,7 +107069,7 @@ function geoLayout(data, relativeSeries) {
106922
107069
  });
106923
107070
  return lines;
106924
107071
  }
106925
- function cartesianCoordinateLayout(data, relativeSeries, autoRange, coordinatesOffset) {
107072
+ function cartesianCoordinateLayout(data, relativeSeries, autoRange, coordinatesOffset, autoRangeExtendDomainKeyPrefix) {
106926
107073
  const points = [];
106927
107074
  const dataPoints = data.latestData[0] && data.latestData[0].latestData ? data.latestData[0].latestData : data.latestData;
106928
107075
  const isArrayCoordinatesOffset = isArray$1(coordinatesOffset);
@@ -106952,11 +107099,13 @@ function cartesianCoordinateLayout(data, relativeSeries, autoRange, coordinatesO
106952
107099
  xValue.length === 1 &&
106953
107100
  isNumber$2(xValue[0]) &&
106954
107101
  isNeedExtendDomain(xDomain, xValue[0], autoRange) &&
106955
- ((_b = (_a = refRelativeSeries.getXAxisHelper()) === null || _a === void 0 ? void 0 : _a.setExtendDomain) === null || _b === void 0 ? void 0 : _b.call(_a, 'marker_xAxis_extend', xValue[0]));
107102
+ ((_b = (_a = refRelativeSeries
107103
+ .getXAxisHelper()) === null || _a === void 0 ? void 0 : _a.setExtendDomain) === null || _b === void 0 ? void 0 : _b.call(_a, getAutoRangeExtendDomainKey(autoRangeExtendDomainKeyPrefix, 'xAxis'), xValue[0]));
106956
107104
  yValue.length === 1 &&
106957
107105
  isNumber$2(yValue[0]) &&
106958
107106
  isNeedExtendDomain(yDomain, yValue[0], autoRange) &&
106959
- ((_d = (_c = refRelativeSeries.getYAxisHelper()) === null || _c === void 0 ? void 0 : _c.setExtendDomain) === null || _d === void 0 ? void 0 : _d.call(_c, 'marker_yAxis_extend', yValue[0]));
107107
+ ((_d = (_c = refRelativeSeries
107108
+ .getYAxisHelper()) === null || _c === void 0 ? void 0 : _c.setExtendDomain) === null || _d === void 0 ? void 0 : _d.call(_c, getAutoRangeExtendDomainKey(autoRangeExtendDomainKeyPrefix, 'yAxis'), yValue[0]));
106960
107109
  points.push({
106961
107110
  x: convertDatumToValue(refRelativeSeries.getXAxisHelper(), xValue) + regionStartLayoutStartPoint.x + offsetX,
106962
107111
  y: convertDatumToValue(refRelativeSeries.getYAxisHelper(), yValue) + regionStartLayoutStartPoint.y + offsetY
@@ -106964,7 +107113,7 @@ function cartesianCoordinateLayout(data, relativeSeries, autoRange, coordinatesO
106964
107113
  });
106965
107114
  return points;
106966
107115
  }
106967
- function polarCoordinateLayout(data, relativeSeries, autoRange) {
107116
+ function polarCoordinateLayout(data, relativeSeries, autoRange, autoRangeExtendDomainKeyPrefix) {
106968
107117
  const points = [];
106969
107118
  const dataPoints = data.latestData[0] && data.latestData[0].latestData ? data.latestData[0].latestData : data.latestData;
106970
107119
  dataPoints.forEach((datum) => {
@@ -106977,11 +107126,11 @@ function polarCoordinateLayout(data, relativeSeries, autoRange) {
106977
107126
  angleValue.length === 1 &&
106978
107127
  isNumber$2(angleValue[0]) &&
106979
107128
  isNeedExtendDomain(angleDomain, angleValue[0], autoRange) &&
106980
- ((_b = (_a = refRelativeSeries.angleAxisHelper) === null || _a === void 0 ? void 0 : _a.setExtendDomain) === null || _b === void 0 ? void 0 : _b.call(_a, 'marker_xAxis_extend', angleValue[0]));
107129
+ ((_b = (_a = refRelativeSeries.angleAxisHelper) === null || _a === void 0 ? void 0 : _a.setExtendDomain) === null || _b === void 0 ? void 0 : _b.call(_a, getAutoRangeExtendDomainKey(autoRangeExtendDomainKeyPrefix, 'angleAxis'), angleValue[0]));
106981
107130
  radiusValue.length === 1 &&
106982
107131
  isNumber$2(radiusValue[0]) &&
106983
107132
  isNeedExtendDomain(radiusDomain, radiusValue[0], autoRange) &&
106984
- ((_d = (_c = refRelativeSeries.radiusAxisHelper) === null || _c === void 0 ? void 0 : _c.setExtendDomain) === null || _d === void 0 ? void 0 : _d.call(_c, 'marker_yAxis_extend', radiusValue[0]));
107133
+ ((_d = (_c = refRelativeSeries.radiusAxisHelper) === null || _c === void 0 ? void 0 : _c.setExtendDomain) === null || _d === void 0 ? void 0 : _d.call(_c, getAutoRangeExtendDomainKey(autoRangeExtendDomainKeyPrefix, 'radiusAxis'), radiusValue[0]));
106985
107134
  points.push({
106986
107135
  angle: convertDatumToValue(refRelativeSeries.angleAxisHelper, angleValue),
106987
107136
  radius: convertDatumToValue(refRelativeSeries.radiusAxisHelper, radiusValue)
@@ -107510,6 +107659,65 @@ const releaseDataViewWithDependencies = (dataView, shouldReleaseDependency) => {
107510
107659
  releaseDataViews([dataView, ...releaseDependencies]);
107511
107660
  };
107512
107661
 
107662
+ const MARKER_FORMAT_METHOD_PLACEHOLDER = '__vchart_marker_format_method__';
107663
+ const MARKER_COORDINATE_PLACEHOLDER = '__vchart_marker_coordinate__';
107664
+ const MARKER_TEXT_PLACEHOLDER = '__vchart_marker_text__';
107665
+ const MARKER_AUTO_RANGE_PLACEHOLDER = '__vchart_marker_auto_range__';
107666
+ const MARKER_DOMAIN_POSITION_SPEC_KEYS = [
107667
+ 'coordinate',
107668
+ 'coordinates',
107669
+ 'x',
107670
+ 'y',
107671
+ 'x1',
107672
+ 'y1',
107673
+ 'angle',
107674
+ 'angle1',
107675
+ 'radius',
107676
+ 'radius1'
107677
+ ];
107678
+ const MARKER_LAYOUT_POSITION_SPEC_KEYS = ['position', 'positions', 'coordinatesOffset', 'regionRelative'];
107679
+ const normalizeMarkerLabelFormatMethod = (label) => {
107680
+ if (Array.isArray(label)) {
107681
+ return label.map(normalizeMarkerLabelFormatMethod);
107682
+ }
107683
+ if (!label || typeof label !== 'object') {
107684
+ return label;
107685
+ }
107686
+ if (typeof label.formatMethod !== 'function') {
107687
+ return label;
107688
+ }
107689
+ return Object.assign(Object.assign({}, label), { formatMethod: MARKER_FORMAT_METHOD_PLACEHOLDER });
107690
+ };
107691
+ const normalizeMarkerSpecForComponentOnlyUpdate = (spec, options) => {
107692
+ var _a;
107693
+ if (!spec || typeof spec !== 'object') {
107694
+ return spec;
107695
+ }
107696
+ const normalized = Object.assign({}, spec);
107697
+ if (options.normalizeDomainPosition) {
107698
+ MARKER_DOMAIN_POSITION_SPEC_KEYS.forEach(key => {
107699
+ if (key in normalized) {
107700
+ normalized[key] = MARKER_COORDINATE_PLACEHOLDER;
107701
+ }
107702
+ });
107703
+ }
107704
+ if (options.normalizeAutoRange && 'autoRange' in normalized) {
107705
+ normalized.autoRange = MARKER_AUTO_RANGE_PLACEHOLDER;
107706
+ }
107707
+ MARKER_LAYOUT_POSITION_SPEC_KEYS.forEach(key => {
107708
+ if (key in normalized) {
107709
+ normalized[key] = MARKER_COORDINATE_PLACEHOLDER;
107710
+ }
107711
+ });
107712
+ if ('label' in normalized) {
107713
+ normalized.label = normalizeMarkerLabelFormatMethod(normalized.label);
107714
+ }
107715
+ const text = (_a = normalized.itemContent) === null || _a === void 0 ? void 0 : _a.text;
107716
+ if (text && typeof text === 'object') {
107717
+ normalized.itemContent = Object.assign(Object.assign({}, normalized.itemContent), { text: Object.assign(Object.assign({}, normalizeMarkerLabelFormatMethod(text)), { text: MARKER_TEXT_PLACEHOLDER }) });
107718
+ }
107719
+ return normalized;
107720
+ };
107513
107721
  class BaseMarker extends BaseComponent {
107514
107722
  constructor() {
107515
107723
  super(...arguments);
@@ -107558,6 +107766,27 @@ class BaseMarker extends BaseComponent {
107558
107766
  getEndRelativeSeries: () => this._endRelativeSeries
107559
107767
  };
107560
107768
  }
107769
+ _getAutoRangeExtendDomainKeyPrefix() {
107770
+ return `marker_${this.type}_${this.id}`;
107771
+ }
107772
+ _getAutoRangeExtendDomainKey(axisKey) {
107773
+ return `${this._getAutoRangeExtendDomainKeyPrefix()}_${axisKey}_extend`;
107774
+ }
107775
+ _clearAutoRangeExtendDomain() {
107776
+ var _a, _b;
107777
+ const seriesList = array((_b = (_a = this._option).getAllSeries) === null || _b === void 0 ? void 0 : _b.call(_a));
107778
+ seriesList.forEach((series) => {
107779
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
107780
+ (_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);
107781
+ (_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);
107782
+ (_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);
107783
+ (_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);
107784
+ });
107785
+ }
107786
+ _updateMarkerLayout() {
107787
+ this._clearAutoRangeExtendDomain();
107788
+ this._markerLayout();
107789
+ }
107561
107790
  _getFieldInfoFromSpec(dim, spec, relativeSeries) {
107562
107791
  const specKeyByDim = {
107563
107792
  x: 'xField',
@@ -107606,7 +107835,7 @@ class BaseMarker extends BaseComponent {
107606
107835
  return;
107607
107836
  }
107608
107837
  this._markerDataChangeHandler = () => {
107609
- this._markerLayout();
107838
+ this._updateMarkerLayout();
107610
107839
  };
107611
107840
  this._markerData.target.on('change', this._markerDataChangeHandler);
107612
107841
  }
@@ -107636,7 +107865,7 @@ class BaseMarker extends BaseComponent {
107636
107865
  this._delegateEvent(this._markerComponent, event, type, null, this.getMarkerData.bind(this));
107637
107866
  });
107638
107867
  }
107639
- this._markerLayout();
107868
+ this._updateMarkerLayout();
107640
107869
  }
107641
107870
  super.updateLayoutAttribute();
107642
107871
  }
@@ -107666,9 +107895,9 @@ class BaseMarker extends BaseComponent {
107666
107895
  }
107667
107896
  initEvent() {
107668
107897
  if (this._relativeSeries.coordinate !== 'cartesian') {
107669
- this._relativeSeries.event.on('zoom', this._markerLayout.bind(this));
107670
- this._relativeSeries.event.on('panmove', this._markerLayout.bind(this));
107671
- this._relativeSeries.event.on('scroll', this._markerLayout.bind(this));
107898
+ this._relativeSeries.event.on('zoom', this._updateMarkerLayout.bind(this));
107899
+ this._relativeSeries.event.on('panmove', this._updateMarkerLayout.bind(this));
107900
+ this._relativeSeries.event.on('scroll', this._updateMarkerLayout.bind(this));
107672
107901
  }
107673
107902
  }
107674
107903
  clear() {
@@ -107709,16 +107938,50 @@ class BaseMarker extends BaseComponent {
107709
107938
  const result = super._compareSpec(spec, prevSpec);
107710
107939
  if (!isEqual(prevSpec, spec)) {
107711
107940
  result.reRender = true;
107712
- result.reMake = true;
107713
107941
  result.change = true;
107942
+ if (!result.reMake && !result.reCompile && this._isComponentOnlySpecChange(spec, prevSpec)) {
107943
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, layout: true, render: true });
107944
+ }
107945
+ else if (!result.reMake && !result.reCompile && this._isAutoRangeSpecChange(spec, prevSpec)) {
107946
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, scaleDomain: true, layout: true, render: true });
107947
+ }
107948
+ else {
107949
+ result.reMake = true;
107950
+ }
107714
107951
  }
107715
107952
  return result;
107716
107953
  }
107954
+ _isComponentOnlySpecChange(spec, prevSpec) {
107955
+ const normalizeDomainPosition = !(spec === null || spec === void 0 ? void 0 : spec.autoRange) && !(prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec.autoRange);
107956
+ return isEqual(normalizeMarkerSpecForComponentOnlyUpdate(prevSpec, { normalizeDomainPosition }), normalizeMarkerSpecForComponentOnlyUpdate(spec, { normalizeDomainPosition }));
107957
+ }
107958
+ _isAutoRangeSpecChange(spec, prevSpec) {
107959
+ if (!(spec === null || spec === void 0 ? void 0 : spec.autoRange) && !(prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec.autoRange)) {
107960
+ return false;
107961
+ }
107962
+ return isEqual(normalizeMarkerSpecForComponentOnlyUpdate(prevSpec, {
107963
+ normalizeDomainPosition: true,
107964
+ normalizeAutoRange: true
107965
+ }), normalizeMarkerSpecForComponentOnlyUpdate(spec, {
107966
+ normalizeDomainPosition: true,
107967
+ normalizeAutoRange: true
107968
+ }));
107969
+ }
107970
+ reInit(spec) {
107971
+ super.reInit(spec);
107972
+ this._bindSeries();
107973
+ this._initDataView();
107974
+ this._buildMarkerAttributeContext();
107975
+ if (this._markerComponent) {
107976
+ this._updateMarkerLayout();
107977
+ }
107978
+ }
107717
107979
  _initCommonDataView() {
107718
107980
  const { options } = this._computeOptions();
107719
107981
  const seriesData = this._getRelativeDataView();
107720
107982
  registerDataSetInstanceTransform(this._option.dataSet, 'markerAggregation', markerAggregation);
107721
107983
  registerDataSetInstanceTransform(this._option.dataSet, 'markerFilter', markerFilter);
107984
+ this._releaseMarkerData();
107722
107985
  const data = new DataView(this._option.dataSet, { name: `${this.type}_${this.id}_data` });
107723
107986
  data.parse([seriesData], {
107724
107987
  type: 'dataview'
@@ -107988,11 +108251,11 @@ class CartesianMarkLine extends BaseMarkLine {
107988
108251
  doXYProcess ||
107989
108252
  (isValidCoordinates && isValidProcessX) ||
107990
108253
  (isValidCoordinates && isValidProcessY)) {
107991
- const xyPoints = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange);
108254
+ const xyPoints = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, false, this._getAutoRangeExtendDomainKeyPrefix());
107992
108255
  points = (xyPoints.length === 1 ? xyPoints[0] : xyPoints.map(point => point[0]));
107993
108256
  }
107994
108257
  else if (doCoordinatesProcess) {
107995
- points = cartesianCoordinateLayout(data, relativeSeries, autoRange, spec.coordinatesOffset);
108258
+ points = cartesianCoordinateLayout(data, relativeSeries, autoRange, spec.coordinatesOffset, this._getAutoRangeExtendDomainKeyPrefix());
107996
108259
  }
107997
108260
  else if (isPositionLayout) {
107998
108261
  points = positionLayout(spec.positions, relativeSeries, spec.regionRelative);
@@ -108216,7 +108479,7 @@ class PolarMarkLine extends BaseMarkLine {
108216
108479
  this._relativeSeries.angleAxisHelper.center().y
108217
108480
  };
108218
108481
  if (doAngleProcess || doRadiusProcess || doAngRadRad1Process || doRadAngAng1Process || doRadAngProcess) {
108219
- const polarPoints = polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange);
108482
+ const polarPoints = polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, this._getAutoRangeExtendDomainKeyPrefix());
108220
108483
  points = (polarPoints.length === 1 ? polarPoints[0] : polarPoints.map(point => point[0]));
108221
108484
  if (points[0].radius === points[1].radius) {
108222
108485
  pointsAttr = {
@@ -108235,7 +108498,7 @@ class PolarMarkLine extends BaseMarkLine {
108235
108498
  }
108236
108499
  }
108237
108500
  else if (doCoordinatesProcess) {
108238
- points = polarCoordinateLayout(data, relativeSeries, autoRange);
108501
+ points = polarCoordinateLayout(data, relativeSeries, autoRange, this._getAutoRangeExtendDomainKeyPrefix());
108239
108502
  pointsAttr = {
108240
108503
  points: points.map(point => {
108241
108504
  return polarToCartesian(center, point.radius, point.angle);
@@ -108613,7 +108876,7 @@ class CartesianMarkArea extends BaseMarkArea {
108613
108876
  let points = [];
108614
108877
  let lines = [];
108615
108878
  if (doXYProcess) {
108616
- lines = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand);
108879
+ lines = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand, this._getAutoRangeExtendDomainKeyPrefix());
108617
108880
  const [start, end] = lines;
108618
108881
  if (start && start.length && end && end.length) {
108619
108882
  points = [
@@ -108631,14 +108894,14 @@ class CartesianMarkArea extends BaseMarkArea {
108631
108894
  }
108632
108895
  }
108633
108896
  else if (doXProcess || doYProcess) {
108634
- lines = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand);
108897
+ lines = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand, this._getAutoRangeExtendDomainKeyPrefix());
108635
108898
  const [start, end] = lines;
108636
108899
  if (start && start.length && end && end.length) {
108637
108900
  points = [...start, end[1], end[0]];
108638
108901
  }
108639
108902
  }
108640
108903
  else if (doCoordinatesProcess) {
108641
- points = cartesianCoordinateLayout(data, relativeSeries, autoRange, spec.coordinatesOffset);
108904
+ points = cartesianCoordinateLayout(data, relativeSeries, autoRange, spec.coordinatesOffset, this._getAutoRangeExtendDomainKeyPrefix());
108642
108905
  }
108643
108906
  else if (isPositionLayout) {
108644
108907
  points = positionLayout(spec.positions, relativeSeries, spec.regionRelative);
@@ -108721,7 +108984,7 @@ class PolarMarkArea extends BaseMarkArea {
108721
108984
  this._relativeSeries.angleAxisHelper.center().y
108722
108985
  };
108723
108986
  if (doAngleProcess || doRadiusProcess || doRadAngProcess) {
108724
- const polarLines = polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange);
108987
+ const polarLines = polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, this._getAutoRangeExtendDomainKeyPrefix());
108725
108988
  if (doRadAngProcess) {
108726
108989
  pointsAttr = {
108727
108990
  innerRadius: polarLines[0][0].radius,
@@ -108751,7 +109014,7 @@ class PolarMarkArea extends BaseMarkArea {
108751
109014
  }
108752
109015
  }
108753
109016
  else if (doCoordinatesProcess) {
108754
- points = polarCoordinateLayout(data, relativeSeries, autoRange);
109017
+ points = polarCoordinateLayout(data, relativeSeries, autoRange, this._getAutoRangeExtendDomainKeyPrefix());
108755
109018
  pointsAttr = {
108756
109019
  points: points.map(point => {
108757
109020
  return polarToCartesian(center, point.radius, point.angle);
@@ -109060,6 +109323,20 @@ class Player extends BaseComponent {
109060
109323
  this._position = (_g = this._spec.position) !== null && _g !== void 0 ? _g : 'middle';
109061
109324
  this._visible = (_h = this._spec.visible) !== null && _h !== void 0 ? _h : true;
109062
109325
  }
109326
+ _compareSpec(spec, prevSpec) {
109327
+ const result = super._compareSpec(spec, prevSpec);
109328
+ const specChanged = !isEqual(prevSpec, spec);
109329
+ if ((prevSpec === null || prevSpec === void 0 ? void 0 : prevSpec.type) !== (spec === null || spec === void 0 ? void 0 : spec.type)) {
109330
+ result.reMake = true;
109331
+ return result;
109332
+ }
109333
+ if (specChanged && !result.reMake && !result.reCompile) {
109334
+ result.change = true;
109335
+ result.reRender = true;
109336
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, layout: true, render: true });
109337
+ }
109338
+ return result;
109339
+ }
109063
109340
  afterSetLayoutStartPoint(pos) {
109064
109341
  super.afterSetLayoutStartPoint(pos);
109065
109342
  if (isValidNumber$1(pos.x)) {
@@ -109199,7 +109476,13 @@ class BaseLabelComponent extends BaseComponent {
109199
109476
  const result = super._compareSpec(spec, prevSpec);
109200
109477
  result.reRender = true;
109201
109478
  if (!isEqual(prevSpec, spec)) {
109202
- result.reMake = true;
109479
+ result.change = true;
109480
+ if (!result.reMake && !result.reCompile) {
109481
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, layout: true, render: true });
109482
+ }
109483
+ else {
109484
+ result.reMake = true;
109485
+ }
109203
109486
  }
109204
109487
  return result;
109205
109488
  }
@@ -109948,7 +110231,7 @@ class BaseMarkPoint extends BaseMarker {
109948
110231
  return markPoint;
109949
110232
  }
109950
110233
  _markerLayout() {
109951
- var _a, _b, _c, _d, _e;
110234
+ var _a, _b, _c, _d, _e, _f;
109952
110235
  const spec = this._spec;
109953
110236
  const data = this._markerData;
109954
110237
  const relativeSeries = this._relativeSeries;
@@ -109972,12 +110255,15 @@ class BaseMarkPoint extends BaseMarker {
109972
110255
  if (this._markerComponent) {
109973
110256
  const attribute = (_b = this._markerComponent.attribute) !== null && _b !== void 0 ? _b : {};
109974
110257
  const textStyle = (_d = (_c = attribute.itemContent) === null || _c === void 0 ? void 0 : _c.textStyle) !== null && _d !== void 0 ? _d : {};
110258
+ const specText = (_e = this._spec.itemContent.text) === null || _e === void 0 ? void 0 : _e.text;
109975
110259
  this._markerComponent.setAttributes({
109976
110260
  position: point === undefined ? { x: null, y: null } : point,
109977
- itemContent: Object.assign(Object.assign({}, attribute.itemContent), { textStyle: Object.assign(Object.assign({}, textStyle), { text: ((_e = this._spec.itemContent.text) === null || _e === void 0 ? void 0 : _e.formatMethod)
110261
+ itemContent: Object.assign(Object.assign({}, attribute.itemContent), { textStyle: Object.assign(Object.assign({}, textStyle), { text: ((_f = this._spec.itemContent.text) === null || _f === void 0 ? void 0 : _f.formatMethod)
109978
110262
  ?
109979
110263
  this._spec.itemContent.text.formatMethod(dataPoints, seriesData)
109980
- : textStyle.text }), offsetX: computeOffsetFromRegion(point, attribute.itemContent.offsetX, this._relativeSeries.getRegion()), offsetY: computeOffsetFromRegion(point, attribute.itemContent.offsetY, this._relativeSeries.getRegion()) }),
110264
+ : isValid$1(specText)
110265
+ ? specText
110266
+ : textStyle.text }), offsetX: computeOffsetFromRegion(point, attribute.itemContent.offsetX, this._relativeSeries.getRegion()), offsetY: computeOffsetFromRegion(point, attribute.itemContent.offsetY, this._relativeSeries.getRegion()) }),
109981
110267
  limitRect,
109982
110268
  dx: this._layoutOffsetX,
109983
110269
  dy: this._layoutOffsetY
@@ -110046,10 +110332,10 @@ class CartesianMarkPoint extends BaseMarkPoint {
110046
110332
  const autoRange = (_a = spec === null || spec === void 0 ? void 0 : spec.autoRange) !== null && _a !== void 0 ? _a : false;
110047
110333
  let point;
110048
110334
  if (isXYLayout) {
110049
- point = (_c = (_b = xyLayout(data, relativeSeries, relativeSeries, relativeSeries, autoRange)) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c[0];
110335
+ point = (_c = (_b = xyLayout(data, relativeSeries, relativeSeries, relativeSeries, autoRange, false, this._getAutoRangeExtendDomainKeyPrefix())) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c[0];
110050
110336
  }
110051
110337
  else if (isCoordinateLayout) {
110052
- point = cartesianCoordinateLayout(data, relativeSeries, autoRange, spec.coordinatesOffset)[0];
110338
+ point = cartesianCoordinateLayout(data, relativeSeries, autoRange, spec.coordinatesOffset, this._getAutoRangeExtendDomainKeyPrefix())[0];
110053
110339
  }
110054
110340
  else if (isPositionLayout) {
110055
110341
  point = positionLayout(spec.position, relativeSeries, spec.regionRelative)[0];
@@ -110097,7 +110383,7 @@ class PolarMarkPoint extends BaseMarkPoint {
110097
110383
  const data = this._markerData;
110098
110384
  const relativeSeries = this._relativeSeries;
110099
110385
  const autoRange = (_b = (_a = this._spec) === null || _a === void 0 ? void 0 : _a.autoRange) !== null && _b !== void 0 ? _b : false;
110100
- const polarPoint = polarLayout(data, relativeSeries, relativeSeries, relativeSeries, autoRange)[0][0];
110386
+ const polarPoint = polarLayout(data, relativeSeries, relativeSeries, relativeSeries, autoRange, this._getAutoRangeExtendDomainKeyPrefix())[0][0];
110101
110387
  const center = {
110102
110388
  x: this._relativeSeries.getRegion().getLayoutStartPoint().x +
110103
110389
  this._relativeSeries.angleAxisHelper.center().x,
@@ -110174,6 +110460,11 @@ const brush = {
110174
110460
 
110175
110461
  const IN_BRUSH_STATE = 'inBrush';
110176
110462
  const OUT_BRUSH_STATE = 'outOfBrush';
110463
+ const BRUSH_COMPONENT_ONLY_CHANGE_KEYS = {
110464
+ style: true,
110465
+ inBrush: true,
110466
+ outOfBrush: true
110467
+ };
110177
110468
  class Brush extends BaseComponent {
110178
110469
  constructor() {
110179
110470
  super(...arguments);
@@ -110299,11 +110590,23 @@ class Brush extends BaseComponent {
110299
110590
  }
110300
110591
  const result = super._compareSpec(spec, prevSpec);
110301
110592
  if (!isEqual(prevSpec, spec)) {
110593
+ result.change = true;
110302
110594
  result.reRender = true;
110303
- result.reMake = true;
110595
+ if (!result.reMake && !result.reCompile && this._isComponentOnlySpecChange(spec, prevSpec)) {
110596
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, layout: true, render: true });
110597
+ }
110598
+ else {
110599
+ result.reMake = true;
110600
+ }
110304
110601
  }
110305
110602
  return result;
110306
110603
  }
110604
+ _isComponentOnlySpecChange(spec, prevSpec) {
110605
+ const keys = Object.keys(Object.assign(Object.assign({}, prevSpec), spec));
110606
+ return keys.every(key => {
110607
+ 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];
110608
+ });
110609
+ }
110307
110610
  onLayoutEnd() {
110308
110611
  var _a;
110309
110612
  super.onLayoutEnd();
@@ -110326,9 +110629,10 @@ class Brush extends BaseComponent {
110326
110629
  }
110327
110630
  }
110328
110631
  _updateBrushComponent(region, componentIndex) {
110632
+ var _a;
110329
110633
  const interactiveAttr = this._getBrushInteractiveAttr(region);
110330
110634
  const brushComponent = this._brushComponents[componentIndex];
110331
- brushComponent.setAttributes(interactiveAttr);
110635
+ brushComponent.setAttributes(Object.assign({ brushStyle: transformToGraphic((_a = this._spec) === null || _a === void 0 ? void 0 : _a.style) }, interactiveAttr));
110332
110636
  this._initMarkBrushState(componentIndex, '');
110333
110637
  brushComponent.children[0].removeAllChild();
110334
110638
  }
@@ -110767,6 +111071,10 @@ const registerBrush = () => {
110767
111071
  Factory.registerComponent(Brush.type, Brush);
110768
111072
  };
110769
111073
 
111074
+ const CUSTOM_MARK_COMPONENT_ONLY_CHANGE_KEYS = {
111075
+ style: true,
111076
+ state: true
111077
+ };
110770
111078
  class CustomMark extends BaseComponent {
110771
111079
  constructor() {
110772
111080
  super(...arguments);
@@ -110857,12 +111165,43 @@ class CustomMark extends BaseComponent {
110857
111165
  _compareSpec(spec, prevSpec) {
110858
111166
  const result = super._compareSpec(spec, prevSpec);
110859
111167
  if (!isEqual(prevSpec, spec)) {
110860
- result.reMake = true;
111168
+ if (!result.reMake && !result.reCompile && this._isComponentOnlySpecChange(spec, prevSpec)) {
111169
+ result.effects = Object.assign(Object.assign({}, result.effects), { component: true, render: true });
111170
+ }
111171
+ else {
111172
+ result.reMake = true;
111173
+ }
110861
111174
  }
110862
111175
  result.change = true;
110863
111176
  result.reRender = true;
110864
111177
  return result;
110865
111178
  }
111179
+ _isComponentOnlySpecChange(spec, prevSpec) {
111180
+ const keys = Object.keys(Object.assign(Object.assign({}, prevSpec), spec));
111181
+ return keys.every(key => {
111182
+ 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];
111183
+ });
111184
+ }
111185
+ reInit(spec) {
111186
+ super.reInit(spec);
111187
+ this._updateMarkStyleWithSpec(this._spec, this.getMarks()[0]);
111188
+ this.getMarks().forEach(mark => {
111189
+ mark.commit(false, true);
111190
+ });
111191
+ }
111192
+ _updateMarkStyleWithSpec(spec, mark) {
111193
+ var _a, _b, _c, _d;
111194
+ if (!spec || !mark) {
111195
+ return;
111196
+ }
111197
+ this.initMarkStyleWithSpec(mark, spec);
111198
+ if (spec.type === 'group') {
111199
+ const children = (_c = (_b = (_a = mark).getMarks) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : [];
111200
+ (_d = spec.children) === null || _d === void 0 ? void 0 : _d.forEach((childSpec, index) => {
111201
+ this._updateMarkStyleWithSpec(childSpec, children[index]);
111202
+ });
111203
+ }
111204
+ }
110866
111205
  _getMarkAttributeContext() {
110867
111206
  return {
110868
111207
  vchart: this._option.globalInstance,