← All templates

尖峰曲线 <SpikeChart />

发光的面积折线,最大值自动放大标注并带光晕,最多 3 条说明框可逐条出现;适合深色风格。

Template and style descriptions are currently available in Chinese only.

See it in the demo deck →

Group
数据 · 突然暴涨
Component
SpikeChart · #spike-chart
Interaction
每按一次 → 出现一条说明框

Good for

  • 一条序列里有明显的峰值或暴涨
  • 流量、攻击量、请求量这类时间序列

Avoid when

  • 多条序列对比:用 LineChart
  • 数值没有明显峰值:用 LineChart 或 BarChart

Content limits

1x 3–24 个,每个 ≤ 8 个字符
2unit ≤ 6 个字符;峰值含单位 ≤ 12 个字符
3callouts 0–3 条,text ≤ 24 字,不要放在峰值上
4note ≤ 50 字,估算值在这里说明

Fields

FieldType
kicker · requiredstring标题上方的小节名,2–8 字
title · requiredstring | string[]页面标题;传数组可手动断行,每项一行
leadstring一到两句导语,≤ 60 字
sourcestring事实出处;页面上有任何数据或事实时必填
hintReactNode页眉中间的操作提示,可用 <kbd>
x · requiredstring[]横轴标签
values · requirednumber[]数值
unitstring单位
decimalsnumber小数位
callouts{ at, text }[]说明框,每条一步
notestring图下说明

Example

<SpikeChart kicker="安全" title="…" x={['2023', '2024', '2025']} values={[14, 21.3, 47.1]} unit=" 百万次" note="前两年为估算" />