# HierarchyTable

> Hidden table: every node below the root with its value and share of the total.

Source: https://ui.jcsoftdev.com/docs/components/hierarchy-table

Hidden table: every node below the root with its value and share of the total.

## Import

```ts
import { HierarchyTable } from "@jcsoftdev/ui/charts";
```

Single-component entry points tree-shake to just this component: `@jcsoftdev/ui/charts/core`.

## Usage

```tsx
<HierarchyTable
  root={root}
  caption="Servicios por sede y barbero"
  labels={labels}
/>
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `root` * | `HierarchyNode` |  |  |
| `caption` * | `string` |  |  |
| `format` * | `ValueFormatter` |  |  |
| `labels` * | `HierarchyLabels` |  |  |

`*` marks a required prop.

## Storybook stories

- [Default](/storybook/?path=/story/charts-primitives-hierarchytable--default)
- [From Branch](/storybook/?path=/story/charts-primitives-hierarchytable--from-branch)

## Source

`packages/ui/src/charts/core/hierarchy-chart.tsx`
