尖峰曲线 <SpikeChart />
发光的面积折线,最大值自动放大标注并带光晕,最多 3 条说明框可逐条出现;适合深色风格。
Template and style descriptions are currently available in Chinese only.
- Group
- 数据 · 突然暴涨
- Component
SpikeChart·#spike-chart- Interaction
- 每按一次 → 出现一条说明框
Good for
- 一条序列里有明显的峰值或暴涨
- 流量、攻击量、请求量这类时间序列
Avoid when
- 多条序列对比:用 LineChart
- 数值没有明显峰值:用 LineChart 或 BarChart
Content limits
| 1 | x 3–24 个,每个 ≤ 8 个字符 |
| 2 | unit ≤ 6 个字符;峰值含单位 ≤ 12 个字符 |
| 3 | callouts 0–3 条,text ≤ 24 字,不要放在峰值上 |
| 4 | note ≤ 50 字,估算值在这里说明 |
Fields
| Field | Type | |
|---|---|---|
kicker · required | string | 标题上方的小节名,2–8 字 |
title · required | string | string[] | 页面标题;传数组可手动断行,每项一行 |
lead | string | 一到两句导语,≤ 60 字 |
source | string | 事实出处;页面上有任何数据或事实时必填 |
hint | ReactNode | 页眉中间的操作提示,可用 <kbd> |
x · required | string[] | 横轴标签 |
values · required | number[] | 数值 |
unit | string | 单位 |
decimals | number | 小数位 |
callouts | { at, text }[] | 说明框,每条一步 |
note | string | 图下说明 |
Example
<SpikeChart kicker="安全" title="…" x={['2023', '2024', '2025']} values={[14, 21.3, 47.1]} unit=" 百万次" note="前两年为估算" />