+
@@ -135,7 +162,11 @@
-
@@ -168,7 +199,7 @@
:cycle="cycle"
>
-
-
-
+ >-->
+
@@ -240,14 +273,19 @@ import KLine from "./kline.vue";
import Depth from "./marketDepth.vue";
import Volume from "./volumeChart.vue";
import MACD from "./MACDChart.vue";
-import KDJ from "./KDJChart.vue";
-import RSI from "./RSIChart.vue"
+import KDJ from "./KDJChart.vue";
+import RSI from "./RSIChart.vue";
// import BRAR from "./BRARChart.vue";
// import PSY from "./PSYChart.vue";
// import ROC from "./ROCChart.vue";
// import VR from "./VRChart.vue";
import { getLanguage, getDefaultChartSize, formatDecimal } from "../js/utils";
-import { splitData, getDepthData, handleDivisionData, calculateMA } from "../js/processData";
+import {
+ splitData,
+ getDepthData,
+ handleDivisionData,
+ calculateMA
+} from "../js/processData";
export default {
name: "klineChart",
components: {
@@ -292,7 +330,9 @@ export default {
isClose: true,
showIndicatorOpt: false,
showIndicator: "",
- isClose: true
+ isClose: true,
+ interval: null,
+ changeDataZoomType: ""
};
},
props: {
@@ -534,13 +574,24 @@ export default {
}
this.showChart = type;
},
+ changeDataZoomByMouseDown(type) {
+ this.changeDataZoomType = type;
+ this.changeDataZoom(type);
+ this.interval = setInterval(this.changeDataZoom, 600);
+ },
+ removeChangeDataZoom() {
+ clearInterval(this.interval);
+ },
changeDataZoom(type) {
+ if (type) {
+ this.changeDataZoomType = type;
+ }
if (this.showChart !== "depth") {
- this.$refs.candle.changeDataZoom(type);
- this.$refs.volume.changeDataZoom(type);
- this.$refs.macd.changeDataZoom(type);
- this.$refs.stochastic.changeDataZoom(type);
- this.$refs.rsi.changeDataZoom(type);
+ this.$refs.candle.changeDataZoom(this.changeDataZoomType);
+ this.$refs.volume.changeDataZoom(this.changeDataZoomType);
+ this.$refs.macd.changeDataZoom(this.changeDataZoomType);
+ this.$refs.stochastic.changeDataZoom(this.changeDataZoomType);
+ this.$refs.rsi.changeDataZoom(this.changeDataZoomType);
}
},
fullScreenToggle() {