echarts 悬浮框内容

tooltip 下

           formatter: function (params) {
            console.log(params);
            var result = params[0].axisValue + "<br/>";
            params.forEach(function (item) {
              var suffix = ''
              if(item.seriesName.indexOf('率') != -1){
                  suffix = '%'
              }else {
                  suffix = 'KG'
              }
              result +=
                item.marker +
                item.seriesName +
                ":" +
                item.data +
                suffix +
                "<br/>";
            });
            return result;
          },