# TreemapNode

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-livecharts/treemap_chart_engine/struct-treemapnode/

**struct** · [`ferroui-livecharts`](/docs/0.5.0/api/ferroui-livecharts/) · v0.5.0

```rust
struct TreemapNode
```

A node of a treemap (`Defaults/TreemapNode`). A leaf carries its weight in `value`; an internal
node either carries an explicit nonzero value or rolls its children up. `children` is `None`
for a leaf; `Some` of an empty list is an internal node without children, which has no hover
area and no label, as in the source.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/treemap_chart_engine.rs#L17)

## Members

- [`name`](#struct_field-name)
- [`value`](#struct_field-value)
- [`children`](#struct_field-children)
- [`new`](#function-new)
- [`with_children`](#function-with_children)

<a id="struct_field-name"></a>

### name

```rust
name: String
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/treemap_chart_engine.rs#L18)

<a id="struct_field-value"></a>

### value

```rust
value: f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/treemap_chart_engine.rs#L19)

<a id="struct_field-children"></a>

### children

```rust
children: Option<Vec<TreemapNode>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/treemap_chart_engine.rs#L20)

<a id="function-new"></a>

### new

```rust
fn new(value: f64, name: impl Into<String>) -> Self
```

A leaf of the given weight (`TreemapNode(value, name)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/treemap_chart_engine.rs#L24)

<a id="function-with_children"></a>

### with_children

```rust
fn with_children(name: impl Into<String>, children: Vec<TreemapNode>) -> Self
```

An internal node whose weight is the sum of its children (`TreemapNode(name, children)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/treemap_chart_engine.rs#L32)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- [`PropertyValue`](/docs/0.5.0/api/ferroui-base/trait-propertyvalue/)
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Debug`
- `Default`
- `StructuralPartialEq`
- `PartialEq`

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
