echarts tooltip悬浮提示框 formatter

tooltip: {
  trigger: 'axis',
  axisPointer: {
    type: 'cross'
  },
   formatter: params => {
            var res = params[0].name;
            for (var i = 0; i < params.length; i++) {
              res +=
                "<br>" +
                params[i].marker +
                params[i].seriesName +
                ":" +
                params[i].data;
            }
            return res;
        }
}

 

posted @ 2020-07-08 15:52  Jspeng  阅读(3397)  评论(0编辑  收藏  举报