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 } },