feat: 双Y轴左右轴可独立命名 + 不同轴可设不同图表类型

- 双Y轴:左右两个轴都可单独命名(左轴名称/右轴名称输入框)
- 修复系列类型下拉不生效的 bug(seriesTypeOverrides 只写不读),
  现在每个系列可独立设置柱状/折线,结合轴分配实现'左轴柱状+右轴折线'
- 后端 /api/chart 新增 leftAxisName + seriesTypes 参数(POST/GET 均可)
This commit is contained in:
2026-08-19 13:19:28 +08:00
parent 68e4b72d46
commit 576024af76
5 changed files with 40 additions and 15 deletions
+3 -1
View File
@@ -47,7 +47,9 @@ Content-Type: application/json
| `splitStyle` | string | — | `"solid"` | 分割线样式:`solid` / `dashed` / `dotted` |
| `dualYAxis` | boolean | — | `false` | 启用双Y轴(左右量度不同) |
| `rightAxisSeries` | array | — | `null` | 右轴系列名列表,如 `["利润"]`(未列出的系列用左轴) |
| `rightAxisName` | string | — | `""` | 轴名称 |
| `leftAxisName` | string | — | `""` | 轴名称(如 `"销售额(元)"` |
| `rightAxisName` | string | — | `""` | 右轴名称(如 `"增长率(%)"` |
| `seriesTypes` | array | — | `null` | 每系列图表类型,按系列顺序对应,如 `["bar","line"]``bar`/`line`/`auto` |
| `width` | number | — | `800` | 图片宽度(px |
| `height` | number | — | `500` | 图片高度(px |
| `pixelRatio` | number | — | `2` | 像素倍率(越大越清晰) |