# Upstage Design System — Sparkline (product)
- context: product · group: data
- source revision: lift-1.2.3 (Lift 1.2.3, zip sha256 8d5d9377c2b4…)
- status: content source-derived · availability implemented · verification static-only
- human docs: /ko/components/product/sparkline/ · machine doc: /agent/components/product/sparkline.md
## Required references (read these)
- /components/data/Sparkline.jsx — implementation · sha256 ffadd6f0db44…
- /components/_types.d.ts — api · key SparklineProps
- /components/data/Sparkline.prompt.md — usage-note · sha256 ceb1c0323366…
- /kit/rules/a11y-contract.json — a11y · key Sparkline
## API (components/_types.d.ts SparklineProps)
- data?: Array<number | { value: number }> (default [])
- width?: number (default 160)
- height?: number (default 44)
- tone?: "primary" | "success" | "warning" | "error" | "info" (default primary)
- showArea?: boolean (default true)
- unit?: string (default )
- label?: string
- style?: React.CSSProperties
## Accessibility contract
- keys: -
- aria: role=img, aria-label(추이 요약)
## Unverified
- Browser behaviour is not verified here (static source check only).
사용 지침
components/data/Sparkline.prompt.md원문 · KO · 번역하지 않았다
Direction over time next to a number — no axes, no gridlines, no legend. Pair with Stat. 규칙 전문은 chart-rules.json.
방향만 읽는 차트다. 축·눈금·gridline·범례를 붙이지 않는다 — 붙일 필요가 생겼다면 BarChart가 맞다.
상태 — 3점 미만이면 렌더하지 않고 숫자만 남긴다. 결측 구간은 건너뛰고 선을 잇지 않는다(이으면 없는 값을 보간한 것으로 읽힌다). 결측이 있으면 캡션에 적는다.
정확한 값을 읽어야 하면 Sparkline이 아니라 BarChart나 Table.
색 — 선만 색을 갖는다. 옆의 숫자, 단위, 캡션은 중립 글자색이다(chart-rules C-6). 값이 0 아래로 내려가도 선 색을 바꾸지 않는다(C-7). 위치가 부호를 말한다. tone은 그 상태를 뜻할 때만 상태색으로 바꾼다(C-5).
여러 계열 선 그래프는 Sparkline이 아니다. 계열마다 --chart-1, --chart-2, --chart-3을 고정하고, 결측 구간은 같은 규칙으로 잇지 않는다. 같은 화면의 다른 차트에서도 같은 계열에 같은 색을 쓴다.
적용 규칙
이 컴포넌트를 이름으로 지목한 규칙은 없다. Product 공통 규칙을 따른다. DESIGN.product.md §7
출처
components/data/Sparkline.jsximplementation · sha256 ffadd6f0db44…components/_types.d.tsapi · SparklinePropscomponents/data/Sparkline.prompt.mdusage-note · sha256 ceb1c0323366…kit/rules/a11y-contract.jsona11y · Sparkline