数据优化
This commit is contained in:
@@ -721,7 +721,18 @@ function initDetailedCharts() {
|
|||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
mode: 'index',
|
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: {
|
zoom: {
|
||||||
pan: {
|
pan: {
|
||||||
@@ -780,7 +791,18 @@ function initDetailedCharts() {
|
|||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
mode: 'index',
|
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: {
|
zoom: {
|
||||||
pan: {
|
pan: {
|
||||||
@@ -862,7 +884,19 @@ function initDetailedCharts() {
|
|||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
mode: 'index',
|
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: {
|
zoom: {
|
||||||
pan: {
|
pan: {
|
||||||
@@ -943,7 +977,19 @@ function initDetailedCharts() {
|
|||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
mode: 'index',
|
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: {
|
zoom: {
|
||||||
pan: {
|
pan: {
|
||||||
|
|||||||
Reference in New Issue
Block a user