Browse Source

温度提示

zhulizhen 5 years ago
parent
commit
018d5a7e4f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/views/evaluate/evIndoorTemperature.vue

+ 2 - 2
src/views/evaluate/evIndoorTemperature.vue

@@ -85,7 +85,7 @@ export default {
     drawIt() {
       let myCharts = echarts.init(document.getElementById("pCharts2"));
       var colors = ["#34C724", "#8D9399", "#F54E45", "#00D6B9", "#0091FF"];
-      var option = {
+      var option = { 
         color: colors,
         tooltip: {
           trigger: "axis",
@@ -93,7 +93,7 @@ export default {
             type: "shadow"
           },
           formatter:function(params){
-            return params[0].name +'<br/> Legend'+params[0].seriesName+'<br/>'+'<i class="icon1"></i> 室内温度:'+params[1].value +'% <br/>'+'<i class="icon2"></i>节能率:'+params[2].value+'%'
+            return params[0].name +'<br/>'+params[0].seriesName+'<br/>'+'<i class="icon1"></i> 室内温度:'+ (params[1].value || 0) +'% <br/>'+'<i class="icon2"></i>节能率:' + (params[2].value || 0) + '%'
           }
         
         },