formatter : function(params) { var result = params[0].name; params.forEach(function(item) { result += '<br/>'; result += '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:' + item.color + '"></span>'; result += item.seriesName + ":"; result += isNaN(item.value) ? 0 : item.value; }); return result; }
顯示效果javascript