tooltip添加单位名称显示:
tooltip: { trigger: 'axis', formatter: function (params) { let result = params[0].axisValueLabel + "<br/>" params.forEach(function (item) { result += item.marker + item.seriesName + ":" + item.data + (item.seriesName =='压力'?' bar':" ℃") +"<br/>" }) return result; } },