@visactor/vchart 2.0.20-alpha.4 → 2.0.20-alpha.5
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/es5/index.js +1 -1
- package/build/index.es.js +69 -47
- package/build/index.js +69 -47
- package/build/index.min.js +2 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/chart/index.js +1 -1
- package/cjs/chart/stack.js +1 -1
- package/cjs/chart/util.js +1 -1
- package/cjs/component/brush/brush.js +12 -15
- package/cjs/component/brush/brush.js.map +1 -1
- package/cjs/component/data-zoom/data-zoom/data-zoom.js +2 -2
- package/cjs/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
- package/cjs/component/data-zoom/scroll-bar/scroll-bar.js +2 -2
- package/cjs/component/data-zoom/scroll-bar/scroll-bar.js.map +1 -1
- package/cjs/component/util.js +1 -2
- package/cjs/constant/base.js +2 -1
- package/cjs/constant/scroll-bar.js +1 -2
- package/cjs/constant/word-cloud.js +2 -1
- package/cjs/core/interface.js +1 -1
- package/cjs/core/util.js +1 -1
- package/cjs/core/vchart.js +1 -1
- package/cjs/mark/base/base-mark.js.map +1 -1
- package/cjs/series/base/base-series.js.map +1 -1
- package/esm/chart/index.js +1 -1
- package/esm/chart/stack.js +1 -1
- package/esm/chart/util.js +1 -1
- package/esm/component/brush/brush.js +9 -12
- package/esm/component/brush/brush.js.map +1 -1
- package/esm/component/data-zoom/data-zoom/data-zoom.js +2 -2
- package/esm/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
- package/esm/component/data-zoom/scroll-bar/scroll-bar.js +2 -2
- package/esm/component/data-zoom/scroll-bar/scroll-bar.js.map +1 -1
- package/esm/component/util.js +1 -2
- package/esm/constant/base.js +2 -1
- package/esm/constant/scroll-bar.js +1 -2
- package/esm/constant/word-cloud.js +2 -1
- package/esm/core/interface.js +1 -1
- package/esm/core/util.js +1 -1
- package/esm/core/vchart.js +1 -1
- package/esm/mark/base/base-mark.js.map +1 -1
- package/esm/series/base/base-series.js.map +1 -1
- package/package.json +9 -9
package/build/index.es.js
CHANGED
|
@@ -45474,6 +45474,16 @@ const DEFAULT_HANDLER_ATTR_MAP = {
|
|
|
45474
45474
|
strokeBoundsBuffer: 0
|
|
45475
45475
|
}
|
|
45476
45476
|
};
|
|
45477
|
+
const LAYOUT_LEVEL = {
|
|
45478
|
+
background: 0,
|
|
45479
|
+
preview: 1,
|
|
45480
|
+
dragMask: 2,
|
|
45481
|
+
selectedBackground: 3,
|
|
45482
|
+
selectedPreview: 4,
|
|
45483
|
+
handler: 5,
|
|
45484
|
+
handlerText: 5,
|
|
45485
|
+
handlerMask: 999
|
|
45486
|
+
};
|
|
45477
45487
|
|
|
45478
45488
|
const isTextOverflow = (componentBoundsLike, textBounds, layout, isHorizontal) => {
|
|
45479
45489
|
if (!textBounds) return !1;
|
|
@@ -45604,12 +45614,14 @@ class DataZoomRenderer {
|
|
|
45604
45614
|
x: position.x + start * width,
|
|
45605
45615
|
y: position.y,
|
|
45606
45616
|
width: (end - start) * width,
|
|
45607
|
-
height: height
|
|
45617
|
+
height: height,
|
|
45618
|
+
zIndex: LAYOUT_LEVEL.dragMask
|
|
45608
45619
|
}, dragMaskStyle), "rect") : this._dragMask = this._getContainer().createOrUpdateChild("dragMask", Object.assign({
|
|
45609
45620
|
x: position.x,
|
|
45610
45621
|
y: position.y + start * height,
|
|
45611
45622
|
width: width,
|
|
45612
|
-
height: (end - start) * height
|
|
45623
|
+
height: (end - start) * height,
|
|
45624
|
+
zIndex: LAYOUT_LEVEL.dragMask
|
|
45613
45625
|
}, dragMaskStyle), "rect"), {
|
|
45614
45626
|
start: start,
|
|
45615
45627
|
end: end
|
|
@@ -45633,7 +45645,8 @@ class DataZoomRenderer {
|
|
|
45633
45645
|
y: position.y,
|
|
45634
45646
|
width: width,
|
|
45635
45647
|
height: height,
|
|
45636
|
-
cursor: brushSelect ? "crosshair" : "auto"
|
|
45648
|
+
cursor: brushSelect ? "crosshair" : "auto",
|
|
45649
|
+
zIndex: LAYOUT_LEVEL.background
|
|
45637
45650
|
}, backgroundStyle), {
|
|
45638
45651
|
pickable: !zoomLock && (null === (_a = backgroundStyle.pickable) || void 0 === _a || _a)
|
|
45639
45652
|
}), "rect");
|
|
@@ -45666,7 +45679,8 @@ class DataZoomRenderer {
|
|
|
45666
45679
|
x: position.x + start * width,
|
|
45667
45680
|
y: position.y - middleHandlerBackgroundSize,
|
|
45668
45681
|
width: (end - start) * width,
|
|
45669
|
-
height: middleHandlerBackgroundSize
|
|
45682
|
+
height: middleHandlerBackgroundSize,
|
|
45683
|
+
zIndex: LAYOUT_LEVEL.handler
|
|
45670
45684
|
}, null === (_d = middleHandlerStyle.background) || void 0 === _d ? void 0 : _d.style), {
|
|
45671
45685
|
pickable: !zoomLock && (null === (_g = null === (_f = null === (_e = middleHandlerStyle.background) || void 0 === _e ? void 0 : _e.style) || void 0 === _f ? void 0 : _f.pickable) || void 0 === _g || _g)
|
|
45672
45686
|
}), "rect"), this._middleHandlerSymbol = group.createOrUpdateChild("middleHandlerSymbol", Object.assign(Object.assign({
|
|
@@ -45674,24 +45688,29 @@ class DataZoomRenderer {
|
|
|
45674
45688
|
y: position.y - middleHandlerBackgroundSize / 2,
|
|
45675
45689
|
strokeBoundsBuffer: 0,
|
|
45676
45690
|
angle: 0,
|
|
45677
|
-
symbolType: null !== (_j = null === (_h = middleHandlerStyle.icon) || void 0 === _h ? void 0 : _h.symbolType) && void 0 !== _j ? _j : "square"
|
|
45691
|
+
symbolType: null !== (_j = null === (_h = middleHandlerStyle.icon) || void 0 === _h ? void 0 : _h.symbolType) && void 0 !== _j ? _j : "square",
|
|
45692
|
+
zIndex: LAYOUT_LEVEL.handler
|
|
45678
45693
|
}, middleHandlerStyle.icon), {
|
|
45679
45694
|
pickable: !zoomLock && (null === (_k = middleHandlerStyle.icon.pickable) || void 0 === _k || _k)
|
|
45680
45695
|
}), "symbol");
|
|
45681
45696
|
}
|
|
45682
|
-
this._startHandler = group.createOrUpdateChild("startHandler", Object.assign(Object.assign(Object.assign({
|
|
45697
|
+
this._startHandler = group.createOrUpdateChild("startHandler", Object.assign(Object.assign(Object.assign(Object.assign({
|
|
45683
45698
|
x: position.x + start * width,
|
|
45684
45699
|
y: position.y + height / 2,
|
|
45685
45700
|
size: height,
|
|
45686
45701
|
symbolType: null !== (_l = startHandlerStyle.symbolType) && void 0 !== _l ? _l : "square"
|
|
45687
|
-
}, DEFAULT_HANDLER_ATTR_MAP.horizontal),
|
|
45702
|
+
}, DEFAULT_HANDLER_ATTR_MAP.horizontal), {
|
|
45703
|
+
zIndex: LAYOUT_LEVEL.handler
|
|
45704
|
+
}), startHandlerStyle), {
|
|
45688
45705
|
pickable: !zoomLock && (null === (_m = startHandlerStyle.pickable) || void 0 === _m || _m)
|
|
45689
|
-
}), "symbol"), this._endHandler = group.createOrUpdateChild("endHandler", Object.assign(Object.assign(Object.assign({
|
|
45706
|
+
}), "symbol"), this._endHandler = group.createOrUpdateChild("endHandler", Object.assign(Object.assign(Object.assign(Object.assign({
|
|
45690
45707
|
x: position.x + end * width,
|
|
45691
45708
|
y: position.y + height / 2,
|
|
45692
45709
|
size: height,
|
|
45693
45710
|
symbolType: null !== (_o = endHandlerStyle.symbolType) && void 0 !== _o ? _o : "square"
|
|
45694
|
-
}, DEFAULT_HANDLER_ATTR_MAP.horizontal),
|
|
45711
|
+
}, DEFAULT_HANDLER_ATTR_MAP.horizontal), {
|
|
45712
|
+
zIndex: LAYOUT_LEVEL.handler
|
|
45713
|
+
}), endHandlerStyle), {
|
|
45695
45714
|
pickable: !zoomLock && (null === (_p = endHandlerStyle.pickable) || void 0 === _p || _p)
|
|
45696
45715
|
}), "symbol");
|
|
45697
45716
|
const startHandlerWidth = Math.max(this._startHandler.AABBBounds.width(), startHandlerMinSize),
|
|
@@ -45705,7 +45724,7 @@ class DataZoomRenderer {
|
|
|
45705
45724
|
height: startHandlerHeight,
|
|
45706
45725
|
fill: "white",
|
|
45707
45726
|
fillOpacity: 0,
|
|
45708
|
-
zIndex:
|
|
45727
|
+
zIndex: LAYOUT_LEVEL.handlerMask
|
|
45709
45728
|
}, DEFAULT_HANDLER_ATTR_MAP.horizontal), {
|
|
45710
45729
|
pickable: !zoomLock
|
|
45711
45730
|
}), "rect"), this._endHandlerMask = group.createOrUpdateChild("endHandlerMask", Object.assign(Object.assign({
|
|
@@ -45715,7 +45734,7 @@ class DataZoomRenderer {
|
|
|
45715
45734
|
height: endHandlerHeight,
|
|
45716
45735
|
fill: "white",
|
|
45717
45736
|
fillOpacity: 0,
|
|
45718
|
-
zIndex:
|
|
45737
|
+
zIndex: LAYOUT_LEVEL.handlerMask
|
|
45719
45738
|
}, DEFAULT_HANDLER_ATTR_MAP.horizontal), {
|
|
45720
45739
|
pickable: !zoomLock
|
|
45721
45740
|
}), "rect");
|
|
@@ -45726,7 +45745,8 @@ class DataZoomRenderer {
|
|
|
45726
45745
|
x: "left" === orient ? position.x - middleHandlerBackgroundSize : position.x + width,
|
|
45727
45746
|
y: position.y + start * height,
|
|
45728
45747
|
width: middleHandlerBackgroundSize,
|
|
45729
|
-
height: (end - start) * height
|
|
45748
|
+
height: (end - start) * height,
|
|
45749
|
+
zIndex: LAYOUT_LEVEL.handler
|
|
45730
45750
|
}, null === (_r = middleHandlerStyle.background) || void 0 === _r ? void 0 : _r.style), {
|
|
45731
45751
|
pickable: !zoomLock && (null === (_u = null === (_t = null === (_s = middleHandlerStyle.background) || void 0 === _s ? void 0 : _s.style) || void 0 === _t ? void 0 : _t.pickable) || void 0 === _u || _u)
|
|
45732
45752
|
}), "rect"), this._middleHandlerSymbol = group.createOrUpdateChild("middleHandlerSymbol", Object.assign(Object.assign({
|
|
@@ -45734,23 +45754,27 @@ class DataZoomRenderer {
|
|
|
45734
45754
|
y: position.y + (start + end) / 2 * height,
|
|
45735
45755
|
angle: Math.PI / 180 * 90,
|
|
45736
45756
|
symbolType: null !== (_w = null === (_v = middleHandlerStyle.icon) || void 0 === _v ? void 0 : _v.symbolType) && void 0 !== _w ? _w : "square",
|
|
45737
|
-
strokeBoundsBuffer: 0
|
|
45757
|
+
strokeBoundsBuffer: 0,
|
|
45758
|
+
zIndex: LAYOUT_LEVEL.handler
|
|
45738
45759
|
}, middleHandlerStyle.icon), {
|
|
45739
45760
|
pickable: !zoomLock && (null === (_y = null === (_x = middleHandlerStyle.icon) || void 0 === _x ? void 0 : _x.pickable) || void 0 === _y || _y)
|
|
45740
45761
|
}), "symbol");
|
|
45741
45762
|
}
|
|
45742
|
-
this._startHandler = group.createOrUpdateChild("startHandler", Object.assign(Object.assign(Object.assign({
|
|
45763
|
+
this._startHandler = group.createOrUpdateChild("startHandler", Object.assign(Object.assign(Object.assign(Object.assign({
|
|
45743
45764
|
x: position.x + width / 2,
|
|
45744
45765
|
y: position.y + start * height,
|
|
45745
45766
|
size: width,
|
|
45746
45767
|
symbolType: null !== (_z = startHandlerStyle.symbolType) && void 0 !== _z ? _z : "square"
|
|
45747
|
-
}, DEFAULT_HANDLER_ATTR_MAP.vertical),
|
|
45768
|
+
}, DEFAULT_HANDLER_ATTR_MAP.vertical), {
|
|
45769
|
+
zIndex: LAYOUT_LEVEL.handler
|
|
45770
|
+
}), startHandlerStyle), {
|
|
45748
45771
|
pickable: !zoomLock && (null === (_0 = startHandlerStyle.pickable) || void 0 === _0 || _0)
|
|
45749
45772
|
}), "symbol"), this._endHandler = group.createOrUpdateChild("endHandler", Object.assign(Object.assign(Object.assign({
|
|
45750
45773
|
x: position.x + width / 2,
|
|
45751
45774
|
y: position.y + end * height,
|
|
45752
45775
|
size: width,
|
|
45753
|
-
symbolType: null !== (_1 = endHandlerStyle.symbolType) && void 0 !== _1 ? _1 : "square"
|
|
45776
|
+
symbolType: null !== (_1 = endHandlerStyle.symbolType) && void 0 !== _1 ? _1 : "square",
|
|
45777
|
+
zIndex: LAYOUT_LEVEL.handler
|
|
45754
45778
|
}, DEFAULT_HANDLER_ATTR_MAP.vertical), endHandlerStyle), {
|
|
45755
45779
|
pickable: !zoomLock && (null === (_2 = endHandlerStyle.pickable) || void 0 === _2 || _2)
|
|
45756
45780
|
}), "symbol");
|
|
@@ -45765,7 +45789,7 @@ class DataZoomRenderer {
|
|
|
45765
45789
|
height: endHandlerWidth,
|
|
45766
45790
|
fill: "white",
|
|
45767
45791
|
fillOpacity: 0,
|
|
45768
|
-
zIndex:
|
|
45792
|
+
zIndex: LAYOUT_LEVEL.handlerMask
|
|
45769
45793
|
}, DEFAULT_HANDLER_ATTR_MAP.vertical), {
|
|
45770
45794
|
pickable: !zoomLock
|
|
45771
45795
|
}), "rect"), this._endHandlerMask = group.createOrUpdateChild("endHandlerMask", Object.assign(Object.assign({
|
|
@@ -45775,7 +45799,7 @@ class DataZoomRenderer {
|
|
|
45775
45799
|
height: endHandlerWidth,
|
|
45776
45800
|
fill: "white",
|
|
45777
45801
|
fillOpacity: 0,
|
|
45778
|
-
zIndex:
|
|
45802
|
+
zIndex: LAYOUT_LEVEL.handlerMask
|
|
45779
45803
|
}, DEFAULT_HANDLER_ATTR_MAP.vertical), {
|
|
45780
45804
|
pickable: !zoomLock
|
|
45781
45805
|
}), "rect");
|
|
@@ -45804,7 +45828,8 @@ class DataZoomRenderer {
|
|
|
45804
45828
|
y: position.y,
|
|
45805
45829
|
width: (end - start) * width,
|
|
45806
45830
|
height: height,
|
|
45807
|
-
cursor: brushSelect ? "crosshair" : "move"
|
|
45831
|
+
cursor: brushSelect ? "crosshair" : "move",
|
|
45832
|
+
zIndex: LAYOUT_LEVEL.selectedBackground
|
|
45808
45833
|
}, selectedBackgroundStyle), {
|
|
45809
45834
|
pickable: !zoomLock && (null === (_a = selectedBackgroundChartStyle.pickable) || void 0 === _a || _a)
|
|
45810
45835
|
}), "rect") : this._selectedBackground = group.createOrUpdateChild("selectedBackground", Object.assign(Object.assign({
|
|
@@ -45812,14 +45837,16 @@ class DataZoomRenderer {
|
|
|
45812
45837
|
y: position.y + start * height,
|
|
45813
45838
|
width: width,
|
|
45814
45839
|
height: (end - start) * height,
|
|
45815
|
-
cursor: brushSelect ? "crosshair" : "move"
|
|
45840
|
+
cursor: brushSelect ? "crosshair" : "move",
|
|
45841
|
+
zIndex: LAYOUT_LEVEL.selectedBackground
|
|
45816
45842
|
}, selectedBackgroundStyle), {
|
|
45817
45843
|
pickable: !zoomLock && (null === (_b = selectedBackgroundStyle.pickable) || void 0 === _b || _b)
|
|
45818
45844
|
}), "rect");
|
|
45819
45845
|
}
|
|
45820
45846
|
_setPreviewAttributes(type, group) {
|
|
45821
45847
|
this._previewGroup || (this._previewGroup = group.createOrUpdateChild("previewGroup", {
|
|
45822
|
-
pickable: !1
|
|
45848
|
+
pickable: !1,
|
|
45849
|
+
zIndex: LAYOUT_LEVEL.preview
|
|
45823
45850
|
}, "group")), "line" === type ? this._previewLine = this._previewGroup.createOrUpdateChild("previewLine", {}, "line") : this._previewArea = this._previewGroup.createOrUpdateChild("previewArea", {
|
|
45824
45851
|
curveType: "basis"
|
|
45825
45852
|
}, "area");
|
|
@@ -45838,7 +45865,8 @@ class DataZoomRenderer {
|
|
|
45838
45865
|
}
|
|
45839
45866
|
_setSelectedPreviewClipAttributes(type, group) {
|
|
45840
45867
|
this._selectedPreviewGroupClip || (this._selectedPreviewGroupClip = group.createOrUpdateChild("selectedPreviewGroupClip", {
|
|
45841
|
-
pickable: !1
|
|
45868
|
+
pickable: !1,
|
|
45869
|
+
zIndex: LAYOUT_LEVEL.selectedPreview
|
|
45842
45870
|
}, "group"), this._selectedPreviewGroup = this._selectedPreviewGroupClip.createOrUpdateChild("selectedPreviewGroup", {}, "group"));
|
|
45843
45871
|
const {
|
|
45844
45872
|
start: start,
|
|
@@ -58829,7 +58857,7 @@ class BaseMark extends GrammarItem {
|
|
|
58829
58857
|
});
|
|
58830
58858
|
}
|
|
58831
58859
|
return config
|
|
58832
|
-
? Object.assign(Object.assign({}, config), { priority: type === 'normal' ? (_a = config.priority) !== null && _a !== void 0 ? _a : Infinity : config.priority }) : config;
|
|
58860
|
+
? Object.assign(Object.assign({}, config), { priority: type === 'normal' ? ((_a = config.priority) !== null && _a !== void 0 ? _a : Infinity) : config.priority }) : config;
|
|
58833
58861
|
}
|
|
58834
58862
|
tryRunMorphing(graphics) {
|
|
58835
58863
|
if (this._lastMark) {
|
|
@@ -63700,7 +63728,7 @@ class BaseSeries extends BaseModel {
|
|
|
63700
63728
|
attributeContext: this._markAttributeContext,
|
|
63701
63729
|
componentType: option.componentType,
|
|
63702
63730
|
noSeparateStyle,
|
|
63703
|
-
parent: parent !== false ? parent !== null && parent !== void 0 ? parent : this._rootMark : null
|
|
63731
|
+
parent: parent !== false ? (parent !== null && parent !== void 0 ? parent : this._rootMark) : null
|
|
63704
63732
|
});
|
|
63705
63733
|
if (isValid$1(m)) {
|
|
63706
63734
|
const spec = this.getSpec() || {};
|
|
@@ -99319,6 +99347,7 @@ class DataZoom extends DataFilterBaseComponent {
|
|
|
99319
99347
|
_handleDataCollectionChange() {
|
|
99320
99348
|
const data = this._data.getDataView();
|
|
99321
99349
|
data.reRunAllTransform();
|
|
99350
|
+
this._initAfterLayout();
|
|
99322
99351
|
const domain = this._computeDomainOfValueScale();
|
|
99323
99352
|
if (domain) {
|
|
99324
99353
|
if (!this._valueScale) {
|
|
@@ -99559,9 +99588,7 @@ class DataZoom extends DataFilterBaseComponent {
|
|
|
99559
99588
|
}
|
|
99560
99589
|
_createOrUpdateComponent(changeData) {
|
|
99561
99590
|
if (this._visible) {
|
|
99562
|
-
const
|
|
99563
|
-
const yScale = this._isHorizontal ? this._valueScale : this._stateScale;
|
|
99564
|
-
const isNeedPreview = this._isScaleValid(xScale) && this._isScaleValid(yScale) && this._spec.showBackgroundChart !== false;
|
|
99591
|
+
const isNeedPreview = this._spec.showBackgroundChart !== false;
|
|
99565
99592
|
const attrs = this._getAttrs(isNeedPreview);
|
|
99566
99593
|
const axis = this._relatedAxisComponent;
|
|
99567
99594
|
if (this._component) {
|
|
@@ -99726,10 +99753,8 @@ class ScrollBar extends DataFilterBaseComponent {
|
|
|
99726
99753
|
}
|
|
99727
99754
|
this._start = start;
|
|
99728
99755
|
this._end = end;
|
|
99729
|
-
const
|
|
99730
|
-
const
|
|
99731
|
-
const startValue = statePointToData(start, this._stateScale, reverse);
|
|
99732
|
-
const endValue = statePointToData(end, this._stateScale, reverse);
|
|
99756
|
+
const startValue = statePointToData(start, this._stateScale, false);
|
|
99757
|
+
const endValue = statePointToData(end, this._stateScale, false);
|
|
99733
99758
|
const hasChange = isFunction$1(this._spec.updateDataAfterChange)
|
|
99734
99759
|
? this._spec.updateDataAfterChange(start, end, startValue, endValue)
|
|
99735
99760
|
: this._handleStateChange(startValue, endValue);
|
|
@@ -103999,15 +104024,23 @@ class Brush extends BaseComponent {
|
|
|
103999
104024
|
const axisRangeExpand = (_a = this._spec.axisRangeExpand) !== null && _a !== void 0 ? _a : 0;
|
|
104000
104025
|
const { x1, x2, y1, y2 } = operateMaskBounds;
|
|
104001
104026
|
const regionStartAttr = isHorizontal ? 'x' : 'y';
|
|
104002
|
-
const regionSizeAttr = isHorizontal ? 'width' : 'height';
|
|
104003
104027
|
const boundsStart = isHorizontal ? x1 : y1;
|
|
104004
104028
|
const boundsEnd = isHorizontal ? x2 : y2;
|
|
104029
|
+
const range = axis.getScale().range();
|
|
104030
|
+
const rangeFactor = (_b = axis.scaleRangeFactor()) !== null && _b !== void 0 ? _b : [0, 1];
|
|
104031
|
+
const isAxisReverse = last(range) < range[0];
|
|
104032
|
+
const startPosTemp = boundsStart - region.getLayoutStartPoint()[regionStartAttr];
|
|
104033
|
+
const endPosTemp = boundsEnd - region.getLayoutStartPoint()[regionStartAttr];
|
|
104034
|
+
const endPos = isAxisReverse ? Math.min(startPosTemp, endPosTemp) : Math.max(startPosTemp, endPosTemp);
|
|
104035
|
+
const startPos = isAxisReverse ? Math.max(startPosTemp, endPosTemp) : Math.min(startPosTemp, endPosTemp);
|
|
104036
|
+
const start = ((startPos - range[0]) / (last(range) - range[0])) * (rangeFactor[1] - rangeFactor[0]) + rangeFactor[0];
|
|
104037
|
+
const end = ((endPos - range[0]) / (last(range) - range[0])) * (rangeFactor[1] - rangeFactor[0]) + rangeFactor[0];
|
|
104038
|
+
const newStart = this._stateClamp(start - axisRangeExpand);
|
|
104039
|
+
const newEnd = this._stateClamp(end + axisRangeExpand);
|
|
104005
104040
|
if (this._axisDataZoomMap[axis.id]) {
|
|
104006
104041
|
const dataZoom = this._axisDataZoomMap[axis.id];
|
|
104007
|
-
const
|
|
104008
|
-
const
|
|
104009
|
-
const newStartPercent = this._stateClamp(startPercent - axisRangeExpand);
|
|
104010
|
-
const newEndPercent = this._stateClamp(endPercent + axisRangeExpand);
|
|
104042
|
+
const newStartPercent = isAxisReverse ? 1 - newStart : newStart;
|
|
104043
|
+
const newEndPercent = isAxisReverse ? 1 - newEnd : newEnd;
|
|
104011
104044
|
dataZoom.setStartAndEnd(Math.min(newStartPercent, newEndPercent), Math.max(newStartPercent, newEndPercent), [
|
|
104012
104045
|
'percent',
|
|
104013
104046
|
'percent'
|
|
@@ -104021,17 +104054,6 @@ class Brush extends BaseComponent {
|
|
|
104021
104054
|
});
|
|
104022
104055
|
}
|
|
104023
104056
|
else {
|
|
104024
|
-
const range = axis.getScale().range();
|
|
104025
|
-
const rangeFactor = (_b = axis.scaleRangeFactor()) !== null && _b !== void 0 ? _b : [0, 1];
|
|
104026
|
-
const isAxisReverse = last(range) < range[0];
|
|
104027
|
-
const startPosTemp = boundsStart - region.getLayoutStartPoint()[regionStartAttr];
|
|
104028
|
-
const endPosTemp = boundsEnd - region.getLayoutStartPoint()[regionStartAttr];
|
|
104029
|
-
const endPos = isAxisReverse ? Math.min(startPosTemp, endPosTemp) : Math.max(startPosTemp, endPosTemp);
|
|
104030
|
-
const startPos = isAxisReverse ? Math.max(startPosTemp, endPosTemp) : Math.min(startPosTemp, endPosTemp);
|
|
104031
|
-
const start = ((startPos - range[0]) / (last(range) - range[0])) * (rangeFactor[1] - rangeFactor[0]) + rangeFactor[0];
|
|
104032
|
-
const end = ((endPos - range[0]) / (last(range) - range[0])) * (rangeFactor[1] - rangeFactor[0]) + rangeFactor[0];
|
|
104033
|
-
const newStart = this._stateClamp(start - axisRangeExpand);
|
|
104034
|
-
const newEnd = this._stateClamp(end + axisRangeExpand);
|
|
104035
104057
|
axis.scaleRangeFactor([newStart, newEnd]);
|
|
104036
104058
|
axis.effect.scaleUpdate();
|
|
104037
104059
|
this._zoomRecord.push({
|
package/build/index.js
CHANGED
|
@@ -45480,6 +45480,16 @@
|
|
|
45480
45480
|
strokeBoundsBuffer: 0
|
|
45481
45481
|
}
|
|
45482
45482
|
};
|
|
45483
|
+
const LAYOUT_LEVEL = {
|
|
45484
|
+
background: 0,
|
|
45485
|
+
preview: 1,
|
|
45486
|
+
dragMask: 2,
|
|
45487
|
+
selectedBackground: 3,
|
|
45488
|
+
selectedPreview: 4,
|
|
45489
|
+
handler: 5,
|
|
45490
|
+
handlerText: 5,
|
|
45491
|
+
handlerMask: 999
|
|
45492
|
+
};
|
|
45483
45493
|
|
|
45484
45494
|
const isTextOverflow = (componentBoundsLike, textBounds, layout, isHorizontal) => {
|
|
45485
45495
|
if (!textBounds) return !1;
|
|
@@ -45610,12 +45620,14 @@
|
|
|
45610
45620
|
x: position.x + start * width,
|
|
45611
45621
|
y: position.y,
|
|
45612
45622
|
width: (end - start) * width,
|
|
45613
|
-
height: height
|
|
45623
|
+
height: height,
|
|
45624
|
+
zIndex: LAYOUT_LEVEL.dragMask
|
|
45614
45625
|
}, dragMaskStyle), "rect") : this._dragMask = this._getContainer().createOrUpdateChild("dragMask", Object.assign({
|
|
45615
45626
|
x: position.x,
|
|
45616
45627
|
y: position.y + start * height,
|
|
45617
45628
|
width: width,
|
|
45618
|
-
height: (end - start) * height
|
|
45629
|
+
height: (end - start) * height,
|
|
45630
|
+
zIndex: LAYOUT_LEVEL.dragMask
|
|
45619
45631
|
}, dragMaskStyle), "rect"), {
|
|
45620
45632
|
start: start,
|
|
45621
45633
|
end: end
|
|
@@ -45639,7 +45651,8 @@
|
|
|
45639
45651
|
y: position.y,
|
|
45640
45652
|
width: width,
|
|
45641
45653
|
height: height,
|
|
45642
|
-
cursor: brushSelect ? "crosshair" : "auto"
|
|
45654
|
+
cursor: brushSelect ? "crosshair" : "auto",
|
|
45655
|
+
zIndex: LAYOUT_LEVEL.background
|
|
45643
45656
|
}, backgroundStyle), {
|
|
45644
45657
|
pickable: !zoomLock && (null === (_a = backgroundStyle.pickable) || void 0 === _a || _a)
|
|
45645
45658
|
}), "rect");
|
|
@@ -45672,7 +45685,8 @@
|
|
|
45672
45685
|
x: position.x + start * width,
|
|
45673
45686
|
y: position.y - middleHandlerBackgroundSize,
|
|
45674
45687
|
width: (end - start) * width,
|
|
45675
|
-
height: middleHandlerBackgroundSize
|
|
45688
|
+
height: middleHandlerBackgroundSize,
|
|
45689
|
+
zIndex: LAYOUT_LEVEL.handler
|
|
45676
45690
|
}, null === (_d = middleHandlerStyle.background) || void 0 === _d ? void 0 : _d.style), {
|
|
45677
45691
|
pickable: !zoomLock && (null === (_g = null === (_f = null === (_e = middleHandlerStyle.background) || void 0 === _e ? void 0 : _e.style) || void 0 === _f ? void 0 : _f.pickable) || void 0 === _g || _g)
|
|
45678
45692
|
}), "rect"), this._middleHandlerSymbol = group.createOrUpdateChild("middleHandlerSymbol", Object.assign(Object.assign({
|
|
@@ -45680,24 +45694,29 @@
|
|
|
45680
45694
|
y: position.y - middleHandlerBackgroundSize / 2,
|
|
45681
45695
|
strokeBoundsBuffer: 0,
|
|
45682
45696
|
angle: 0,
|
|
45683
|
-
symbolType: null !== (_j = null === (_h = middleHandlerStyle.icon) || void 0 === _h ? void 0 : _h.symbolType) && void 0 !== _j ? _j : "square"
|
|
45697
|
+
symbolType: null !== (_j = null === (_h = middleHandlerStyle.icon) || void 0 === _h ? void 0 : _h.symbolType) && void 0 !== _j ? _j : "square",
|
|
45698
|
+
zIndex: LAYOUT_LEVEL.handler
|
|
45684
45699
|
}, middleHandlerStyle.icon), {
|
|
45685
45700
|
pickable: !zoomLock && (null === (_k = middleHandlerStyle.icon.pickable) || void 0 === _k || _k)
|
|
45686
45701
|
}), "symbol");
|
|
45687
45702
|
}
|
|
45688
|
-
this._startHandler = group.createOrUpdateChild("startHandler", Object.assign(Object.assign(Object.assign({
|
|
45703
|
+
this._startHandler = group.createOrUpdateChild("startHandler", Object.assign(Object.assign(Object.assign(Object.assign({
|
|
45689
45704
|
x: position.x + start * width,
|
|
45690
45705
|
y: position.y + height / 2,
|
|
45691
45706
|
size: height,
|
|
45692
45707
|
symbolType: null !== (_l = startHandlerStyle.symbolType) && void 0 !== _l ? _l : "square"
|
|
45693
|
-
}, DEFAULT_HANDLER_ATTR_MAP.horizontal),
|
|
45708
|
+
}, DEFAULT_HANDLER_ATTR_MAP.horizontal), {
|
|
45709
|
+
zIndex: LAYOUT_LEVEL.handler
|
|
45710
|
+
}), startHandlerStyle), {
|
|
45694
45711
|
pickable: !zoomLock && (null === (_m = startHandlerStyle.pickable) || void 0 === _m || _m)
|
|
45695
|
-
}), "symbol"), this._endHandler = group.createOrUpdateChild("endHandler", Object.assign(Object.assign(Object.assign({
|
|
45712
|
+
}), "symbol"), this._endHandler = group.createOrUpdateChild("endHandler", Object.assign(Object.assign(Object.assign(Object.assign({
|
|
45696
45713
|
x: position.x + end * width,
|
|
45697
45714
|
y: position.y + height / 2,
|
|
45698
45715
|
size: height,
|
|
45699
45716
|
symbolType: null !== (_o = endHandlerStyle.symbolType) && void 0 !== _o ? _o : "square"
|
|
45700
|
-
}, DEFAULT_HANDLER_ATTR_MAP.horizontal),
|
|
45717
|
+
}, DEFAULT_HANDLER_ATTR_MAP.horizontal), {
|
|
45718
|
+
zIndex: LAYOUT_LEVEL.handler
|
|
45719
|
+
}), endHandlerStyle), {
|
|
45701
45720
|
pickable: !zoomLock && (null === (_p = endHandlerStyle.pickable) || void 0 === _p || _p)
|
|
45702
45721
|
}), "symbol");
|
|
45703
45722
|
const startHandlerWidth = Math.max(this._startHandler.AABBBounds.width(), startHandlerMinSize),
|
|
@@ -45711,7 +45730,7 @@
|
|
|
45711
45730
|
height: startHandlerHeight,
|
|
45712
45731
|
fill: "white",
|
|
45713
45732
|
fillOpacity: 0,
|
|
45714
|
-
zIndex:
|
|
45733
|
+
zIndex: LAYOUT_LEVEL.handlerMask
|
|
45715
45734
|
}, DEFAULT_HANDLER_ATTR_MAP.horizontal), {
|
|
45716
45735
|
pickable: !zoomLock
|
|
45717
45736
|
}), "rect"), this._endHandlerMask = group.createOrUpdateChild("endHandlerMask", Object.assign(Object.assign({
|
|
@@ -45721,7 +45740,7 @@
|
|
|
45721
45740
|
height: endHandlerHeight,
|
|
45722
45741
|
fill: "white",
|
|
45723
45742
|
fillOpacity: 0,
|
|
45724
|
-
zIndex:
|
|
45743
|
+
zIndex: LAYOUT_LEVEL.handlerMask
|
|
45725
45744
|
}, DEFAULT_HANDLER_ATTR_MAP.horizontal), {
|
|
45726
45745
|
pickable: !zoomLock
|
|
45727
45746
|
}), "rect");
|
|
@@ -45732,7 +45751,8 @@
|
|
|
45732
45751
|
x: "left" === orient ? position.x - middleHandlerBackgroundSize : position.x + width,
|
|
45733
45752
|
y: position.y + start * height,
|
|
45734
45753
|
width: middleHandlerBackgroundSize,
|
|
45735
|
-
height: (end - start) * height
|
|
45754
|
+
height: (end - start) * height,
|
|
45755
|
+
zIndex: LAYOUT_LEVEL.handler
|
|
45736
45756
|
}, null === (_r = middleHandlerStyle.background) || void 0 === _r ? void 0 : _r.style), {
|
|
45737
45757
|
pickable: !zoomLock && (null === (_u = null === (_t = null === (_s = middleHandlerStyle.background) || void 0 === _s ? void 0 : _s.style) || void 0 === _t ? void 0 : _t.pickable) || void 0 === _u || _u)
|
|
45738
45758
|
}), "rect"), this._middleHandlerSymbol = group.createOrUpdateChild("middleHandlerSymbol", Object.assign(Object.assign({
|
|
@@ -45740,23 +45760,27 @@
|
|
|
45740
45760
|
y: position.y + (start + end) / 2 * height,
|
|
45741
45761
|
angle: Math.PI / 180 * 90,
|
|
45742
45762
|
symbolType: null !== (_w = null === (_v = middleHandlerStyle.icon) || void 0 === _v ? void 0 : _v.symbolType) && void 0 !== _w ? _w : "square",
|
|
45743
|
-
strokeBoundsBuffer: 0
|
|
45763
|
+
strokeBoundsBuffer: 0,
|
|
45764
|
+
zIndex: LAYOUT_LEVEL.handler
|
|
45744
45765
|
}, middleHandlerStyle.icon), {
|
|
45745
45766
|
pickable: !zoomLock && (null === (_y = null === (_x = middleHandlerStyle.icon) || void 0 === _x ? void 0 : _x.pickable) || void 0 === _y || _y)
|
|
45746
45767
|
}), "symbol");
|
|
45747
45768
|
}
|
|
45748
|
-
this._startHandler = group.createOrUpdateChild("startHandler", Object.assign(Object.assign(Object.assign({
|
|
45769
|
+
this._startHandler = group.createOrUpdateChild("startHandler", Object.assign(Object.assign(Object.assign(Object.assign({
|
|
45749
45770
|
x: position.x + width / 2,
|
|
45750
45771
|
y: position.y + start * height,
|
|
45751
45772
|
size: width,
|
|
45752
45773
|
symbolType: null !== (_z = startHandlerStyle.symbolType) && void 0 !== _z ? _z : "square"
|
|
45753
|
-
}, DEFAULT_HANDLER_ATTR_MAP.vertical),
|
|
45774
|
+
}, DEFAULT_HANDLER_ATTR_MAP.vertical), {
|
|
45775
|
+
zIndex: LAYOUT_LEVEL.handler
|
|
45776
|
+
}), startHandlerStyle), {
|
|
45754
45777
|
pickable: !zoomLock && (null === (_0 = startHandlerStyle.pickable) || void 0 === _0 || _0)
|
|
45755
45778
|
}), "symbol"), this._endHandler = group.createOrUpdateChild("endHandler", Object.assign(Object.assign(Object.assign({
|
|
45756
45779
|
x: position.x + width / 2,
|
|
45757
45780
|
y: position.y + end * height,
|
|
45758
45781
|
size: width,
|
|
45759
|
-
symbolType: null !== (_1 = endHandlerStyle.symbolType) && void 0 !== _1 ? _1 : "square"
|
|
45782
|
+
symbolType: null !== (_1 = endHandlerStyle.symbolType) && void 0 !== _1 ? _1 : "square",
|
|
45783
|
+
zIndex: LAYOUT_LEVEL.handler
|
|
45760
45784
|
}, DEFAULT_HANDLER_ATTR_MAP.vertical), endHandlerStyle), {
|
|
45761
45785
|
pickable: !zoomLock && (null === (_2 = endHandlerStyle.pickable) || void 0 === _2 || _2)
|
|
45762
45786
|
}), "symbol");
|
|
@@ -45771,7 +45795,7 @@
|
|
|
45771
45795
|
height: endHandlerWidth,
|
|
45772
45796
|
fill: "white",
|
|
45773
45797
|
fillOpacity: 0,
|
|
45774
|
-
zIndex:
|
|
45798
|
+
zIndex: LAYOUT_LEVEL.handlerMask
|
|
45775
45799
|
}, DEFAULT_HANDLER_ATTR_MAP.vertical), {
|
|
45776
45800
|
pickable: !zoomLock
|
|
45777
45801
|
}), "rect"), this._endHandlerMask = group.createOrUpdateChild("endHandlerMask", Object.assign(Object.assign({
|
|
@@ -45781,7 +45805,7 @@
|
|
|
45781
45805
|
height: endHandlerWidth,
|
|
45782
45806
|
fill: "white",
|
|
45783
45807
|
fillOpacity: 0,
|
|
45784
|
-
zIndex:
|
|
45808
|
+
zIndex: LAYOUT_LEVEL.handlerMask
|
|
45785
45809
|
}, DEFAULT_HANDLER_ATTR_MAP.vertical), {
|
|
45786
45810
|
pickable: !zoomLock
|
|
45787
45811
|
}), "rect");
|
|
@@ -45810,7 +45834,8 @@
|
|
|
45810
45834
|
y: position.y,
|
|
45811
45835
|
width: (end - start) * width,
|
|
45812
45836
|
height: height,
|
|
45813
|
-
cursor: brushSelect ? "crosshair" : "move"
|
|
45837
|
+
cursor: brushSelect ? "crosshair" : "move",
|
|
45838
|
+
zIndex: LAYOUT_LEVEL.selectedBackground
|
|
45814
45839
|
}, selectedBackgroundStyle), {
|
|
45815
45840
|
pickable: !zoomLock && (null === (_a = selectedBackgroundChartStyle.pickable) || void 0 === _a || _a)
|
|
45816
45841
|
}), "rect") : this._selectedBackground = group.createOrUpdateChild("selectedBackground", Object.assign(Object.assign({
|
|
@@ -45818,14 +45843,16 @@
|
|
|
45818
45843
|
y: position.y + start * height,
|
|
45819
45844
|
width: width,
|
|
45820
45845
|
height: (end - start) * height,
|
|
45821
|
-
cursor: brushSelect ? "crosshair" : "move"
|
|
45846
|
+
cursor: brushSelect ? "crosshair" : "move",
|
|
45847
|
+
zIndex: LAYOUT_LEVEL.selectedBackground
|
|
45822
45848
|
}, selectedBackgroundStyle), {
|
|
45823
45849
|
pickable: !zoomLock && (null === (_b = selectedBackgroundStyle.pickable) || void 0 === _b || _b)
|
|
45824
45850
|
}), "rect");
|
|
45825
45851
|
}
|
|
45826
45852
|
_setPreviewAttributes(type, group) {
|
|
45827
45853
|
this._previewGroup || (this._previewGroup = group.createOrUpdateChild("previewGroup", {
|
|
45828
|
-
pickable: !1
|
|
45854
|
+
pickable: !1,
|
|
45855
|
+
zIndex: LAYOUT_LEVEL.preview
|
|
45829
45856
|
}, "group")), "line" === type ? this._previewLine = this._previewGroup.createOrUpdateChild("previewLine", {}, "line") : this._previewArea = this._previewGroup.createOrUpdateChild("previewArea", {
|
|
45830
45857
|
curveType: "basis"
|
|
45831
45858
|
}, "area");
|
|
@@ -45844,7 +45871,8 @@
|
|
|
45844
45871
|
}
|
|
45845
45872
|
_setSelectedPreviewClipAttributes(type, group) {
|
|
45846
45873
|
this._selectedPreviewGroupClip || (this._selectedPreviewGroupClip = group.createOrUpdateChild("selectedPreviewGroupClip", {
|
|
45847
|
-
pickable: !1
|
|
45874
|
+
pickable: !1,
|
|
45875
|
+
zIndex: LAYOUT_LEVEL.selectedPreview
|
|
45848
45876
|
}, "group"), this._selectedPreviewGroup = this._selectedPreviewGroupClip.createOrUpdateChild("selectedPreviewGroup", {}, "group"));
|
|
45849
45877
|
const {
|
|
45850
45878
|
start: start,
|
|
@@ -58835,7 +58863,7 @@
|
|
|
58835
58863
|
});
|
|
58836
58864
|
}
|
|
58837
58865
|
return config
|
|
58838
|
-
? Object.assign(Object.assign({}, config), { priority: type === 'normal' ? (_a = config.priority) !== null && _a !== void 0 ? _a : Infinity : config.priority }) : config;
|
|
58866
|
+
? Object.assign(Object.assign({}, config), { priority: type === 'normal' ? ((_a = config.priority) !== null && _a !== void 0 ? _a : Infinity) : config.priority }) : config;
|
|
58839
58867
|
}
|
|
58840
58868
|
tryRunMorphing(graphics) {
|
|
58841
58869
|
if (this._lastMark) {
|
|
@@ -63706,7 +63734,7 @@
|
|
|
63706
63734
|
attributeContext: this._markAttributeContext,
|
|
63707
63735
|
componentType: option.componentType,
|
|
63708
63736
|
noSeparateStyle,
|
|
63709
|
-
parent: parent !== false ? parent !== null && parent !== void 0 ? parent : this._rootMark : null
|
|
63737
|
+
parent: parent !== false ? (parent !== null && parent !== void 0 ? parent : this._rootMark) : null
|
|
63710
63738
|
});
|
|
63711
63739
|
if (isValid$1(m)) {
|
|
63712
63740
|
const spec = this.getSpec() || {};
|
|
@@ -99325,6 +99353,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
99325
99353
|
_handleDataCollectionChange() {
|
|
99326
99354
|
const data = this._data.getDataView();
|
|
99327
99355
|
data.reRunAllTransform();
|
|
99356
|
+
this._initAfterLayout();
|
|
99328
99357
|
const domain = this._computeDomainOfValueScale();
|
|
99329
99358
|
if (domain) {
|
|
99330
99359
|
if (!this._valueScale) {
|
|
@@ -99565,9 +99594,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
99565
99594
|
}
|
|
99566
99595
|
_createOrUpdateComponent(changeData) {
|
|
99567
99596
|
if (this._visible) {
|
|
99568
|
-
const
|
|
99569
|
-
const yScale = this._isHorizontal ? this._valueScale : this._stateScale;
|
|
99570
|
-
const isNeedPreview = this._isScaleValid(xScale) && this._isScaleValid(yScale) && this._spec.showBackgroundChart !== false;
|
|
99597
|
+
const isNeedPreview = this._spec.showBackgroundChart !== false;
|
|
99571
99598
|
const attrs = this._getAttrs(isNeedPreview);
|
|
99572
99599
|
const axis = this._relatedAxisComponent;
|
|
99573
99600
|
if (this._component) {
|
|
@@ -99732,10 +99759,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
99732
99759
|
}
|
|
99733
99760
|
this._start = start;
|
|
99734
99761
|
this._end = end;
|
|
99735
|
-
const
|
|
99736
|
-
const
|
|
99737
|
-
const startValue = statePointToData(start, this._stateScale, reverse);
|
|
99738
|
-
const endValue = statePointToData(end, this._stateScale, reverse);
|
|
99762
|
+
const startValue = statePointToData(start, this._stateScale, false);
|
|
99763
|
+
const endValue = statePointToData(end, this._stateScale, false);
|
|
99739
99764
|
const hasChange = isFunction$1(this._spec.updateDataAfterChange)
|
|
99740
99765
|
? this._spec.updateDataAfterChange(start, end, startValue, endValue)
|
|
99741
99766
|
: this._handleStateChange(startValue, endValue);
|
|
@@ -104005,15 +104030,23 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
104005
104030
|
const axisRangeExpand = (_a = this._spec.axisRangeExpand) !== null && _a !== void 0 ? _a : 0;
|
|
104006
104031
|
const { x1, x2, y1, y2 } = operateMaskBounds;
|
|
104007
104032
|
const regionStartAttr = isHorizontal ? 'x' : 'y';
|
|
104008
|
-
const regionSizeAttr = isHorizontal ? 'width' : 'height';
|
|
104009
104033
|
const boundsStart = isHorizontal ? x1 : y1;
|
|
104010
104034
|
const boundsEnd = isHorizontal ? x2 : y2;
|
|
104035
|
+
const range = axis.getScale().range();
|
|
104036
|
+
const rangeFactor = (_b = axis.scaleRangeFactor()) !== null && _b !== void 0 ? _b : [0, 1];
|
|
104037
|
+
const isAxisReverse = last(range) < range[0];
|
|
104038
|
+
const startPosTemp = boundsStart - region.getLayoutStartPoint()[regionStartAttr];
|
|
104039
|
+
const endPosTemp = boundsEnd - region.getLayoutStartPoint()[regionStartAttr];
|
|
104040
|
+
const endPos = isAxisReverse ? Math.min(startPosTemp, endPosTemp) : Math.max(startPosTemp, endPosTemp);
|
|
104041
|
+
const startPos = isAxisReverse ? Math.max(startPosTemp, endPosTemp) : Math.min(startPosTemp, endPosTemp);
|
|
104042
|
+
const start = ((startPos - range[0]) / (last(range) - range[0])) * (rangeFactor[1] - rangeFactor[0]) + rangeFactor[0];
|
|
104043
|
+
const end = ((endPos - range[0]) / (last(range) - range[0])) * (rangeFactor[1] - rangeFactor[0]) + rangeFactor[0];
|
|
104044
|
+
const newStart = this._stateClamp(start - axisRangeExpand);
|
|
104045
|
+
const newEnd = this._stateClamp(end + axisRangeExpand);
|
|
104011
104046
|
if (this._axisDataZoomMap[axis.id]) {
|
|
104012
104047
|
const dataZoom = this._axisDataZoomMap[axis.id];
|
|
104013
|
-
const
|
|
104014
|
-
const
|
|
104015
|
-
const newStartPercent = this._stateClamp(startPercent - axisRangeExpand);
|
|
104016
|
-
const newEndPercent = this._stateClamp(endPercent + axisRangeExpand);
|
|
104048
|
+
const newStartPercent = isAxisReverse ? 1 - newStart : newStart;
|
|
104049
|
+
const newEndPercent = isAxisReverse ? 1 - newEnd : newEnd;
|
|
104017
104050
|
dataZoom.setStartAndEnd(Math.min(newStartPercent, newEndPercent), Math.max(newStartPercent, newEndPercent), [
|
|
104018
104051
|
'percent',
|
|
104019
104052
|
'percent'
|
|
@@ -104027,17 +104060,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
104027
104060
|
});
|
|
104028
104061
|
}
|
|
104029
104062
|
else {
|
|
104030
|
-
const range = axis.getScale().range();
|
|
104031
|
-
const rangeFactor = (_b = axis.scaleRangeFactor()) !== null && _b !== void 0 ? _b : [0, 1];
|
|
104032
|
-
const isAxisReverse = last(range) < range[0];
|
|
104033
|
-
const startPosTemp = boundsStart - region.getLayoutStartPoint()[regionStartAttr];
|
|
104034
|
-
const endPosTemp = boundsEnd - region.getLayoutStartPoint()[regionStartAttr];
|
|
104035
|
-
const endPos = isAxisReverse ? Math.min(startPosTemp, endPosTemp) : Math.max(startPosTemp, endPosTemp);
|
|
104036
|
-
const startPos = isAxisReverse ? Math.max(startPosTemp, endPosTemp) : Math.min(startPosTemp, endPosTemp);
|
|
104037
|
-
const start = ((startPos - range[0]) / (last(range) - range[0])) * (rangeFactor[1] - rangeFactor[0]) + rangeFactor[0];
|
|
104038
|
-
const end = ((endPos - range[0]) / (last(range) - range[0])) * (rangeFactor[1] - rangeFactor[0]) + rangeFactor[0];
|
|
104039
|
-
const newStart = this._stateClamp(start - axisRangeExpand);
|
|
104040
|
-
const newEnd = this._stateClamp(end + axisRangeExpand);
|
|
104041
104063
|
axis.scaleRangeFactor([newStart, newEnd]);
|
|
104042
104064
|
axis.effect.scaleUpdate();
|
|
104043
104065
|
this._zoomRecord.push({
|