Browse Source

修改图间距

yuhan 1 month ago
parent
commit
e38d67925e
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/views/module_tpm/equipmentRunStatis/realtime.vue

+ 4 - 1
src/views/module_tpm/equipmentRunStatis/realtime.vue

@@ -249,7 +249,7 @@ export default {
       }
       _this.myChart = echarts.init(chartDom)
       // _this.echartsHeight = 4 * 300;
-      _this.echartsHeight = _this.equipmentparams.length > 1 ? _this.equipmentparams.length * 180 : window.innerHeight - 330;
+      _this.echartsHeight = _this.equipmentparams.length * 200 > window.innerHeight - 330 ? _this.equipmentparams.length * 200 : window.innerHeight - 330;
       // 获取time
       _this.times = [];
       _this.mongodbdata.forEach((i) => {
@@ -321,6 +321,9 @@ export default {
         legend: {
           data: ['实际值'],
         },
+        tooltip: {
+          trigger: 'axis'
+        },
         grid: grid,
         xAxis: xAxis,
         yAxis: yAxis,