From 417a0bd3b5e16eff9e0711b36add5e8577fca661 Mon Sep 17 00:00:00 2001 From: ngfchl Date: Mon, 26 Dec 2022 22:27:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8E=86=E5=8F=B2=E5=A2=9E?= =?UTF-8?q?=E9=87=8F=E6=95=B0=E6=8D=AE=E6=98=BE=E7=A4=BA=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/auto_pt/status.html | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/templates/auto_pt/status.html b/templates/auto_pt/status.html index d75b9ac..2692b15 100644 --- a/templates/auto_pt/status.html +++ b/templates/auto_pt/status.html @@ -694,10 +694,13 @@ // console.log(params[0].value[1]) let text = '' let total = 0 + params.sort((a, b) => { + return b.value - a.value + }) params.forEach((param, index) => { let temp = param.value == 0 ? '' : ` -
- ${param.seriesName}: +
+ ${param.seriesName}: ${renderSize(param.value)}
` @@ -705,20 +708,28 @@ total += param.value }) let total_str = ` -
+
- - ${params[0].axisValue}: - ${renderSize(total)} + + 总计:${renderSize(total)} + ${params[0].axisValue}

` total_str += text - return `
${total_str}
` + return `
${total_str}
` }, position: function (point, params, dom, rect, size) { - // console.log(point) - return [point[1], 8] + let customVH = window.innerWidth + if (customVH - point[0] < 250) { + point[0] = customVH - 300 + } + console.log(customVH) + console.log(point[0]) + if (customVH > 768) { + return point + } + return [point[0], 5] }, order: 'valueDesc', confine: false,