# TreemapChartEngine

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

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

```rust
struct TreemapChartEngine
```



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

## Members

- [`layout`](#function-layout)
- [`measure`](#function-measure)
- [`measure_with_labels`](#function-measure_with_labels)

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

### layout

```rust
fn layout(nodes: &[TreemapNode], rect: Rect, padding: f64) -> Vec<TreemapTile>
```

The tiles of one series laid out in `rect`, in the order the source emits them: each
level squarified in descending weight, a node followed by its descendants.

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

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

### measure

```rust
fn measure(size: Size, series: &[TreemapSeries], options: &TreemapOptions) -> Result<Scene, ChartError>
```



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

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

### measure_with_labels

```rust
fn measure_with_labels(size: Size, series: &[TreemapSeries], options: &TreemapOptions, measure_text: impl FnMut(&str, f64) -> Size) -> Result<Scene, ChartError>
```

Native hosts supply their text metrics here, so that labels are culled with the typeface
that draws them.

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`

## Availability

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