Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a5f0b6273 | ||
|
|
32db3644b8 |
@@ -193,6 +193,9 @@ function buildChartOption(params) {
|
|||||||
leftAxisMax = '',
|
leftAxisMax = '',
|
||||||
rightAxisMin = '',
|
rightAxisMin = '',
|
||||||
rightAxisMax = '',
|
rightAxisMax = '',
|
||||||
|
xLabelRotate = '',
|
||||||
|
xLabelInterval = '',
|
||||||
|
xLabelFontSize = 0,
|
||||||
width = 800
|
width = 800
|
||||||
} = params;
|
} = params;
|
||||||
|
|
||||||
@@ -476,9 +479,11 @@ function buildChartOption(params) {
|
|||||||
axisLine: { lineStyle: { color: axisLineColor } },
|
axisLine: { lineStyle: { color: axisLineColor } },
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: textColor,
|
color: textColor,
|
||||||
fontSize: 12,
|
fontSize: xLabelFontSize > 0 ? xLabelFontSize : 12,
|
||||||
interval: 0,
|
interval: xLabelInterval === '' ? 0 : Number(xLabelInterval),
|
||||||
rotate: parsedData.categories.length > 10 ? 30 : 0
|
rotate: xLabelRotate === ''
|
||||||
|
? (parsedData.categories.length > 10 ? 30 : 0)
|
||||||
|
: Number(xLabelRotate)
|
||||||
},
|
},
|
||||||
axisTick: { show: false }
|
axisTick: { show: false }
|
||||||
},
|
},
|
||||||
@@ -1151,7 +1156,7 @@ app.get('/api/health', (req, res) => {
|
|||||||
res.json({
|
res.json({
|
||||||
status: 'ok',
|
status: 'ok',
|
||||||
service: 'data-chart-tool',
|
service: 'data-chart-tool',
|
||||||
version: '1.20.0',
|
version: '1.21.0',
|
||||||
endpoints: {
|
endpoints: {
|
||||||
'POST /api/chart': '生成图表图片(JSON body)',
|
'POST /api/chart': '生成图表图片(JSON body)',
|
||||||
'GET /api/chart': '生成图表图片(URL 参数)',
|
'GET /api/chart': '生成图表图片(URL 参数)',
|
||||||
@@ -1171,7 +1176,7 @@ app.get('/api/health', (req, res) => {
|
|||||||
app.get('/api/docs', (req, res) => {
|
app.get('/api/docs', (req, res) => {
|
||||||
res.json({
|
res.json({
|
||||||
name: '数据可视化图表生成器 API',
|
name: '数据可视化图表生成器 API',
|
||||||
version: '1.20.0',
|
version: '1.21.0',
|
||||||
endpoints: [
|
endpoints: [
|
||||||
{
|
{
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
|||||||
Reference in New Issue
Block a user