From 32db3644b81fd093d3e5cfb97914b11b5f843863 Mon Sep 17 00:00:00 2001 From: hz4th_coder Date: Wed, 2 Sep 2026 13:59:49 +0800 Subject: [PATCH] =?UTF-8?q?v1.21.0=20x=E8=BD=B4=E6=A0=87=E7=AD=BE=E5=8F=AF?= =?UTF-8?q?=E8=AF=BB=E6=80=A7=EF=BC=9A=E6=96=B0=E5=A2=9E=20xLabelRotate=20?= =?UTF-8?q?=E6=97=8B=E8=BD=AC=E8=A7=92=E5=BA=A6/xLabelInterval=20=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E9=97=B4=E9=9A=94/xLabelFontSize=20=E5=AD=97=E5=8F=B7?= =?UTF-8?q?=20=E4=B8=89=E4=B8=AA=E5=9B=BE=E8=A1=A8=E9=80=89=E9=A1=B9?= =?UTF-8?q?=EF=BC=8C=E6=A8=A1=E5=9E=8B=E5=AF=B9=E6=AF=94=E5=9B=BE=E5=BA=95?= =?UTF-8?q?=E9=83=A8=E6=A8=AA=E8=BD=B4=E5=AD=97=E5=A4=9A=E6=97=B6=E5=8F=AF?= =?UTF-8?q?=E6=97=8B=E8=BD=AC/=E5=8A=A0=E9=97=B4=E9=9A=94=E9=81=BF?= =?UTF-8?q?=E5=85=8D=E6=8C=A4=E5=8E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/server.js b/server.js index 5fd4e8a..8823fad 100644 --- a/server.js +++ b/server.js @@ -193,6 +193,9 @@ function buildChartOption(params) { leftAxisMax = '', rightAxisMin = '', rightAxisMax = '', + xLabelRotate = '', + xLabelInterval = '', + xLabelFontSize = 0, width = 800 } = params; @@ -476,9 +479,11 @@ function buildChartOption(params) { axisLine: { lineStyle: { color: axisLineColor } }, axisLabel: { color: textColor, - fontSize: 12, - interval: 0, - rotate: parsedData.categories.length > 10 ? 30 : 0 + fontSize: xLabelFontSize > 0 ? xLabelFontSize : 12, + interval: xLabelInterval === '' ? 0 : Number(xLabelInterval), + rotate: xLabelRotate === '' + ? (parsedData.categories.length > 10 ? 30 : 0) + : Number(xLabelRotate) }, axisTick: { show: false } },