ValyroUI English version

Treemap

Иерархии площадями с переходом по уровням. Pro · Графики и аналитика › Доли и структура

Установка

npx valyro-cli@latest login
npx valyro-cli@latest add treemap
npm install valyro-ui-pro

import 'valyro-ui-pro/styles.css';
import { Treemap } from 'valyro-ui-pro';

Пропсы

PropTypeDefault
data *TreemapNode[]Top-level nodes; tile area follows each leaf's value (groups: the sum of their children).
heightnumber360Plot height in px; width follows the container. Default 360.
colorBy'group' | 'value''group'group: each top-level node gets a palette color. value: one color, darker for larger values.
colorstring'var(--ui-chart-1)'Color of the value scale. Default --ui-chart-1.
depthnumber2Levels drawn at once: groups with a header and their children inside. Default 2.
drillDownbooleantrueClick or Enter on a tile zooms into its group; a breadcrumb leads back. Default true.
onNodeClick(node: TreemapNode, path: TreemapNode[]) => voidCalled on click / Enter with the node and its ancestors (outermost first).
valueFormatterValueFormatterFormats values on the tiles, in the tooltip and the data table.
localestringBCP 47 locale for the default number formatting. Default: the ThemeProvider locale, then the browser's.
labelsPartial<TreemapLabels>Overrides for the built-in strings.
loadingbooleanfalseShows a placeholder of the same height while data loads.
actionsReactNodeContent at the end of the breadcrumb row (with drillDown), e.g. a hint or the selected path.
ariaLabel *stringAccessible name of the chart (also the caption of its sr-only data table).

Похожие компоненты

  • Donut Chart — Кольцевые диаграммы
  • Funnel Chart — Воронки конверсии
  • Sankey Chart — Диаграммы потоков между этапами
  • Radar Chart — Лепестковые диаграммы для сравнения профилей
  • Line Chart — Линейные графики
  • Bar Chart — Столбчатые диаграммы
  • Area Chart — Графики с заливкой
  • Scatter Chart — Точечные и пузырьковые диаграммы с линией тренда
  • Sparkline — Мини-графики
  • Confidence Band Chart — Прогноз с доверительными интервалами и выбросами, точки читаются с клавиатуры
  • Candlestick Chart — Биржевые свечи с объёмами и скользящими средними
  • Heatmap — Тепловые карты

Назад: Donut Chart · Далее: Funnel Chart · Весь раздел «Графики и аналитика»