瀏覽代碼

修改图间距

yuhan 1 月之前
父節點
當前提交
e38d67925e
共有 1 個文件被更改,包括 4 次插入1 次删除
  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,