Selaa lähdekoodia

统计图增加滚动条

wang_xy 2 vuotta sitten
vanhempi
commit
1e34d7bf15
1 muutettua tiedostoa jossa 11 lisäystä ja 2 poistoa
  1. 11 2
      src/views/monitor.vue

+ 11 - 2
src/views/monitor.vue

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