formatter: function(params) {
           console.log("eeessss")
           console.log(params)
            var result = "<div>" + params[0].axisValue + "</div>";
            params.forEach(function(item, index) {
              result +=
                '<span style="display:inline-block;margin-right:5px;margin-bottom:2px;border-radius:10px;width:9px;height:9px;+
                item.color +
                '"></span>';
              result += item.seriesName + ":" + (item.data*100).toFixed(2) + "%<br>";
            });
            return result;
          }
        },

效果:

 

echart修改tooltip显示样式

 

相关文章:

  • 2022-12-23
  • 2021-07-18
  • 2022-12-23
  • 2021-12-23
  • 2021-11-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-21
  • 2022-12-23
  • 2022-01-26
  • 2022-12-23
  • 2022-12-23
  • 2021-06-30
  • 2022-12-23
相关资源
相似解决方案