1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-19 08:19:15 +08:00

fix: datas should be dataList (#7402)

This commit is contained in:
fit2cloud-chenyw 2024-12-18 14:03:56 +08:00 committed by GitHub
parent a4dcbc90e6
commit 6012a6cf9f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -149,11 +149,11 @@ function initChart() {
z: 1, z: 1,
tooltip: props.option.tooltip || { tooltip: props.option.tooltip || {
trigger: 'axis', trigger: 'axis',
formatter: function (datas: any) { formatter: function (dataList: any) {
let res = datas[0].name + '<br/>'; let res = dataList[0].name + '<br/>';
switch (props.option.formatStr) { switch (props.option.formatStr) {
case 'KB/s': case 'KB/s':
for (const item of datas) { for (const item of dataList) {
res += res +=
item.marker + item.marker +
' ' + ' ' +
@ -164,7 +164,7 @@ function initChart() {
} }
break; break;
case 'KB': case 'KB':
for (const item of datas) { for (const item of dataList) {
res += res +=
item.marker + item.marker +
' ' + ' ' +
@ -175,7 +175,7 @@ function initChart() {
} }
break; break;
case 'MB': case 'MB':
for (const item of datas) { for (const item of dataList) {
res += res +=
item.marker + item.marker +
' ' + ' ' +
@ -186,7 +186,7 @@ function initChart() {
} }
break; break;
default: default:
for (const item of datas) { for (const item of dataList) {
res += res +=
item.marker + item.marker +
' ' + ' ' +