瀏覽代碼

统计图增加滚动条

wang_xy 2 年之前
父節點
當前提交
1e34d7bf15
共有 1 個文件被更改,包括 11 次插入2 次删除
  1. 11 2
      src/views/monitor.vue

+ 11 - 2
src/views/monitor.vue

@@ -317,12 +317,21 @@ export default {
         },
         },
         grid: {
         grid: {
           top: '5%',
           top: '5%',
-          left: '2%',
+          left: '5%',
           // right: "4%",
           // right: "4%",
-          bottom: '-15%',
+          bottom: '0%',
           width: '75%',
           width: '75%',
           containLabel: true
           containLabel: true
         },
         },
+        dataZoom: [{
+          show:true,
+          type: 'slider',
+          yAxisIndex:0,
+          left:10,
+          start: 0,
+          end: this.sourceData.length > 10 ? 40 : 100,
+          width:15
+        }],
         xAxis: {
         xAxis: {
           show: false,
           show: false,
           type: 'value'
           type: 'value'