fix: 折线图纵轴优化——默认约80%头空间、取整到nice刻度,支持手动设置纵轴上限

- 纵轴自动刻度改为精细步进(1/1.5/2/2.5/3/4/5/6/8/10),数据最大值落在约80%处
- ChartInput 新增 yMax 字段(JSON 存储、可拓展),图表弹窗新增「纵轴上限」输入
- 新增 yMax 往返测试
This commit is contained in:
MobKBK
2026-09-04 15:07:10 +08:00
parent 8340d1dbbd
commit ff10e7f065
4 changed files with 28 additions and 6 deletions

View File

@@ -173,6 +173,7 @@ class ChartInput(BaseModel):
taskId: str | None = None
metricId: str | None = None
days: Annotated[int, Field(ge=7, le=365)] = 30
yMax: Annotated[int | None, Field(ge=1)] = None
class ChartUpdate(ChartInput):