Compare commits

...
2 Commits
+10 -5
View File
@@ -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 }
},
@@ -1151,7 +1156,7 @@ app.get('/api/health', (req, res) => {
res.json({
status: 'ok',
service: 'data-chart-tool',
version: '1.20.0',
version: '1.21.0',
endpoints: {
'POST /api/chart': '生成图表图片(JSON body',
'GET /api/chart': '生成图表图片(URL 参数)',
@@ -1171,7 +1176,7 @@ app.get('/api/health', (req, res) => {
app.get('/api/docs', (req, res) => {
res.json({
name: '数据可视化图表生成器 API',
version: '1.20.0',
version: '1.21.0',
endpoints: [
{
method: 'POST',