# Upstage Design System — BarChart (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: /en/components/product/barchart/ · machine doc: /agent/components/product/barchart.md
## Required references (read these)
- /components/data/BarChart.jsx — implementation · sha256 6f50499aa095…
- /components/_types.d.ts — api · key BarChartProps
- /components/data/BarChart.prompt.md — usage-note · sha256 5b605d9539c0…
- /kit/rules/a11y-contract.json — a11y · key BarChart
## API (components/_types.d.ts BarChartProps)
- data?: BarDatum[]
- orientation?: "vertical" | "horizontal"
- palette?: "brand" | "categorical" — 기본 "brand" — 브랜드 스케일 한 계열(--chart-brand-1…5). 계열이 다른 항목만 "categorical".
- height?: number
- max?: number
- unit?: string
- title?: string
- valueFormat?: (value: number) => string
- showValues?: boolean
- style?: React.CSSProperties
## Accessibility contract
- keys: -
- aria: role=img, aria-label(요약)
- notes: .ds-sr-only 표로 같은 수치 노출
## Unverified
- Browser behaviour is not verified here (static source check only).
Supported environment
The Lift 1.2.3 reference implementation is a React 18 function component with inline styles referencing Product tokens (hsl(var(--*))), so styles.product.css must be loaded. The mapping to an npm package could not be verified in this repository.
API
Copied from BarChartProps in components/_types.d.ts.
| prop | type | default | doc |
|---|---|---|---|
data | BarDatum[] | — | |
orientation | "vertical" | "horizontal" | — | |
palette | "brand" | "categorical" | — | 기본 "brand" — 브랜드 스케일 한 계열(--chart-brand-1…5). 계열이 다른 항목만 "categorical". |
height | number | — | |
max | number | — | |
unit | string | — | |
title | string | — | |
valueFormat | (value: number) => string | — | |
showValues | boolean | — | |
style | React.CSSProperties | — |
BarDatum
| field | type | default | doc |
|---|---|---|---|
label required | string | — | |
value required | number | — | |
color | string | — |
Code
One import line plus the example code from the usage note.
import { BarChart } from "./components/data/BarChart.jsx";<BarChart title="모델별 정확도" unit="%" data={[{label:"solar-pro3",value:92.4},{label:"solar-pro2",value:88.1}]} />
<BarChart orientation="horizontal" title="문서 유형 분포" palette="categorical" data={rows} />// ✗ Recharts 기본 툴팁. 항목 글자가 계열 색(라임)이다
<Tooltip />
// ✓ 항목과 제목 글자를 중립 토큰으로 덮는다. 앱 공통 프리셋 하나로 모든 차트에 적용한다
<Tooltip itemStyle={{ color: "hsl(var(--popover-foreground))" }} labelStyle={{ color: "hsl(var(--popover-foreground))" }} />Token bindings
Tokens the implementation references with var(). Names assembled at runtime (e.g. --state-${tone}-fg) are not listed.
--border, --chart-, --chart-brand-, --duration-normal, --ease-decelerate, --font-sans, --foreground, --muted, --muted-foreground
Source
components/data/BarChart.jsximplementation · sha256 6f50499aa095…components/_types.d.tsapi · BarChartPropscomponents/data/BarChart.prompt.mdusage-note · sha256 5b605d9539c0…kit/rules/a11y-contract.jsona11y · BarChart