@visactor/vchart 1.13.21-alpha.4 → 1.13.21-alpha.6
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 +30 -3
- package/build/index.js +30 -3
- package/build/index.min.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/core/index.d.ts +1 -1
- package/cjs/core/index.js +1 -1
- package/cjs/core/index.js.map +1 -1
- package/cjs/plugin/chart/scroll/scroll.d.ts +2 -0
- package/cjs/plugin/chart/scroll/scroll.js +26 -3
- package/cjs/plugin/chart/scroll/scroll.js.map +1 -1
- package/esm/core/index.d.ts +1 -1
- package/esm/core/index.js +1 -1
- package/esm/core/index.js.map +1 -1
- package/esm/plugin/chart/scroll/scroll.d.ts +2 -0
- package/esm/plugin/chart/scroll/scroll.js +26 -3
- package/esm/plugin/chart/scroll/scroll.js.map +1 -1
- package/package.json +3 -3
package/build/index.es.js
CHANGED
|
@@ -64274,7 +64274,7 @@ const registerVChartCore = () => {
|
|
|
64274
64274
|
};
|
|
64275
64275
|
registerVChartCore();
|
|
64276
64276
|
|
|
64277
|
-
const version = "1.13.21-alpha.
|
|
64277
|
+
const version = "1.13.21-alpha.6";
|
|
64278
64278
|
|
|
64279
64279
|
const addVChartProperty = (data, op) => {
|
|
64280
64280
|
const context = op.beforeCall();
|
|
@@ -104693,6 +104693,12 @@ const DefaultTheme = {
|
|
|
104693
104693
|
sliderStyle: undefined
|
|
104694
104694
|
};
|
|
104695
104695
|
class ScrollPlugin extends BasePlugin {
|
|
104696
|
+
get lastScrollX() {
|
|
104697
|
+
return this._lastScrollX;
|
|
104698
|
+
}
|
|
104699
|
+
get lastScrollY() {
|
|
104700
|
+
return this._lastScrollY;
|
|
104701
|
+
}
|
|
104696
104702
|
constructor() {
|
|
104697
104703
|
super(ScrollPlugin.type);
|
|
104698
104704
|
this.type = 'chartScroll';
|
|
@@ -104715,6 +104721,8 @@ class ScrollPlugin extends BasePlugin {
|
|
|
104715
104721
|
};
|
|
104716
104722
|
this.onWheel = (e) => {
|
|
104717
104723
|
var _a, _b;
|
|
104724
|
+
e.preventDefault();
|
|
104725
|
+
e.stopPropagation();
|
|
104718
104726
|
const scrollX = e.deltaX;
|
|
104719
104727
|
const scrollY = e.deltaY;
|
|
104720
104728
|
const rootMark = this.getRootMark();
|
|
@@ -104753,6 +104761,25 @@ class ScrollPlugin extends BasePlugin {
|
|
|
104753
104761
|
if (!this._event) {
|
|
104754
104762
|
this._event = new Event$1(this._service.globalInstance.getChart().getOption().eventDispatcher, null);
|
|
104755
104763
|
}
|
|
104764
|
+
if (this._xScrollComponent) {
|
|
104765
|
+
this._xScrollComponent.setAttributes({
|
|
104766
|
+
width: canvasSize.width,
|
|
104767
|
+
y: canvasSize.height - DefaultTheme.size
|
|
104768
|
+
});
|
|
104769
|
+
this._xScrollComponent.setAttributes({
|
|
104770
|
+
visible: this._scrollLimit.x.percent < 1
|
|
104771
|
+
});
|
|
104772
|
+
}
|
|
104773
|
+
if (this._yScrollComponent) {
|
|
104774
|
+
this._yScrollComponent.setAttributes({
|
|
104775
|
+
height: canvasSize.height,
|
|
104776
|
+
x: canvasSize.width - DefaultTheme.size
|
|
104777
|
+
});
|
|
104778
|
+
this._yScrollComponent.setAttributes({
|
|
104779
|
+
visible: this._scrollLimit.y.percent < 1
|
|
104780
|
+
});
|
|
104781
|
+
}
|
|
104782
|
+
this.scrollTo({ x: 0, y: 0 });
|
|
104756
104783
|
}
|
|
104757
104784
|
onAfterRender() {
|
|
104758
104785
|
const rootMark = this.getRootMark();
|
|
@@ -104822,7 +104849,7 @@ class ScrollPlugin extends BasePlugin {
|
|
|
104822
104849
|
const canvasSize = this._service.globalInstance.getChart().getCanvasRect();
|
|
104823
104850
|
const viewSize = this._service.globalInstance.getChart().getViewRect();
|
|
104824
104851
|
const _f = (_b = (_a = this._spec) === null || _a === void 0 ? void 0 : _a.y) !== null && _b !== void 0 ? _b : {}, rest = __rest$e(_f, ["enable"]);
|
|
104825
|
-
this._yScrollComponent = new ScrollBar$1(Object.assign(Object.assign({}, rest), { zIndex: 9999, x: canvasSize.width - DefaultTheme.size, y: 0, width: DefaultTheme.size, height: canvasSize.height, range: [0, canvasSize.height / viewSize.height], direction: 'vertical', delayTime: (_c = rest === null || rest === void 0 ? void 0 : rest.delayTime) !== null && _c !== void 0 ? _c : 30, realTime: (_d = rest === null || rest === void 0 ? void 0 : rest.realTime) !== null && _d !== void 0 ? _d : true, railStyle: DefaultTheme.railStyle, sliderStyle: DefaultTheme.sliderStyle }));
|
|
104852
|
+
this._yScrollComponent = new ScrollBar$1(Object.assign(Object.assign({}, rest), { zIndex: 9999, x: canvasSize.width - DefaultTheme.size, y: 0, width: DefaultTheme.size, height: canvasSize.height, range: [0, canvasSize.height / viewSize.height], direction: 'vertical', delayTime: (_c = rest === null || rest === void 0 ? void 0 : rest.delayTime) !== null && _c !== void 0 ? _c : 30, realTime: (_d = rest === null || rest === void 0 ? void 0 : rest.realTime) !== null && _d !== void 0 ? _d : true, railStyle: DefaultTheme.railStyle, sliderStyle: DefaultTheme.sliderStyle, visible: canvasSize.height < viewSize.height }));
|
|
104826
104853
|
this._yScrollComponent.addEventListener(SCROLLBAR_EVENT, (e) => {
|
|
104827
104854
|
var _a;
|
|
104828
104855
|
const value = e.detail.value;
|
|
@@ -104858,7 +104885,7 @@ class ScrollPlugin extends BasePlugin {
|
|
|
104858
104885
|
const canvasSize = this._service.globalInstance.getChart().getCanvasRect();
|
|
104859
104886
|
const viewSize = this._service.globalInstance.getChart().getViewRect();
|
|
104860
104887
|
const _f = (_b = (_a = this._spec) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : {}, rest = __rest$e(_f, ["enable"]);
|
|
104861
|
-
this._xScrollComponent = new ScrollBar$1(Object.assign(Object.assign({}, rest), { zIndex: 9999, x: 0, y: canvasSize.height - DefaultTheme.size, width: canvasSize.width, height: DefaultTheme.size, range: [0, canvasSize.width / viewSize.width], direction: 'horizontal', delayTime: (_c = rest === null || rest === void 0 ? void 0 : rest.delayTime) !== null && _c !== void 0 ? _c : 30, realTime: (_d = rest === null || rest === void 0 ? void 0 : rest.realTime) !== null && _d !== void 0 ? _d : true, sliderStyle: DefaultTheme.sliderStyle, railStyle: DefaultTheme.railStyle }));
|
|
104888
|
+
this._xScrollComponent = new ScrollBar$1(Object.assign(Object.assign({}, rest), { zIndex: 9999, x: 0, y: canvasSize.height - DefaultTheme.size, width: canvasSize.width, height: DefaultTheme.size, range: [0, canvasSize.width / viewSize.width], direction: 'horizontal', delayTime: (_c = rest === null || rest === void 0 ? void 0 : rest.delayTime) !== null && _c !== void 0 ? _c : 30, realTime: (_d = rest === null || rest === void 0 ? void 0 : rest.realTime) !== null && _d !== void 0 ? _d : true, sliderStyle: DefaultTheme.sliderStyle, railStyle: DefaultTheme.railStyle, visible: canvasSize.width < viewSize.width }));
|
|
104862
104889
|
this._xScrollComponent.addEventListener(SCROLLBAR_EVENT, (e) => {
|
|
104863
104890
|
var _a;
|
|
104864
104891
|
const value = e.detail.value;
|
package/build/index.js
CHANGED
|
@@ -64280,7 +64280,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
64280
64280
|
};
|
|
64281
64281
|
registerVChartCore();
|
|
64282
64282
|
|
|
64283
|
-
const version = "1.13.21-alpha.
|
|
64283
|
+
const version = "1.13.21-alpha.6";
|
|
64284
64284
|
|
|
64285
64285
|
const addVChartProperty = (data, op) => {
|
|
64286
64286
|
const context = op.beforeCall();
|
|
@@ -104699,6 +104699,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
104699
104699
|
sliderStyle: undefined
|
|
104700
104700
|
};
|
|
104701
104701
|
class ScrollPlugin extends BasePlugin {
|
|
104702
|
+
get lastScrollX() {
|
|
104703
|
+
return this._lastScrollX;
|
|
104704
|
+
}
|
|
104705
|
+
get lastScrollY() {
|
|
104706
|
+
return this._lastScrollY;
|
|
104707
|
+
}
|
|
104702
104708
|
constructor() {
|
|
104703
104709
|
super(ScrollPlugin.type);
|
|
104704
104710
|
this.type = 'chartScroll';
|
|
@@ -104721,6 +104727,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
104721
104727
|
};
|
|
104722
104728
|
this.onWheel = (e) => {
|
|
104723
104729
|
var _a, _b;
|
|
104730
|
+
e.preventDefault();
|
|
104731
|
+
e.stopPropagation();
|
|
104724
104732
|
const scrollX = e.deltaX;
|
|
104725
104733
|
const scrollY = e.deltaY;
|
|
104726
104734
|
const rootMark = this.getRootMark();
|
|
@@ -104759,6 +104767,25 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
104759
104767
|
if (!this._event) {
|
|
104760
104768
|
this._event = new Event$1(this._service.globalInstance.getChart().getOption().eventDispatcher, null);
|
|
104761
104769
|
}
|
|
104770
|
+
if (this._xScrollComponent) {
|
|
104771
|
+
this._xScrollComponent.setAttributes({
|
|
104772
|
+
width: canvasSize.width,
|
|
104773
|
+
y: canvasSize.height - DefaultTheme.size
|
|
104774
|
+
});
|
|
104775
|
+
this._xScrollComponent.setAttributes({
|
|
104776
|
+
visible: this._scrollLimit.x.percent < 1
|
|
104777
|
+
});
|
|
104778
|
+
}
|
|
104779
|
+
if (this._yScrollComponent) {
|
|
104780
|
+
this._yScrollComponent.setAttributes({
|
|
104781
|
+
height: canvasSize.height,
|
|
104782
|
+
x: canvasSize.width - DefaultTheme.size
|
|
104783
|
+
});
|
|
104784
|
+
this._yScrollComponent.setAttributes({
|
|
104785
|
+
visible: this._scrollLimit.y.percent < 1
|
|
104786
|
+
});
|
|
104787
|
+
}
|
|
104788
|
+
this.scrollTo({ x: 0, y: 0 });
|
|
104762
104789
|
}
|
|
104763
104790
|
onAfterRender() {
|
|
104764
104791
|
const rootMark = this.getRootMark();
|
|
@@ -104828,7 +104855,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
104828
104855
|
const canvasSize = this._service.globalInstance.getChart().getCanvasRect();
|
|
104829
104856
|
const viewSize = this._service.globalInstance.getChart().getViewRect();
|
|
104830
104857
|
const _f = (_b = (_a = this._spec) === null || _a === void 0 ? void 0 : _a.y) !== null && _b !== void 0 ? _b : {}, rest = __rest$e(_f, ["enable"]);
|
|
104831
|
-
this._yScrollComponent = new ScrollBar$1(Object.assign(Object.assign({}, rest), { zIndex: 9999, x: canvasSize.width - DefaultTheme.size, y: 0, width: DefaultTheme.size, height: canvasSize.height, range: [0, canvasSize.height / viewSize.height], direction: 'vertical', delayTime: (_c = rest === null || rest === void 0 ? void 0 : rest.delayTime) !== null && _c !== void 0 ? _c : 30, realTime: (_d = rest === null || rest === void 0 ? void 0 : rest.realTime) !== null && _d !== void 0 ? _d : true, railStyle: DefaultTheme.railStyle, sliderStyle: DefaultTheme.sliderStyle }));
|
|
104858
|
+
this._yScrollComponent = new ScrollBar$1(Object.assign(Object.assign({}, rest), { zIndex: 9999, x: canvasSize.width - DefaultTheme.size, y: 0, width: DefaultTheme.size, height: canvasSize.height, range: [0, canvasSize.height / viewSize.height], direction: 'vertical', delayTime: (_c = rest === null || rest === void 0 ? void 0 : rest.delayTime) !== null && _c !== void 0 ? _c : 30, realTime: (_d = rest === null || rest === void 0 ? void 0 : rest.realTime) !== null && _d !== void 0 ? _d : true, railStyle: DefaultTheme.railStyle, sliderStyle: DefaultTheme.sliderStyle, visible: canvasSize.height < viewSize.height }));
|
|
104832
104859
|
this._yScrollComponent.addEventListener(SCROLLBAR_EVENT, (e) => {
|
|
104833
104860
|
var _a;
|
|
104834
104861
|
const value = e.detail.value;
|
|
@@ -104864,7 +104891,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
104864
104891
|
const canvasSize = this._service.globalInstance.getChart().getCanvasRect();
|
|
104865
104892
|
const viewSize = this._service.globalInstance.getChart().getViewRect();
|
|
104866
104893
|
const _f = (_b = (_a = this._spec) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : {}, rest = __rest$e(_f, ["enable"]);
|
|
104867
|
-
this._xScrollComponent = new ScrollBar$1(Object.assign(Object.assign({}, rest), { zIndex: 9999, x: 0, y: canvasSize.height - DefaultTheme.size, width: canvasSize.width, height: DefaultTheme.size, range: [0, canvasSize.width / viewSize.width], direction: 'horizontal', delayTime: (_c = rest === null || rest === void 0 ? void 0 : rest.delayTime) !== null && _c !== void 0 ? _c : 30, realTime: (_d = rest === null || rest === void 0 ? void 0 : rest.realTime) !== null && _d !== void 0 ? _d : true, sliderStyle: DefaultTheme.sliderStyle, railStyle: DefaultTheme.railStyle }));
|
|
104894
|
+
this._xScrollComponent = new ScrollBar$1(Object.assign(Object.assign({}, rest), { zIndex: 9999, x: 0, y: canvasSize.height - DefaultTheme.size, width: canvasSize.width, height: DefaultTheme.size, range: [0, canvasSize.width / viewSize.width], direction: 'horizontal', delayTime: (_c = rest === null || rest === void 0 ? void 0 : rest.delayTime) !== null && _c !== void 0 ? _c : 30, realTime: (_d = rest === null || rest === void 0 ? void 0 : rest.realTime) !== null && _d !== void 0 ? _d : true, sliderStyle: DefaultTheme.sliderStyle, railStyle: DefaultTheme.railStyle, visible: canvasSize.width < viewSize.width }));
|
|
104868
104895
|
this._xScrollComponent.addEventListener(SCROLLBAR_EVENT, (e) => {
|
|
104869
104896
|
var _a;
|
|
104870
104897
|
const value = e.detail.value;
|