# TreemapNode

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

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

```rust
struct TreemapNode
```

A node of a treemap series (`TreemapNode`). A leaf carries its weight in `Value`; an internal
node has `Children` (an empty list is still an internal node) and either an explicit nonzero
value or the sum of its children.

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`with_value`](#function-with_value)
- [`with_children`](#function-with_children)
- [`entity_id`](#function-entity_id)
- [`name`](#function-name)
- [`set_name`](#function-set_name)
- [`value`](#function-value)
- [`set_numeric_value`](#function-set_numeric_value)
- [`children`](#function-children)
- [`set_children`](#function-set_children)
- [`name_property`](#function-name_property)
- [`value_property`](#function-value_property)
- [`children_property`](#function-children_property)

<a id="assoc_const-type"></a>

### TYPE

```rust
const TYPE: &'static $crate::TypeInfo
```

The runtime type of this class.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L175)

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

### to_ref

```rust
fn to_ref(self: &Self) -> $crate::Ref<TreemapNode>
```

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L175)

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

### construct

```rust
fn construct() -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L179)

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

### new

```rust
fn new() -> Ref<Self>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L185)

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

### with_value

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

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

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L189)

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

### with_children

```rust
fn with_children(name: impl Into<String>, children: TreemapNodes) -> Ref<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.Controls.LiveCharts/node_models.rs#L196)

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

### entity_id

```rust
fn entity_id(self: &Self) -> u64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L202)

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

### name

```rust
fn name(self: &Self) -> String
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L205)

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

### set_name

```rust
fn set_name(self: &Self, value: String)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L208)

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

### value

```rust
fn value(self: &Self) -> f64
```

The weight of the node (`Value`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L212)

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

### set_numeric_value

```rust
fn set_numeric_value(self: &Self, value: f64)
```

Sets `Value`; named apart from the property system's `set_value`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L216)

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

### children

```rust
fn children(self: &Self) -> Option<TreemapNodes>
```

The children, or `None` for a leaf.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L220)

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

### set_children

```rust
fn set_children(self: &Self, value: Option<TreemapNodes>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L223)

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

### name_property

```rust
fn name_property() -> &'static StyledProperty<String>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L227)

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

### value_property

```rust
fn value_property() -> &'static StyledProperty<f64>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L227)

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

### children_property

```rust
fn children_property() -> &'static StyledProperty<Option<TreemapNodes>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L227)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<TreemapNode>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)
- [`ObjectType`](/docs/0.5.0/api/ferroui-base/trait-objecttype/)
- [`Subclassable<T>`](/docs/0.5.0/api/ferroui-base/trait-subclassable/)
- [`DefaultConstructible`](/docs/0.5.0/api/ferroui-base/trait-defaultconstructible/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)

## Availability

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