@somecat/financial-report 0.1.17 → 0.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -91,7 +91,8 @@ Props:`points`(`[{ date, value }]`,`value` 为百分数值如 `76.2`;不
91
91
  (html-to-image 克隆进 foreignObject 后 SVG `<text>` 排版会错位);
92
92
  - SVG 使用 `viewBox="0 0 100 100"` + `preserveAspectRatio="none"` 横向自适应,
93
93
  折线 `vector-effect="non-scaling-stroke"` 保证线宽不被拉伸;
94
- - Y 轴固定区间(默认 0–100,步长 20),越界数值按区间夹紧;
94
+ - Y 轴区间默认 0–100(步长 20),数据超过 100 或为负时按步长向上/向下自动扩展
95
+ (刻度过多时成倍放大步长,控制在 8 档内),保证折线不被裁切;
95
96
  - X 轴标签按 `i/(n-1)` 均分,点过多时抽稀、拥挤时整组倾斜 45°;
96
97
  - 无数据时只画坐标系并提示「暂无数据」。
97
98
 
@@ -101,7 +102,7 @@ Props:`points`(`[{ date, value }]`,`value` 为百分数值如 `76.2`;不
101
102
  | --- | --- | --- | --- |
102
103
  | `points` | `LinePoint[]` | 演示数据 | 折线数据 |
103
104
  | `height` | `number` | `300` | 图表总高(含 X 轴标签区) |
104
- | `yMin` / `yMax` | `number` | `0` / `100` | Y 轴区间 |
105
+ | `yMin` / `yMax` | `number` | `0` / `100` | Y 轴区间下限/上限(数据越界时自动扩展) |
105
106
  | `yStep` | `number` | `20` | Y 轴刻度步长 |
106
107
  | `unit` | `string` | `%` | 刻度后缀 |
107
108
  | `lineColor` | `string` | `var(--color-primary)` | 折线颜色(内部经 `resolveCssColor` 解析) |