数据优化

This commit is contained in:
Alex Yang
2025-12-03 15:23:33 +08:00
parent c854c460a8
commit 1a80c5acb8

View File

@@ -721,7 +721,18 @@ function initDetailedCharts() {
},
tooltip: {
mode: 'index',
intersect: false
intersect: false,
callbacks: {
label: function(context) {
const label = context.dataset.label || '';
const value = context.parsed.y;
// 第二行显示实际值
return [
`${label}: ${value}%`,
`实际值: ${value}%`
];
}
}
},
zoom: {
pan: {
@@ -780,7 +791,18 @@ function initDetailedCharts() {
},
tooltip: {
mode: 'index',
intersect: false
intersect: false,
callbacks: {
label: function(context) {
const label = context.dataset.label || '';
const value = context.parsed.y;
// 第二行显示实际值
return [
`${label}: ${value}%`,
`实际值: ${value}%`
];
}
}
},
zoom: {
pan: {
@@ -862,7 +884,19 @@ function initDetailedCharts() {
},
tooltip: {
mode: 'index',
intersect: false
intersect: false,
callbacks: {
label: function(context) {
const label = context.dataset.label || '';
const value = context.parsed.y;
const rawValue = context.raw.y;
// 第二行显示实际值
return [
`${label}: ${value} MB`,
`实际值: ${rawValue} MB`
];
}
}
},
zoom: {
pan: {
@@ -943,7 +977,19 @@ function initDetailedCharts() {
},
tooltip: {
mode: 'index',
intersect: false
intersect: false,
callbacks: {
label: function(context) {
const label = context.dataset.label || '';
const value = context.parsed.y;
const rawValue = context.raw.y;
// 第二行显示实际值
return [
`${label}: ${value} MB/s`,
`实际值: ${rawValue} MB/s`
];
}
}
},
zoom: {
pan: {