reopt design
DocsExploreTemplatesCanvasToolsPricing
Login
opt-uiopt-chartsopt-datagridopt-editoropt-calendaropt-filemanageropt-chatopt-shellbrandapp-ui
opt-charts40
Treemap
reopt designreopt design

A design system for the AI era

  • Docs
  • Pricing
  • Releases
  • About
  • Contact
  • Terms of Service
  • Privacy Policy

reopt Inc.Business registration no. 217-88-02453contact@reopt.ai

© 2026 reopt Inc. All rights reserved.

Treemap

Chart

Show hierarchical proportions as area-scaled rectangles with category colors, tooltips, titles, and keyboard focus.

heatmap
Related docs
bun add @reopt-ai/opt-charts
Install and import
bash
bun add @reopt-ai/opt-charts
tsx
import { Treemap } from "@reopt-ai/opt-charts";

Live preview

Change the width and theme, then interact with the components.

100%

유입 채널 구성

계층 데이터

지역 > 도시

Treemap

PropTypeDefaultDescription
dataRequiredTreemapDataNode[]—노드 배열 (name, value, children, color)
dataKeystring"value"면적 계산에 사용할 값 키
heightnumber | `${number}%`300차트 높이
showTooltipbooleantrue툴팁 표시 여부
animatebooleantruefalse면 애니메이션을 끈다. 그 외에는 prefers-reduced-motion을 따른다
aspectRationumber4 / 3타일 배치가 목표로 하는 가로세로 비율
valueFormatter(value: number) => string—값을 표시 문자열로 바꾸는 함수. 기본은 locale 인식 숫자 포맷
accessibleTablebooleanfalse스크린 리더용으로 숨긴 데이터 표를 함께 렌더링
labelsTreemapLabels—지역화 문자열 (empty·summaryCaption·chartName·nameColumn·valueColumn)
tooltipOptionsChartTooltipContentProps—ChartTooltipContent에 그대로 넘길 옵션
localestring—기본 숫자 포맷에 쓰는 locale. 생략하면 런타임 locale
loadingbooleanfalse새 데이터를 불러오는 동안 현재 렌더를 흐리게 유지
emptyStateReact.ReactNode—데이터가 없을 때 보여줄 내용. 기본은 labels.empty
classNamestring—루트 요소에 붙는 CSS 클래스
aria-labelstring—스크린 리더용 레이블. 생략하면 차트 종류와 항목 이름으로 만든다
aria-describedbystring—차트를 설명하는 요소의 id
View test results

테스트 커버리지

2026년 7월 9일

생성된 테스트 결과를 찾지 못했습니다.

Treemap 항목이 문서 메타에 연결되어 있지만 현재 생성 파일에는 없습니다.

테스트를 추가한 뒤 `bun run generate:test-results`를 실행하거나 `testDescribe` 매핑을 다시 확인하세요.

Related components

opt-charts

ChartContainer

Charts

Wrap Recharts ResponsiveContainer with accessible attributes and consistent chart styling.

opt-charts

ChartTooltip

Charts

Style Recharts tooltips with tooltip semantics and hidden decorative markers through the content prop.

opt-charts

ChartLegend

Charts

Display chart legends as lists, with real buttons for interactive series toggles.

opt-charts

CalendarHeatmap

Charts

Show daily activity across a year in a GitHub-style calendar heatmap.

opt-charts

Heatmap

Charts

Visualize row-by-column intensity while retaining table headings and values for screen readers.

opt-charts

RetentionHeatmap

Charts

Compare cohort retention using color intensity in a heatmap.

PreviousRadialBarChartNextHistogram