调整金额

This commit is contained in:
2026-01-31 17:14:05 +08:00
parent 2060ddff83
commit 4c2fe1d2a1
7 changed files with 88 additions and 62 deletions

View File

@@ -64,7 +64,27 @@ function updateChart1() {
left: 'center'
},
tooltip: {
trigger: 'axis'
trigger: 'axis',
axisPointer: {
type: 'cross',
label: {
backgroundColor: '#6a7985'
}
},
formatter: function(params) {
let result = params[0].name + '<br/>';
params.forEach(function(item) {
let value = item.value;
let color = item.color;
let status = value >= 0 ? '盈利' : '亏损';
let statusColor = value >= 0 ? '#4CAF50' : '#ff6b6b';
result += '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:' + color + '"></span>';
result += item.seriesName + ': ';
result += '<span style="color:' + statusColor + ';">' + value + '</span> ';
result += '<span style="color:' + statusColor + ';">(' + status + ')</span><br/>';
});
return result;
}
},
legend: {
data: ['数据'],