@visactor/react-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.
package/build/index.js CHANGED
@@ -61263,6 +61263,15 @@
61263
61263
  compileOnlyKeys: defaultSeriesCompileOnlyCheckKeys,
61264
61264
  dataRelatedKeys: defaultSeriesDataRelatedCheckKeys
61265
61265
  },
61266
+ defaultSeriesMarkCompileOnlySubKeys = {
61267
+ interactive: !0,
61268
+ zIndex: !0,
61269
+ visible: !0,
61270
+ style: !0,
61271
+ state: !0,
61272
+ stateSort: !0,
61273
+ customShape: !0
61274
+ },
61266
61275
  isSpecObject = value => isObject$2(value) && !isArray$1(value) && !isFunction$1(value),
61267
61276
  hasOnlyAllowedSubKeyChanges = (specValue, prevSpecValue, allowedSubKeys) => {
61268
61277
  if (!isSpecObject(specValue) || !isSpecObject(prevSpecValue)) return !1;
@@ -61798,15 +61807,15 @@
61798
61807
  totalLabel: !0
61799
61808
  });
61800
61809
  if (this._compareExtensionMarksSpec(array(spec.extensionMark), array(prevSpec.extensionMark), result), !result.reMake && this._compareLabelSpec(array(spec.label), array(prevSpec.label), result), !result.reMake && this._compareLabelSpec(array(spec.totalLabel), array(prevSpec.totalLabel), result), result.reMake) return result;
61801
- !result.reCompile && this._marks.getMarks().some(m => {
61802
- var _a, _b;
61803
- return ignores[m.name] = !0, (null === (_a = prevSpec[m.name]) || void 0 === _a ? void 0 : _a.visible) !== (null === (_b = spec[m.name]) || void 0 === _b ? void 0 : _b.visible);
61804
- }) && (result.reCompile = !0);
61810
+ const changedMarkCompileOnlyKeys = this.getMarksWithoutRoot().map(m => m.name).filter(name => hasOnlyAllowedSubKeyChanges(spec[name], prevSpec[name], defaultSeriesMarkCompileOnlySubKeys));
61811
+ changedMarkCompileOnlyKeys.forEach(k => {
61812
+ ignores[k] = !0;
61813
+ }), !result.reCompile && changedMarkCompileOnlyKeys.length && (result.reCompile = !0);
61805
61814
  const changedCompileKeys = currentKeys.filter(k => compileCheckKeys[k] && !isEqual(spec[k], prevSpec[k])),
61806
61815
  changedCompileOnlySubKeys = currentKeys.filter(k => compileOnlySubKeys[k] && hasOnlyAllowedSubKeyChanges(spec[k], prevSpec[k], compileOnlySubKeys[k]));
61807
61816
  return changedCompileOnlySubKeys.forEach(k => {
61808
61817
  ignores[k] = !0;
61809
- }), result.reCompile || !changedCompileKeys.length && !changedCompileOnlySubKeys.length || (result.reCompile = !0), changedCompileKeys.some(k => dataRelatedKeys[k]) ? markSeriesCompileEffect(result, !0) : result.reCompile && !(null === (_d = result.effects) || void 0 === _d ? void 0 : _d.series) && (changedCompileKeys.length || changedCompileOnlySubKeys.length) && markSeriesCompileEffect(result), currentKeys.some(k => !ignores[k] && !isEqual(spec[k], prevSpec[k])) ? (result.reMake = !0, result) : result;
61818
+ }), result.reCompile || !changedCompileKeys.length && !changedCompileOnlySubKeys.length || (result.reCompile = !0), changedCompileKeys.some(k => dataRelatedKeys[k]) ? markSeriesCompileEffect(result, !0) : result.reCompile && !(null === (_d = result.effects) || void 0 === _d ? void 0 : _d.series) && (changedCompileKeys.length || changedCompileOnlySubKeys.length || changedMarkCompileOnlyKeys.length) && markSeriesCompileEffect(result), currentKeys.some(k => !ignores[k] && !isEqual(spec[k], prevSpec[k])) ? (result.reMake = !0, result) : result;
61810
61819
  }
61811
61820
  _updateSpecData() {
61812
61821
  !this._rawData || !this._spec.data || this._spec.data instanceof DataView || updateDataViewInData(this._rawData, this._spec.data, !0);
@@ -64967,16 +64976,14 @@
64967
64976
  this._zero && (domain[0] = Math.min(domain[0], 0), domain[domain.length - 1] = Math.max(last(domain), 0));
64968
64977
  }
64969
64978
  setExtendDomain(key, value) {
64970
- if (void 0 === value) return void delete this._extend[key];
64971
- this._extend[key] = value;
64972
- const domain = this._scale.domain();
64973
- if (this.extendDomain(domain), this.includeZero(domain), this.setDomainMinMax(domain), this.niceDomain(domain), this._scale.domain(domain, this._nice), this._nice) {
64974
- !this.setScaleNice() && this._scale.rescale();
64979
+ if (void 0 === value) {
64980
+ if (!Object.prototype.hasOwnProperty.call(this._extend, key)) return;
64981
+ delete this._extend[key];
64982
+ } else {
64983
+ if (this._extend[key] === value) return;
64984
+ this._extend[key] = value;
64975
64985
  }
64976
- this.event.emit(ChartEvent.scaleUpdate, {
64977
- model: this,
64978
- value: "domain"
64979
- });
64986
+ this.updateScaleDomain();
64980
64987
  }
64981
64988
  extendDomain(domain) {
64982
64989
  let temp;
@@ -66733,7 +66740,7 @@
66733
66740
  if (this.updateGlobalScale(result), result.reMake) return this.setLayoutTag(!0, null, !1), result;
66734
66741
  if (this.updateRegionSpec(result), result.reMake) return this.setLayoutTag(!0, null, !1), result;
66735
66742
  const componentUpdateResult = this.updateComponentSpec(result);
66736
- return result.reMake ? (this.setLayoutTag(!0, null, !1), result) : isUpdateSpecResultLocalOnly(result) ? result : onlyComponentSpecsChanged && !componentUpdateResult.hasNonComponentOnlyUpdate && isUpdateSpecResultComponentOnly(result) ? (componentUpdateResult.componentOnlyUpdatedComponents.forEach(component => {
66743
+ return result.reMake ? (this.setLayoutTag(!0, null, !1), result) : isUpdateSpecResultLocalOnly(result) ? result : onlyComponentSpecsChanged && !componentUpdateResult.hasNonComponentOnlyUpdate && (isUpdateSpecResultComponentOnly(result) || this._isComponentScaleDomainOnlyUpdate(result)) ? (componentUpdateResult.componentOnlyUpdatedComponents.forEach(component => {
66737
66744
  component.reInit(component.getSpec());
66738
66745
  }), (null === (_a = result.effects) || void 0 === _a ? void 0 : _a.layout) && this.setLayoutTag(!0, null, !1), result) : (this.setLayoutTag(!0, null, !1), this.updateSeriesSpec(result), result.reMake || (this.reInit(), onlySeriesSpecsChanged && this._canSkipChartDataStages(result) || (this.updateDataSpec(), this.updateGlobalScaleDomain())), result);
66739
66746
  }
@@ -66775,11 +66782,11 @@
66775
66782
  const componentSpec = null !== (_b = cmpSpec[c.getSpecIndex()]) && void 0 !== _b ? _b : {},
66776
66783
  previousComponentSpec = c.getSpec(),
66777
66784
  componentResult = c.updateSpec(componentSpec, cmpSpec);
66778
- isUpdateSpecResultComponentOnly(componentResult) ? componentOnlyUpdatedComponents.push(c) : isEqual(previousComponentSpec, componentSpec) || (hasNonComponentOnlyUpdate = !0), mergeUpdateResult(result, componentResult);
66785
+ isUpdateSpecResultComponentOnly(componentResult) || this._isComponentScaleDomainOnlyUpdate(componentResult) ? componentOnlyUpdatedComponents.push(c) : isEqual(previousComponentSpec, componentSpec) || (hasNonComponentOnlyUpdate = !0), mergeUpdateResult(result, componentResult);
66779
66786
  } else {
66780
66787
  const previousComponentSpec = c.getSpec(),
66781
66788
  componentResult = c.updateSpec(cmpSpec);
66782
- isUpdateSpecResultComponentOnly(componentResult) ? componentOnlyUpdatedComponents.push(c) : isEqual(previousComponentSpec, cmpSpec) || (hasNonComponentOnlyUpdate = !0), mergeUpdateResult(result, componentResult);
66789
+ isUpdateSpecResultComponentOnly(componentResult) || this._isComponentScaleDomainOnlyUpdate(componentResult) ? componentOnlyUpdatedComponents.push(c) : isEqual(previousComponentSpec, cmpSpec) || (hasNonComponentOnlyUpdate = !0), mergeUpdateResult(result, componentResult);
66783
66790
  }
66784
66791
  });
66785
66792
  for (const key in componentCache) if (Object.prototype.hasOwnProperty.call(componentCache, key)) {
@@ -66834,6 +66841,10 @@
66834
66841
  const effects = result.effects;
66835
66842
  return !(!(null == effects ? void 0 : effects.series) || effects.remake || effects.data || effects.scaleDomain || result.reMake);
66836
66843
  }
66844
+ _isComponentScaleDomainOnlyUpdate(result) {
66845
+ const effects = result.effects;
66846
+ return !(!(null == effects ? void 0 : effects.component) || !effects.scaleDomain || result.reMake || result.reCompile || result.reSize || effects.remake || effects.compile || effects.data || effects.series || effects.animation || result.reTransformSpec || result.reAnimate || result.changeTheme || result.changeBackground);
66847
+ }
66837
66848
  _removeMarkerComponentsForEmptySpecs(result) {
66838
66849
  const removedComponents = this._components.filter(component => {
66839
66850
  var _a;
@@ -67263,7 +67274,7 @@
67263
67274
  interactions: chartSpec.interactions
67264
67275
  },
67265
67276
  seriesType = this.seriesType;
67266
- return seriesType && (series.type = seriesType, series[seriesType] = chartSpec[seriesType]), pickKeys && pickKeys.length && pickKeys.forEach(k => {
67277
+ return seriesType && (this._addSeriesRelatedSpecKeys([seriesType]), series.type = seriesType, series[seriesType] = chartSpec[seriesType]), pickKeys && pickKeys.length && pickKeys.forEach(k => {
67267
67278
  series[k] = chartSpec[k];
67268
67279
  }), pickKeys2 && pickKeys2.length && pickKeys2.forEach(k => {
67269
67280
  series[k] = chartSpec[k];
@@ -87224,6 +87235,13 @@
87224
87235
  created() {
87225
87236
  super.created(), this._regions = this._option.getAllRegions(), this._initEvent();
87226
87237
  }
87238
+ _compareSpec(spec, prevSpec) {
87239
+ const result = super._compareSpec(spec, prevSpec);
87240
+ return !!isEqual(prevSpec, spec) || result.reMake || result.reCompile || (result.change = !0, result.reRender = !0, result.effects = Object.assign(Object.assign({}, result.effects), {
87241
+ component: !0,
87242
+ render: !0
87243
+ })), result;
87244
+ }
87227
87245
  release() {
87228
87246
  var _a, _b;
87229
87247
  super.release(), this._isReleased = !0, this._hideTimer && clearTimeout(this._hideTimer), this._eventList.forEach(({
@@ -87415,11 +87433,26 @@
87415
87433
  return t;
87416
87434
  };
87417
87435
  const ORIENT_MAP = {
87418
- x: ["top", "bottom"],
87419
- y: ["left", "right"],
87420
- category: ["angle"],
87421
- value: ["radius"]
87422
- };
87436
+ x: ["top", "bottom"],
87437
+ y: ["left", "right"],
87438
+ category: ["angle"],
87439
+ value: ["radius"]
87440
+ },
87441
+ CROSSHAIR_COMPONENT_ONLY_TOP_LEVEL_CHANGE_KEYS = {
87442
+ labelZIndex: !0,
87443
+ gridZIndex: !0
87444
+ },
87445
+ CROSSHAIR_FIELD_KEYS = {
87446
+ xField: !0,
87447
+ yField: !0,
87448
+ categoryField: !0,
87449
+ valueField: !0
87450
+ },
87451
+ CROSSHAIR_LINE_COMPONENT_ONLY_CHANGE_KEYS = {
87452
+ visible: !0,
87453
+ width: !0,
87454
+ style: !0
87455
+ };
87423
87456
  class BaseCrossHair extends BaseComponent {
87424
87457
  get enableRemain() {
87425
87458
  return "none" === this.triggerOff;
@@ -87547,7 +87580,20 @@
87547
87580
  }
87548
87581
  _compareSpec(spec, prevSpec) {
87549
87582
  const result = super._compareSpec(spec, prevSpec);
87550
- return result.reMake || isEqual(prevSpec, spec) || (result.reRender = !0, result.reMake = !0), result;
87583
+ return !isEqual(prevSpec, spec) && (result.change = !0, result.reRender = !0, result.reMake || (this._isComponentOnlySpecChange(spec, prevSpec) ? result.effects = Object.assign(Object.assign({}, result.effects), {
87584
+ component: !0,
87585
+ layout: !0,
87586
+ render: !0
87587
+ }) : result.reMake = !0)), result;
87588
+ }
87589
+ _isComponentOnlySpecChange(spec, prevSpec) {
87590
+ return Object.keys(Object.assign(Object.assign({}, prevSpec), spec)).every(key => isEqual(null == prevSpec ? void 0 : prevSpec[key], null == spec ? void 0 : spec[key]) || CROSSHAIR_COMPONENT_ONLY_TOP_LEVEL_CHANGE_KEYS[key] || CROSSHAIR_FIELD_KEYS[key] && this._isFieldComponentOnlySpecChange(null == prevSpec ? void 0 : prevSpec[key], null == spec ? void 0 : spec[key]));
87591
+ }
87592
+ _isFieldComponentOnlySpecChange(prevSpec, spec) {
87593
+ return Object.keys(Object.assign(Object.assign({}, prevSpec), spec)).every(key => isEqual(null == prevSpec ? void 0 : prevSpec[key], null == spec ? void 0 : spec[key]) || "label" === key || "line" === key && this._isLineComponentOnlySpecChange(null == prevSpec ? void 0 : prevSpec.line, null == spec ? void 0 : spec.line));
87594
+ }
87595
+ _isLineComponentOnlySpecChange(prevSpec, spec) {
87596
+ return Object.keys(Object.assign(Object.assign({}, prevSpec), spec)).every(key => isEqual(null == prevSpec ? void 0 : prevSpec[key], null == spec ? void 0 : spec[key]) || CROSSHAIR_LINE_COMPONENT_ONLY_CHANGE_KEYS[key]);
87551
87597
  }
87552
87598
  _initEvent() {
87553
87599
  if (!this._option.disableTriggerEvent) if (this._spec.followTooltip) this._registerTooltipEvent();else {
@@ -88764,7 +88810,19 @@
88764
88810
  }
88765
88811
  _compareSpec(spec, prevSpec) {
88766
88812
  const result = super._compareSpec(spec, prevSpec);
88767
- return result.reMake || isEqual(prevSpec, spec) || (result.reRender = !0, result.reMake = !0), result;
88813
+ return result.reMake || isEqual(prevSpec, spec) || (result.change = !0, result.reRender = !0, !result.reCompile && this._isComponentOnlySpecChange(spec, prevSpec) ? result.effects = Object.assign(Object.assign({}, result.effects), {
88814
+ component: !0,
88815
+ layout: !0,
88816
+ render: !0
88817
+ }) : result.reMake = !0), result;
88818
+ }
88819
+ _getComponentOnlySpecKeys() {
88820
+ return null;
88821
+ }
88822
+ _isComponentOnlySpecChange(spec, prevSpec) {
88823
+ const componentOnlySpecKeys = this._getComponentOnlySpecKeys();
88824
+ if (!componentOnlySpecKeys) return !1;
88825
+ return Object.keys(Object.assign(Object.assign({}, prevSpec), spec)).every(key => isEqual(null == prevSpec ? void 0 : prevSpec[key], null == spec ? void 0 : spec[key]) || componentOnlySpecKeys[key]);
88768
88826
  }
88769
88827
  reInit(spec) {
88770
88828
  super.reInit(spec), this._marks.forEach(g => {
@@ -89247,6 +89305,22 @@
89247
89305
  backgroundChart: getBackgroundChartTheme(!0)
89248
89306
  };
89249
89307
 
89308
+ const DATA_ZOOM_COMPONENT_ONLY_CHANGE_KEYS = {
89309
+ width: !0,
89310
+ height: !0,
89311
+ showDetail: !0,
89312
+ middleHandler: !0,
89313
+ background: !0,
89314
+ startHandler: !0,
89315
+ endHandler: !0,
89316
+ startText: !0,
89317
+ endText: !0,
89318
+ dragMask: !0,
89319
+ selectedBackground: !0,
89320
+ backgroundChart: !0,
89321
+ selectedBackgroundChart: !0,
89322
+ showBackgroundChart: !0
89323
+ };
89250
89324
  let DataZoom$1 = class DataZoom extends DataFilterBaseComponent {
89251
89325
  constructor(spec, options) {
89252
89326
  var _a;
@@ -89312,6 +89386,9 @@
89312
89386
  const axis = this._relatedAxisComponent;
89313
89387
  (isReverse(axis, this._isHorizontal) && !this._isReverseCache || this._auto) && (this._isReverseCache = isReverse(axis, this._isHorizontal), this.effect.onZoomChange());
89314
89388
  }
89389
+ _getComponentOnlySpecKeys() {
89390
+ return DATA_ZOOM_COMPONENT_ONLY_CHANGE_KEYS;
89391
+ }
89315
89392
  clear() {
89316
89393
  if (this._component) {
89317
89394
  const container = this.getContainer();
@@ -89588,6 +89665,15 @@
89588
89665
  }
89589
89666
  };
89590
89667
 
89668
+ const SCROLL_BAR_COMPONENT_ONLY_CHANGE_KEYS = {
89669
+ width: !0,
89670
+ height: !0,
89671
+ rail: !0,
89672
+ slider: !0,
89673
+ round: !0,
89674
+ innerPadding: !0,
89675
+ minSliderSize: !0
89676
+ };
89591
89677
  let ScrollBar$1 = class ScrollBar extends DataFilterBaseComponent {
89592
89678
  constructor(spec, options) {
89593
89679
  var _a;
@@ -89620,6 +89706,9 @@
89620
89706
  this._data.getDataView().reRunAllTransform();
89621
89707
  }
89622
89708
  }
89709
+ _getComponentOnlySpecKeys() {
89710
+ return SCROLL_BAR_COMPONENT_ONLY_CHANGE_KEYS;
89711
+ }
89623
89712
  _beforeLayoutEnd() {
89624
89713
  var _a, _b;
89625
89714
  super._beforeLayoutEnd(), null === (_b = (_a = this.effect).onZoomChange) || void 0 === _b || _b.call(_a);
@@ -89763,6 +89852,14 @@
89763
89852
  setAttrFromSpec() {
89764
89853
  super.setAttrFromSpec(), this._gap = this._spec.gap || 0, this._title = this._spec.title, this._content = array(this._spec.content), this._regions = this._option.getRegionsInUserIdOrIndex(array(this._spec.regionId), array(this._spec.regionIndex));
89765
89854
  }
89855
+ _compareSpec(spec, prevSpec) {
89856
+ const result = super._compareSpec(spec, prevSpec);
89857
+ return !!isEqual(prevSpec, spec) || result.reMake || result.reCompile || (result.change = !0, result.reRender = !0, result.effects = Object.assign(Object.assign({}, result.effects), {
89858
+ component: !0,
89859
+ layout: !0,
89860
+ render: !0
89861
+ })), result;
89862
+ }
89766
89863
  initEvent() {
89767
89864
  if (this._option.disableTriggerEvent) return;
89768
89865
  "none" !== this._spec.trigger && ("hover" === this._spec.trigger ? (this.event.on("element-highlight:start", params => {
@@ -89921,35 +90018,38 @@
89921
90018
  max = maxInArray(domainNum);
89922
90019
  return datum < min || datum > max;
89923
90020
  }
89924
- function getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint) {
90021
+ function getAutoRangeExtendDomainKey(keyPrefix, axisKey) {
90022
+ return keyPrefix ? `${keyPrefix}_${axisKey}_extend` : `marker_${axisKey}_extend`;
90023
+ }
90024
+ function getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint, autoRangeExtendDomainKeyPrefix) {
89925
90025
  var _a, _b;
89926
90026
  const {
89927
90027
  relativeSeries: relativeSeries
89928
90028
  } = refSeries;
89929
90029
  let x;
89930
- return isNumber$2(datum.x) && isNeedExtendDomain(xDomain, datum.x, autoRange) && (null === (_b = null == relativeSeries ? void 0 : (_a = relativeSeries.getXAxisHelper()).setExtendDomain) || void 0 === _b || _b.call(_a, "marker_xAxis_extend", datum.x)), x = isPercent(datum.x) ? convertPercentToValue(datum.x, regionWidth) + regionStartLayoutStartPoint.x : convertDatumToValue(relativeSeries.getXAxisHelper(), [datum.x]) + regionStartLayoutStartPoint.x, x;
90030
+ return isNumber$2(datum.x) && isNeedExtendDomain(xDomain, datum.x, autoRange) && (null === (_b = null == relativeSeries ? void 0 : (_a = relativeSeries.getXAxisHelper()).setExtendDomain) || void 0 === _b || _b.call(_a, getAutoRangeExtendDomainKey(autoRangeExtendDomainKeyPrefix, "xAxis"), datum.x)), x = isPercent(datum.x) ? convertPercentToValue(datum.x, regionWidth) + regionStartLayoutStartPoint.x : convertDatumToValue(relativeSeries.getXAxisHelper(), [datum.x]) + regionStartLayoutStartPoint.x, x;
89931
90031
  }
89932
- function getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint) {
90032
+ function getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint, autoRangeExtendDomainKeyPrefix) {
89933
90033
  var _a, _b;
89934
90034
  const {
89935
90035
  relativeSeries: relativeSeries
89936
90036
  } = refSeries;
89937
90037
  let y;
89938
- return isNumber$2(datum.y) && isNeedExtendDomain(yDomain, datum.y, autoRange) && (null === (_b = null === (_a = relativeSeries.getYAxisHelper()) || void 0 === _a ? void 0 : _a.setExtendDomain) || void 0 === _b || _b.call(_a, "marker_yAxis_extend", datum.y)), y = isPercent(datum.y) ? convertPercentToValue(datum.y, regionHeight) + regionStartLayoutStartPoint.y : convertDatumToValue(relativeSeries.getYAxisHelper(), [datum.y]) + regionStartLayoutStartPoint.y, y;
90038
+ return isNumber$2(datum.y) && isNeedExtendDomain(yDomain, datum.y, autoRange) && (null === (_b = null === (_a = relativeSeries.getYAxisHelper()) || void 0 === _a ? void 0 : _a.setExtendDomain) || void 0 === _b || _b.call(_a, getAutoRangeExtendDomainKey(autoRangeExtendDomainKeyPrefix, "yAxis"), datum.y)), y = isPercent(datum.y) ? convertPercentToValue(datum.y, regionHeight) + regionStartLayoutStartPoint.y : convertDatumToValue(relativeSeries.getYAxisHelper(), [datum.y]) + regionStartLayoutStartPoint.y, y;
89939
90039
  }
89940
- function getAngleValue(datum, angleDomain, autoRange, refSeries) {
90040
+ function getAngleValue(datum, angleDomain, autoRange, refSeries, autoRangeExtendDomainKeyPrefix) {
89941
90041
  var _a, _b;
89942
90042
  const {
89943
90043
  relativeSeries: relativeSeries
89944
90044
  } = refSeries;
89945
- return isNumber$2(datum.angle) && isNeedExtendDomain(angleDomain, datum.angle, autoRange) && (null === (_b = null === (_a = relativeSeries.angleAxisHelper) || void 0 === _a ? void 0 : _a.setExtendDomain) || void 0 === _b || _b.call(_a, "marker_angleAxis_extend", datum.angle)), convertDatumToValue(relativeSeries.angleAxisHelper, [datum.angle]);
90045
+ return isNumber$2(datum.angle) && isNeedExtendDomain(angleDomain, datum.angle, autoRange) && (null === (_b = null === (_a = relativeSeries.angleAxisHelper) || void 0 === _a ? void 0 : _a.setExtendDomain) || void 0 === _b || _b.call(_a, getAutoRangeExtendDomainKey(autoRangeExtendDomainKeyPrefix, "angleAxis"), datum.angle)), convertDatumToValue(relativeSeries.angleAxisHelper, [datum.angle]);
89946
90046
  }
89947
- function getRadiusValue(datum, radiusDomain, autoRange, refSeries) {
90047
+ function getRadiusValue(datum, radiusDomain, autoRange, refSeries, autoRangeExtendDomainKeyPrefix) {
89948
90048
  var _a, _b;
89949
90049
  const {
89950
90050
  relativeSeries: relativeSeries
89951
90051
  } = refSeries;
89952
- return isNumber$2(datum.radius) && isNeedExtendDomain(radiusDomain, datum.radius, autoRange) && (null === (_b = null === (_a = relativeSeries.radiusAxisHelper) || void 0 === _a ? void 0 : _a.setExtendDomain) || void 0 === _b || _b.call(_a, "marker_radiusAxis_extend", datum.radius)), convertDatumToValue(relativeSeries.radiusAxisHelper, [datum.radius]);
90052
+ return isNumber$2(datum.radius) && isNeedExtendDomain(radiusDomain, datum.radius, autoRange) && (null === (_b = null === (_a = relativeSeries.radiusAxisHelper) || void 0 === _a ? void 0 : _a.setExtendDomain) || void 0 === _b || _b.call(_a, getAutoRangeExtendDomainKey(autoRangeExtendDomainKeyPrefix, "radiusAxis"), datum.radius)), convertDatumToValue(relativeSeries.radiusAxisHelper, [datum.radius]);
89953
90053
  }
89954
90054
  function convertPercentToValue(percent, relativeLength) {
89955
90055
  return Number(percent.substring(0, percent.length - 1)) * relativeLength / 100;
@@ -89961,7 +90061,7 @@
89961
90061
  function isAggrSpec(spec) {
89962
90062
  return AGGR_TYPE.includes(spec);
89963
90063
  }
89964
- function xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand = !1) {
90064
+ function xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand = !1, autoRangeExtendDomainKeyPrefix) {
89965
90065
  const regionStart = startRelativeSeries.getRegion(),
89966
90066
  regionStartLayoutStartPoint = regionStart.getLayoutStartPoint(),
89967
90067
  regionEnd = endRelativeSeries.getRegion(),
@@ -89993,11 +90093,11 @@
89993
90093
  const isValidX = isValid$1(datum.x),
89994
90094
  isValidY = isValid$1(datum.y);
89995
90095
  let x, y;
89996
- if (isValidX && isValidY) x = getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint), y = getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint), setTempWithValid(x, isXExpand, xTemp, lines.length), setTempWithValid(y, isyExpand, yTemp, lines.length), lines.push([{
90096
+ if (isValidX && isValidY) x = getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint, autoRangeExtendDomainKeyPrefix), y = getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint, autoRangeExtendDomainKeyPrefix), setTempWithValid(x, isXExpand, xTemp, lines.length), setTempWithValid(y, isyExpand, yTemp, lines.length), lines.push([{
89997
90097
  x: x,
89998
90098
  y: y
89999
90099
  }]);else if (isValidX) {
90000
- x = getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint), y = Math.max(regionStartLayoutStartPoint.y + regionStart.getLayoutRect().height, regionEndLayoutStartPoint.y + regionEnd.getLayoutRect().height);
90100
+ x = getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint, autoRangeExtendDomainKeyPrefix), y = Math.max(regionStartLayoutStartPoint.y + regionStart.getLayoutRect().height, regionEndLayoutStartPoint.y + regionEnd.getLayoutRect().height);
90001
90101
  const y1 = Math.min(regionStartLayoutStartPoint.y, regionEndLayoutStartPoint.y);
90002
90102
  setTempWithValid(x, isXExpand, xTemp, lines.length), lines.push([{
90003
90103
  x: x,
@@ -90007,7 +90107,7 @@
90007
90107
  y: y1
90008
90108
  }]);
90009
90109
  } else if (isValidY) {
90010
- x = Math.min(regionStartLayoutStartPoint.x, regionEndLayoutStartPoint.x), y = getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint);
90110
+ x = Math.min(regionStartLayoutStartPoint.x, regionEndLayoutStartPoint.x), y = getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint, autoRangeExtendDomainKeyPrefix);
90011
90111
  const x1 = Math.max(regionStartLayoutStartPoint.x + regionStart.getLayoutRect().width, regionEndLayoutStartPoint.x + regionEnd.getLayoutRect().width);
90012
90112
  setTempWithValid(y, isyExpand, yTemp, lines.length), lines.push([{
90013
90113
  x: x,
@@ -90038,7 +90138,7 @@
90038
90138
  index: index
90039
90139
  })), v;
90040
90140
  }
90041
- function polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange) {
90141
+ function polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, autoRangeExtendDomainKeyPrefix) {
90042
90142
  const refSeries = {
90043
90143
  relativeSeries: relativeSeries,
90044
90144
  startRelativeSeries: startRelativeSeries,
@@ -90053,14 +90153,14 @@
90053
90153
  const isValidAngle = isValid$1(datum.angle),
90054
90154
  isValidRadius = isValid$1(datum.radius);
90055
90155
  if (isValidAngle && isValidRadius) {
90056
- const angle = getAngleValue(datum, angleDomain, autoRange, refSeries),
90057
- radius = getRadiusValue(datum, radiusDomain, autoRange, refSeries);
90156
+ const angle = getAngleValue(datum, angleDomain, autoRange, refSeries, autoRangeExtendDomainKeyPrefix),
90157
+ radius = getRadiusValue(datum, radiusDomain, autoRange, refSeries, autoRangeExtendDomainKeyPrefix);
90058
90158
  lines.push([{
90059
90159
  angle: angle,
90060
90160
  radius: radius
90061
90161
  }]);
90062
90162
  } else if (isValidAngle) {
90063
- const angle = getAngleValue(datum, angleDomain, autoRange, refSeries);
90163
+ const angle = getAngleValue(datum, angleDomain, autoRange, refSeries, autoRangeExtendDomainKeyPrefix);
90064
90164
  lines.push([{
90065
90165
  angle: angle,
90066
90166
  radius: -regionRadius
@@ -90069,7 +90169,7 @@
90069
90169
  radius: regionRadius
90070
90170
  }]);
90071
90171
  } else if (isValidRadius) {
90072
- const radius = getRadiusValue(datum, radiusDomain, autoRange, refSeries);
90172
+ const radius = getRadiusValue(datum, radiusDomain, autoRange, refSeries, autoRangeExtendDomainKeyPrefix);
90073
90173
  lines.push([{
90074
90174
  radius: radius,
90075
90175
  angle: 0
@@ -90089,7 +90189,7 @@
90089
90189
  }]);
90090
90190
  }), lines;
90091
90191
  }
90092
- function cartesianCoordinateLayout(data, relativeSeries, autoRange, coordinatesOffset) {
90192
+ function cartesianCoordinateLayout(data, relativeSeries, autoRange, coordinatesOffset, autoRangeExtendDomainKeyPrefix) {
90093
90193
  const points = [],
90094
90194
  dataPoints = data.latestData[0] && data.latestData[0].latestData ? data.latestData[0].latestData : data.latestData,
90095
90195
  isArrayCoordinatesOffset = isArray$1(coordinatesOffset);
@@ -90114,13 +90214,13 @@
90114
90214
  yDomain = refRelativeSeries.getYAxisHelper().getScale(0).domain(),
90115
90215
  xValue = array(datum.x),
90116
90216
  yValue = array(datum.y);
90117
- 1 === xValue.length && isNumber$2(xValue[0]) && isNeedExtendDomain(xDomain, xValue[0], autoRange) && (null === (_b = null === (_a = refRelativeSeries.getXAxisHelper()) || void 0 === _a ? void 0 : _a.setExtendDomain) || void 0 === _b || _b.call(_a, "marker_xAxis_extend", xValue[0])), 1 === yValue.length && isNumber$2(yValue[0]) && isNeedExtendDomain(yDomain, yValue[0], autoRange) && (null === (_d = null === (_c = refRelativeSeries.getYAxisHelper()) || void 0 === _c ? void 0 : _c.setExtendDomain) || void 0 === _d || _d.call(_c, "marker_yAxis_extend", yValue[0])), points.push({
90217
+ 1 === xValue.length && isNumber$2(xValue[0]) && isNeedExtendDomain(xDomain, xValue[0], autoRange) && (null === (_b = null === (_a = refRelativeSeries.getXAxisHelper()) || void 0 === _a ? void 0 : _a.setExtendDomain) || void 0 === _b || _b.call(_a, getAutoRangeExtendDomainKey(autoRangeExtendDomainKeyPrefix, "xAxis"), xValue[0])), 1 === yValue.length && isNumber$2(yValue[0]) && isNeedExtendDomain(yDomain, yValue[0], autoRange) && (null === (_d = null === (_c = refRelativeSeries.getYAxisHelper()) || void 0 === _c ? void 0 : _c.setExtendDomain) || void 0 === _d || _d.call(_c, getAutoRangeExtendDomainKey(autoRangeExtendDomainKeyPrefix, "yAxis"), yValue[0])), points.push({
90118
90218
  x: convertDatumToValue(refRelativeSeries.getXAxisHelper(), xValue) + regionStartLayoutStartPoint.x + offsetX,
90119
90219
  y: convertDatumToValue(refRelativeSeries.getYAxisHelper(), yValue) + regionStartLayoutStartPoint.y + offsetY
90120
90220
  });
90121
90221
  }), points;
90122
90222
  }
90123
- function polarCoordinateLayout(data, relativeSeries, autoRange) {
90223
+ function polarCoordinateLayout(data, relativeSeries, autoRange, autoRangeExtendDomainKeyPrefix) {
90124
90224
  const points = [];
90125
90225
  return (data.latestData[0] && data.latestData[0].latestData ? data.latestData[0].latestData : data.latestData).forEach(datum => {
90126
90226
  var _a, _b, _c, _d;
@@ -90129,7 +90229,7 @@
90129
90229
  radiusDomain = refRelativeSeries.radiusAxisHelper.getScale(0).domain(),
90130
90230
  angleValue = array(datum.angle),
90131
90231
  radiusValue = array(datum.radius);
90132
- 1 === angleValue.length && isNumber$2(angleValue[0]) && isNeedExtendDomain(angleDomain, angleValue[0], autoRange) && (null === (_b = null === (_a = refRelativeSeries.angleAxisHelper) || void 0 === _a ? void 0 : _a.setExtendDomain) || void 0 === _b || _b.call(_a, "marker_xAxis_extend", angleValue[0])), 1 === radiusValue.length && isNumber$2(radiusValue[0]) && isNeedExtendDomain(radiusDomain, radiusValue[0], autoRange) && (null === (_d = null === (_c = refRelativeSeries.radiusAxisHelper) || void 0 === _c ? void 0 : _c.setExtendDomain) || void 0 === _d || _d.call(_c, "marker_yAxis_extend", radiusValue[0])), points.push({
90232
+ 1 === angleValue.length && isNumber$2(angleValue[0]) && isNeedExtendDomain(angleDomain, angleValue[0], autoRange) && (null === (_b = null === (_a = refRelativeSeries.angleAxisHelper) || void 0 === _a ? void 0 : _a.setExtendDomain) || void 0 === _b || _b.call(_a, getAutoRangeExtendDomainKey(autoRangeExtendDomainKeyPrefix, "angleAxis"), angleValue[0])), 1 === radiusValue.length && isNumber$2(radiusValue[0]) && isNeedExtendDomain(radiusDomain, radiusValue[0], autoRange) && (null === (_d = null === (_c = refRelativeSeries.radiusAxisHelper) || void 0 === _c ? void 0 : _c.setExtendDomain) || void 0 === _d || _d.call(_c, getAutoRangeExtendDomainKey(autoRangeExtendDomainKeyPrefix, "radiusAxis"), radiusValue[0])), points.push({
90133
90233
  angle: convertDatumToValue(refRelativeSeries.angleAxisHelper, angleValue),
90134
90234
  radius: convertDatumToValue(refRelativeSeries.radiusAxisHelper, radiusValue)
90135
90235
  });
@@ -90574,6 +90674,31 @@
90574
90674
  collectReleaseDependencies(dataView), releaseDataViews([dataView, ...releaseDependencies]);
90575
90675
  };
90576
90676
 
90677
+ const MARKER_FORMAT_METHOD_PLACEHOLDER = "__vchart_marker_format_method__",
90678
+ MARKER_COORDINATE_PLACEHOLDER = "__vchart_marker_coordinate__",
90679
+ MARKER_TEXT_PLACEHOLDER = "__vchart_marker_text__",
90680
+ MARKER_AUTO_RANGE_PLACEHOLDER = "__vchart_marker_auto_range__",
90681
+ MARKER_DOMAIN_POSITION_SPEC_KEYS = ["coordinate", "coordinates", "x", "y", "x1", "y1", "angle", "angle1", "radius", "radius1"],
90682
+ MARKER_LAYOUT_POSITION_SPEC_KEYS = ["position", "positions", "coordinatesOffset", "regionRelative"],
90683
+ normalizeMarkerLabelFormatMethod = label => Array.isArray(label) ? label.map(normalizeMarkerLabelFormatMethod) : label && "object" == typeof label ? "function" != typeof label.formatMethod ? label : Object.assign(Object.assign({}, label), {
90684
+ formatMethod: MARKER_FORMAT_METHOD_PLACEHOLDER
90685
+ }) : label,
90686
+ normalizeMarkerSpecForComponentOnlyUpdate = (spec, options) => {
90687
+ var _a;
90688
+ if (!spec || "object" != typeof spec) return spec;
90689
+ const normalized = Object.assign({}, spec);
90690
+ options.normalizeDomainPosition && MARKER_DOMAIN_POSITION_SPEC_KEYS.forEach(key => {
90691
+ key in normalized && (normalized[key] = MARKER_COORDINATE_PLACEHOLDER);
90692
+ }), options.normalizeAutoRange && "autoRange" in normalized && (normalized.autoRange = MARKER_AUTO_RANGE_PLACEHOLDER), MARKER_LAYOUT_POSITION_SPEC_KEYS.forEach(key => {
90693
+ key in normalized && (normalized[key] = MARKER_COORDINATE_PLACEHOLDER);
90694
+ }), "label" in normalized && (normalized.label = normalizeMarkerLabelFormatMethod(normalized.label));
90695
+ const text = null === (_a = normalized.itemContent) || void 0 === _a ? void 0 : _a.text;
90696
+ return text && "object" == typeof text && (normalized.itemContent = Object.assign(Object.assign({}, normalized.itemContent), {
90697
+ text: Object.assign(Object.assign({}, normalizeMarkerLabelFormatMethod(text)), {
90698
+ text: MARKER_TEXT_PLACEHOLDER
90699
+ })
90700
+ })), normalized;
90701
+ };
90577
90702
  class BaseMarker extends BaseComponent {
90578
90703
  constructor() {
90579
90704
  super(...arguments), this.layoutType = "none", this._markerDataChangeHandler = null, this._markerDataOwned = !1, this._layoutOffsetX = 0, this._layoutOffsetY = 0;
@@ -90611,6 +90736,22 @@
90611
90736
  getEndRelativeSeries: () => this._endRelativeSeries
90612
90737
  };
90613
90738
  }
90739
+ _getAutoRangeExtendDomainKeyPrefix() {
90740
+ return `marker_${this.type}_${this.id}`;
90741
+ }
90742
+ _getAutoRangeExtendDomainKey(axisKey) {
90743
+ return `${this._getAutoRangeExtendDomainKeyPrefix()}_${axisKey}_extend`;
90744
+ }
90745
+ _clearAutoRangeExtendDomain() {
90746
+ var _a, _b;
90747
+ array(null === (_b = (_a = this._option).getAllSeries) || void 0 === _b ? void 0 : _b.call(_a)).forEach(series => {
90748
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
90749
+ null === (_c = null === (_b = null === (_a = null == series ? void 0 : series.getXAxisHelper) || void 0 === _a ? void 0 : _a.call(series)) || void 0 === _b ? void 0 : _b.setExtendDomain) || void 0 === _c || _c.call(_b, this._getAutoRangeExtendDomainKey("xAxis"), void 0), null === (_f = null === (_e = null === (_d = null == series ? void 0 : series.getYAxisHelper) || void 0 === _d ? void 0 : _d.call(series)) || void 0 === _e ? void 0 : _e.setExtendDomain) || void 0 === _f || _f.call(_e, this._getAutoRangeExtendDomainKey("yAxis"), void 0), null === (_h = null === (_g = null == series ? void 0 : series.angleAxisHelper) || void 0 === _g ? void 0 : _g.setExtendDomain) || void 0 === _h || _h.call(_g, this._getAutoRangeExtendDomainKey("angleAxis"), void 0), null === (_k = null === (_j = null == series ? void 0 : series.radiusAxisHelper) || void 0 === _j ? void 0 : _j.setExtendDomain) || void 0 === _k || _k.call(_j, this._getAutoRangeExtendDomainKey("radiusAxis"), void 0);
90750
+ });
90751
+ }
90752
+ _updateMarkerLayout() {
90753
+ this._clearAutoRangeExtendDomain(), this._markerLayout();
90754
+ }
90614
90755
  _getFieldInfoFromSpec(dim, spec, relativeSeries) {
90615
90756
  const specKeyByDim = {
90616
90757
  x: "xField",
@@ -90656,7 +90797,7 @@
90656
90797
  _bindMarkerDataChange() {
90657
90798
  var _a;
90658
90799
  (null === (_a = this._markerData) || void 0 === _a ? void 0 : _a.target) && (this._markerDataChangeHandler = () => {
90659
- this._markerLayout();
90800
+ this._updateMarkerLayout();
90660
90801
  }, this._markerData.target.on("change", this._markerDataChangeHandler));
90661
90802
  }
90662
90803
  _releaseMarkerData() {
@@ -90672,7 +90813,7 @@
90672
90813
  this._delegateEvent(this._markerComponent, event, type, null, this.getMarkerData.bind(this));
90673
90814
  });
90674
90815
  }
90675
- this._markerLayout();
90816
+ this._updateMarkerLayout();
90676
90817
  }
90677
90818
  super.updateLayoutAttribute();
90678
90819
  }
@@ -90686,7 +90827,7 @@
90686
90827
  this._relativeSeries = this._getSeriesByIdOrIndex(spec.relativeSeriesId, spec.relativeSeriesIndex), this._startRelativeSeries = this._getSeriesByIdOrIndex(spec.startRelativeSeriesId, spec.startRelativeSeriesIndex), this._endRelativeSeries = this._getSeriesByIdOrIndex(spec.endRelativeSeriesId, spec.endRelativeSeriesIndex), spec.specifiedDataSeriesIndex && "all" === spec.specifiedDataSeriesIndex || spec.specifiedDataSeriesId && "all" === spec.specifiedDataSeriesId ? this._specifiedDataSeries = this._option.getAllSeries() : (spec.specifiedDataSeriesIndex || spec.specifiedDataSeriesId) && (this._specifiedDataSeries = this._getSeriesByIdOrIndex(spec.specifiedDataSeriesId, spec.specifiedDataSeriesIndex));
90687
90828
  }
90688
90829
  initEvent() {
90689
- "cartesian" !== this._relativeSeries.coordinate && (this._relativeSeries.event.on("zoom", this._markerLayout.bind(this)), this._relativeSeries.event.on("panmove", this._markerLayout.bind(this)), this._relativeSeries.event.on("scroll", this._markerLayout.bind(this)));
90830
+ "cartesian" !== this._relativeSeries.coordinate && (this._relativeSeries.event.on("zoom", this._updateMarkerLayout.bind(this)), this._relativeSeries.event.on("panmove", this._updateMarkerLayout.bind(this)), this._relativeSeries.event.on("scroll", this._updateMarkerLayout.bind(this)));
90690
90831
  }
90691
90832
  clear() {
90692
90833
  super.clear(), this._markerComponent = null, this._firstSeries = null;
@@ -90708,14 +90849,43 @@
90708
90849
  }
90709
90850
  _compareSpec(spec, prevSpec) {
90710
90851
  const result = super._compareSpec(spec, prevSpec);
90711
- return isEqual(prevSpec, spec) || (result.reRender = !0, result.reMake = !0, result.change = !0), result;
90852
+ return isEqual(prevSpec, spec) || (result.reRender = !0, result.change = !0, result.reMake || result.reCompile || !this._isComponentOnlySpecChange(spec, prevSpec) ? result.reMake || result.reCompile || !this._isAutoRangeSpecChange(spec, prevSpec) ? result.reMake = !0 : result.effects = Object.assign(Object.assign({}, result.effects), {
90853
+ component: !0,
90854
+ scaleDomain: !0,
90855
+ layout: !0,
90856
+ render: !0
90857
+ }) : result.effects = Object.assign(Object.assign({}, result.effects), {
90858
+ component: !0,
90859
+ layout: !0,
90860
+ render: !0
90861
+ })), result;
90862
+ }
90863
+ _isComponentOnlySpecChange(spec, prevSpec) {
90864
+ const normalizeDomainPosition = !(null == spec ? void 0 : spec.autoRange) && !(null == prevSpec ? void 0 : prevSpec.autoRange);
90865
+ return isEqual(normalizeMarkerSpecForComponentOnlyUpdate(prevSpec, {
90866
+ normalizeDomainPosition: normalizeDomainPosition
90867
+ }), normalizeMarkerSpecForComponentOnlyUpdate(spec, {
90868
+ normalizeDomainPosition: normalizeDomainPosition
90869
+ }));
90870
+ }
90871
+ _isAutoRangeSpecChange(spec, prevSpec) {
90872
+ return !(!(null == spec ? void 0 : spec.autoRange) && !(null == prevSpec ? void 0 : prevSpec.autoRange)) && isEqual(normalizeMarkerSpecForComponentOnlyUpdate(prevSpec, {
90873
+ normalizeDomainPosition: !0,
90874
+ normalizeAutoRange: !0
90875
+ }), normalizeMarkerSpecForComponentOnlyUpdate(spec, {
90876
+ normalizeDomainPosition: !0,
90877
+ normalizeAutoRange: !0
90878
+ }));
90879
+ }
90880
+ reInit(spec) {
90881
+ super.reInit(spec), this._bindSeries(), this._initDataView(), this._buildMarkerAttributeContext(), this._markerComponent && this._updateMarkerLayout();
90712
90882
  }
90713
90883
  _initCommonDataView() {
90714
90884
  const {
90715
90885
  options: options
90716
90886
  } = this._computeOptions(),
90717
90887
  seriesData = this._getRelativeDataView();
90718
- registerDataSetInstanceTransform(this._option.dataSet, "markerAggregation", markerAggregation), registerDataSetInstanceTransform(this._option.dataSet, "markerFilter", markerFilter);
90888
+ registerDataSetInstanceTransform(this._option.dataSet, "markerAggregation", markerAggregation), registerDataSetInstanceTransform(this._option.dataSet, "markerFilter", markerFilter), this._releaseMarkerData();
90719
90889
  const data = new DataView(this._option.dataSet, {
90720
90890
  name: `${this.type}_${this.id}_data`
90721
90891
  });
@@ -90986,9 +91156,9 @@
90986
91156
  } = getMarkLineProcessInfo(spec);
90987
91157
  let points = [];
90988
91158
  if (doXProcess || doXYY1Process || doYProcess || doYXX1Process || doXYProcess || isValidCoordinates && isValidProcessX || isValidCoordinates && isValidProcessY) {
90989
- const xyPoints = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange);
91159
+ const xyPoints = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, !1, this._getAutoRangeExtendDomainKeyPrefix());
90990
91160
  points = 1 === xyPoints.length ? xyPoints[0] : xyPoints.map(point => point[0]);
90991
- } else doCoordinatesProcess ? points = cartesianCoordinateLayout(data, relativeSeries, autoRange, spec.coordinatesOffset) : isPositionLayout && (points = positionLayout(spec.positions, relativeSeries, spec.regionRelative));
91161
+ } else doCoordinatesProcess ? points = cartesianCoordinateLayout(data, relativeSeries, autoRange, spec.coordinatesOffset, this._getAutoRangeExtendDomainKeyPrefix()) : isPositionLayout && (points = positionLayout(spec.positions, relativeSeries, spec.regionRelative));
90992
91162
  return {
90993
91163
  points: points
90994
91164
  };
@@ -91198,7 +91368,7 @@
91198
91368
  y: this._relativeSeries.getRegion().getLayoutStartPoint().y + this._relativeSeries.angleAxisHelper.center().y
91199
91369
  };
91200
91370
  if (doAngleProcess || doRadiusProcess || doAngRadRad1Process || doRadAngAng1Process || doRadAngProcess) {
91201
- const polarPoints = polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange);
91371
+ const polarPoints = polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, this._getAutoRangeExtendDomainKeyPrefix());
91202
91372
  points = 1 === polarPoints.length ? polarPoints[0] : polarPoints.map(point => point[0]), pointsAttr = points[0].radius === points[1].radius ? {
91203
91373
  radius: points[0].radius,
91204
91374
  startAngle: points[0].angle,
@@ -91207,7 +91377,7 @@
91207
91377
  } : {
91208
91378
  points: points.map(point => polarToCartesian(center, point.radius, point.angle))
91209
91379
  };
91210
- } else doCoordinatesProcess && (points = polarCoordinateLayout(data, relativeSeries, autoRange), pointsAttr = {
91380
+ } else doCoordinatesProcess && (points = polarCoordinateLayout(data, relativeSeries, autoRange, this._getAutoRangeExtendDomainKeyPrefix()), pointsAttr = {
91211
91381
  points: points.map(point => polarToCartesian(center, point.radius, point.angle))
91212
91382
  });
91213
91383
  return pointsAttr;
@@ -91572,7 +91742,7 @@
91572
91742
  let points = [],
91573
91743
  lines = [];
91574
91744
  if (doXYProcess) {
91575
- lines = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand);
91745
+ lines = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand, this._getAutoRangeExtendDomainKeyPrefix());
91576
91746
  const [start, end] = lines;
91577
91747
  start && start.length && end && end.length && (points = [{
91578
91748
  x: start[0].x,
@@ -91582,10 +91752,10 @@
91582
91752
  y: start[0].y
91583
91753
  }, end[0]]);
91584
91754
  } else if (doXProcess || doYProcess) {
91585
- lines = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand);
91755
+ lines = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand, this._getAutoRangeExtendDomainKeyPrefix());
91586
91756
  const [start, end] = lines;
91587
91757
  start && start.length && end && end.length && (points = [...start, end[1], end[0]]);
91588
- } else doCoordinatesProcess ? points = cartesianCoordinateLayout(data, relativeSeries, autoRange, spec.coordinatesOffset) : isPositionLayout && (points = positionLayout(spec.positions, relativeSeries, spec.regionRelative));
91758
+ } else doCoordinatesProcess ? points = cartesianCoordinateLayout(data, relativeSeries, autoRange, spec.coordinatesOffset, this._getAutoRangeExtendDomainKeyPrefix()) : isPositionLayout && (points = positionLayout(spec.positions, relativeSeries, spec.regionRelative));
91589
91759
  return {
91590
91760
  points: points
91591
91761
  };
@@ -91668,7 +91838,7 @@
91668
91838
  y: this._relativeSeries.getRegion().getLayoutStartPoint().y + this._relativeSeries.angleAxisHelper.center().y
91669
91839
  };
91670
91840
  if (doAngleProcess || doRadiusProcess || doRadAngProcess) {
91671
- const polarLines = polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange);
91841
+ const polarLines = polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, this._getAutoRangeExtendDomainKeyPrefix());
91672
91842
  doRadAngProcess ? pointsAttr = {
91673
91843
  innerRadius: polarLines[0][0].radius,
91674
91844
  outerRadius: polarLines[1][0].radius,
@@ -91688,7 +91858,7 @@
91688
91858
  endAngle: polarLines[1][1].angle,
91689
91859
  center: center
91690
91860
  });
91691
- } else doCoordinatesProcess && (points = polarCoordinateLayout(data, relativeSeries, autoRange), pointsAttr = {
91861
+ } else doCoordinatesProcess && (points = polarCoordinateLayout(data, relativeSeries, autoRange, this._getAutoRangeExtendDomainKeyPrefix()), pointsAttr = {
91692
91862
  points: points.map(point => polarToCartesian(center, point.radius, point.angle))
91693
91863
  });
91694
91864
  return pointsAttr;
@@ -92000,6 +92170,15 @@
92000
92170
  var _a, _b, _c, _d, _e, _f, _g, _h;
92001
92171
  super.setAttrFromSpec(), this._orient = null !== (_a = this._spec.orient) && void 0 !== _a ? _a : "bottom", this._specs = null !== (_b = this._spec.specs) && void 0 !== _b ? _b : [], this._direction = null !== (_c = this._spec.direction) && void 0 !== _c ? _c : "default", this._alternate = null !== (_d = this._spec.alternate) && void 0 !== _d && _d, this._dx = null !== (_e = this._spec.dx) && void 0 !== _e ? _e : 0, this._dy = null !== (_f = this._spec.dy) && void 0 !== _f ? _f : 0, this._position = null !== (_g = this._spec.position) && void 0 !== _g ? _g : "middle", this._visible = null === (_h = this._spec.visible) || void 0 === _h || _h;
92002
92172
  }
92173
+ _compareSpec(spec, prevSpec) {
92174
+ const result = super._compareSpec(spec, prevSpec),
92175
+ specChanged = !isEqual(prevSpec, spec);
92176
+ return (null == prevSpec ? void 0 : prevSpec.type) !== (null == spec ? void 0 : spec.type) ? (result.reMake = !0, result) : (!specChanged || result.reMake || result.reCompile || (result.change = !0, result.reRender = !0, result.effects = Object.assign(Object.assign({}, result.effects), {
92177
+ component: !0,
92178
+ layout: !0,
92179
+ render: !0
92180
+ })), result);
92181
+ }
92003
92182
  afterSetLayoutStartPoint(pos) {
92004
92183
  if (super.afterSetLayoutStartPoint(pos), isValidNumber$1(pos.x)) {
92005
92184
  const offsetX = isVertical(this._orient) ? pos.x + this._sliderExceededSize() / 2 : pos.x;
@@ -92106,7 +92285,11 @@
92106
92285
  }
92107
92286
  _compareSpec(spec, prevSpec) {
92108
92287
  const result = super._compareSpec(spec, prevSpec);
92109
- return result.reRender = !0, isEqual(prevSpec, spec) || (result.reMake = !0), result;
92288
+ return result.reRender = !0, isEqual(prevSpec, spec) || (result.change = !0, result.reMake || result.reCompile ? result.reMake = !0 : result.effects = Object.assign(Object.assign({}, result.effects), {
92289
+ component: !0,
92290
+ layout: !0,
92291
+ render: !0
92292
+ })), result;
92110
92293
  }
92111
92294
  _getDataLabelType(baseMark, type) {
92112
92295
  const markType = baseMark.type;
@@ -92744,7 +92927,7 @@
92744
92927
  return new MarkPoint$1(markPointAttrs);
92745
92928
  }
92746
92929
  _markerLayout() {
92747
- var _a, _b, _c, _d, _e;
92930
+ var _a, _b, _c, _d, _e, _f;
92748
92931
  const spec = this._spec,
92749
92932
  data = this._markerData,
92750
92933
  relativeSeries = this._relativeSeries,
@@ -92770,7 +92953,8 @@
92770
92953
  }
92771
92954
  if (this._markerComponent) {
92772
92955
  const attribute = null !== (_b = this._markerComponent.attribute) && void 0 !== _b ? _b : {},
92773
- textStyle = null !== (_d = null === (_c = attribute.itemContent) || void 0 === _c ? void 0 : _c.textStyle) && void 0 !== _d ? _d : {};
92956
+ textStyle = null !== (_d = null === (_c = attribute.itemContent) || void 0 === _c ? void 0 : _c.textStyle) && void 0 !== _d ? _d : {},
92957
+ specText = null === (_e = this._spec.itemContent.text) || void 0 === _e ? void 0 : _e.text;
92774
92958
  this._markerComponent.setAttributes({
92775
92959
  position: void 0 === point ? {
92776
92960
  x: null,
@@ -92778,7 +92962,7 @@
92778
92962
  } : point,
92779
92963
  itemContent: Object.assign(Object.assign({}, attribute.itemContent), {
92780
92964
  textStyle: Object.assign(Object.assign({}, textStyle), {
92781
- text: (null === (_e = this._spec.itemContent.text) || void 0 === _e ? void 0 : _e.formatMethod) ? this._spec.itemContent.text.formatMethod(dataPoints, seriesData) : textStyle.text
92965
+ text: (null === (_f = this._spec.itemContent.text) || void 0 === _f ? void 0 : _f.formatMethod) ? this._spec.itemContent.text.formatMethod(dataPoints, seriesData) : isValid$1(specText) ? specText : textStyle.text
92782
92966
  }),
92783
92967
  offsetX: computeOffsetFromRegion(point, attribute.itemContent.offsetX, this._relativeSeries.getRegion()),
92784
92968
  offsetY: computeOffsetFromRegion(point, attribute.itemContent.offsetY, this._relativeSeries.getRegion())
@@ -92856,7 +93040,7 @@
92856
93040
  isPositionLayout = isValid$1(spec.position),
92857
93041
  autoRange = null !== (_a = null == spec ? void 0 : spec.autoRange) && void 0 !== _a && _a;
92858
93042
  let point;
92859
- return isXYLayout ? point = null === (_c = null === (_b = xyLayout(data, relativeSeries, relativeSeries, relativeSeries, autoRange)) || void 0 === _b ? void 0 : _b[0]) || void 0 === _c ? void 0 : _c[0] : isCoordinateLayout ? point = cartesianCoordinateLayout(data, relativeSeries, autoRange, spec.coordinatesOffset)[0] : isPositionLayout && (point = positionLayout(spec.position, relativeSeries, spec.regionRelative)[0]), {
93043
+ return isXYLayout ? point = null === (_c = null === (_b = xyLayout(data, relativeSeries, relativeSeries, relativeSeries, autoRange, !1, this._getAutoRangeExtendDomainKeyPrefix())) || void 0 === _b ? void 0 : _b[0]) || void 0 === _c ? void 0 : _c[0] : isCoordinateLayout ? point = cartesianCoordinateLayout(data, relativeSeries, autoRange, spec.coordinatesOffset, this._getAutoRangeExtendDomainKeyPrefix())[0] : isPositionLayout && (point = positionLayout(spec.position, relativeSeries, spec.regionRelative)[0]), {
92860
93044
  point: point
92861
93045
  };
92862
93046
  }
@@ -92894,7 +93078,7 @@
92894
93078
  const data = this._markerData,
92895
93079
  relativeSeries = this._relativeSeries,
92896
93080
  autoRange = null !== (_b = null === (_a = this._spec) || void 0 === _a ? void 0 : _a.autoRange) && void 0 !== _b && _b,
92897
- polarPoint = polarLayout(data, relativeSeries, relativeSeries, relativeSeries, autoRange)[0][0],
93081
+ polarPoint = polarLayout(data, relativeSeries, relativeSeries, relativeSeries, autoRange, this._getAutoRangeExtendDomainKeyPrefix())[0][0],
92898
93082
  center = {
92899
93083
  x: this._relativeSeries.getRegion().getLayoutStartPoint().x + this._relativeSeries.angleAxisHelper.center().x,
92900
93084
  y: this._relativeSeries.getRegion().getLayoutStartPoint().y + this._relativeSeries.angleAxisHelper.center().y
@@ -92966,6 +93150,11 @@
92966
93150
  delayTime: 0
92967
93151
  };
92968
93152
 
93153
+ const BRUSH_COMPONENT_ONLY_CHANGE_KEYS = {
93154
+ style: !0,
93155
+ inBrush: !0,
93156
+ outOfBrush: !0
93157
+ };
92969
93158
  let Brush$1 = class Brush extends BaseComponent {
92970
93159
  constructor() {
92971
93160
  super(...arguments), this.layoutType = "none", this.type = ComponentTypeEnum.brush, this.name = ComponentTypeEnum.brush, this.specKey = "brush", this.layoutZIndex = LayoutZIndex.Brush, this._linkedSeries = [], this._itemMap = {}, this._linkedItemMap = {}, this._inBrushElementsMap = {}, this._outOfBrushElementsMap = {}, this._linkedInBrushElementsMap = {}, this._linkedOutOfBrushElementsMap = {}, this._cacheInteractiveRangeAttrs = [], this._releatedAxes = [], this._regionAxisMap = {}, this._axisDataZoomMap = {}, this._zoomRecord = [];
@@ -93028,7 +93217,14 @@
93028
93217
  this._updateBrushComponent(region, index);
93029
93218
  });
93030
93219
  const result = super._compareSpec(spec, prevSpec);
93031
- return isEqual(prevSpec, spec) || (result.reRender = !0, result.reMake = !0), result;
93220
+ return isEqual(prevSpec, spec) || (result.change = !0, result.reRender = !0, result.reMake || result.reCompile || !this._isComponentOnlySpecChange(spec, prevSpec) ? result.reMake = !0 : result.effects = Object.assign(Object.assign({}, result.effects), {
93221
+ component: !0,
93222
+ layout: !0,
93223
+ render: !0
93224
+ })), result;
93225
+ }
93226
+ _isComponentOnlySpecChange(spec, prevSpec) {
93227
+ return Object.keys(Object.assign(Object.assign({}, prevSpec), spec)).every(key => isEqual(null == prevSpec ? void 0 : prevSpec[key], null == spec ? void 0 : spec[key]) || BRUSH_COMPONENT_ONLY_CHANGE_KEYS[key]);
93032
93228
  }
93033
93229
  onLayoutEnd() {
93034
93230
  var _a;
@@ -93040,9 +93236,12 @@
93040
93236
  })));
93041
93237
  }
93042
93238
  _updateBrushComponent(region, componentIndex) {
93239
+ var _a;
93043
93240
  const interactiveAttr = this._getBrushInteractiveAttr(region),
93044
93241
  brushComponent = this._brushComponents[componentIndex];
93045
- brushComponent.setAttributes(interactiveAttr), this._initMarkBrushState(componentIndex, ""), brushComponent.children[0].removeAllChild();
93242
+ brushComponent.setAttributes(Object.assign({
93243
+ brushStyle: transformToGraphic(null === (_a = this._spec) || void 0 === _a ? void 0 : _a.style)
93244
+ }, interactiveAttr)), this._initMarkBrushState(componentIndex, ""), brushComponent.children[0].removeAllChild();
93046
93245
  }
93047
93246
  _shouldEnableInteractive() {
93048
93247
  return !1 !== this.getOption().getCompiler().getOption().interactive;
@@ -93361,6 +93560,10 @@
93361
93560
  Factory.registerComponent(Brush$1.type, Brush$1);
93362
93561
  };
93363
93562
 
93563
+ const CUSTOM_MARK_COMPONENT_ONLY_CHANGE_KEYS = {
93564
+ style: !0,
93565
+ state: !0
93566
+ };
93364
93567
  class CustomMark extends BaseComponent {
93365
93568
  constructor() {
93366
93569
  super(...arguments), this.type = ComponentTypeEnum.customMark, this.specKey = "customMark", this.layoutType = "none", this.layoutZIndex = LayoutZIndex.CustomMark, this.layoutLevel = LayoutLevel.CustomMark;
@@ -93418,7 +93621,27 @@
93418
93621
  initEvent() {}
93419
93622
  _compareSpec(spec, prevSpec) {
93420
93623
  const result = super._compareSpec(spec, prevSpec);
93421
- return isEqual(prevSpec, spec) || (result.reMake = !0), result.change = !0, result.reRender = !0, result;
93624
+ return isEqual(prevSpec, spec) || (result.reMake || result.reCompile || !this._isComponentOnlySpecChange(spec, prevSpec) ? result.reMake = !0 : result.effects = Object.assign(Object.assign({}, result.effects), {
93625
+ component: !0,
93626
+ render: !0
93627
+ })), result.change = !0, result.reRender = !0, result;
93628
+ }
93629
+ _isComponentOnlySpecChange(spec, prevSpec) {
93630
+ return Object.keys(Object.assign(Object.assign({}, prevSpec), spec)).every(key => isEqual(null == prevSpec ? void 0 : prevSpec[key], null == spec ? void 0 : spec[key]) || CUSTOM_MARK_COMPONENT_ONLY_CHANGE_KEYS[key]);
93631
+ }
93632
+ reInit(spec) {
93633
+ super.reInit(spec), this._updateMarkStyleWithSpec(this._spec, this.getMarks()[0]), this.getMarks().forEach(mark => {
93634
+ mark.commit(!1, !0);
93635
+ });
93636
+ }
93637
+ _updateMarkStyleWithSpec(spec, mark) {
93638
+ var _a, _b, _c, _d;
93639
+ if (spec && mark && (this.initMarkStyleWithSpec(mark, spec), "group" === spec.type)) {
93640
+ const children = null !== (_c = null === (_b = (_a = mark).getMarks) || void 0 === _b ? void 0 : _b.call(_a)) && void 0 !== _c ? _c : [];
93641
+ null === (_d = spec.children) || void 0 === _d || _d.forEach((childSpec, index) => {
93642
+ this._updateMarkStyleWithSpec(childSpec, children[index]);
93643
+ });
93644
+ }
93422
93645
  }
93423
93646
  _getMarkAttributeContext() {
93424
93647
  return {