调整金额
This commit is contained in:
@@ -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: ['数据'],
|
||||
|
||||
Reference in New Issue
Block a user