# ChartHierarchyItem

An area-hierarchy node with explicit identity, optional parent, authored size and independent numeric color.

 Struct  

`ChartForgeX.Core`

**Namespace**

`ChartForgeX.Core`

**Assembly**

`ChartForgeX`

**Source**

[ChartHierarchyItem.cs:22](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartHierarchyItem.cs#L22)

**Base**

`ValueType`

**Modifiers**

sealed

An area-hierarchy node with explicit identity, optional parent, authored size and independent numeric color.

## Inheritance

- ValueType
- ChartHierarchyItem

## Usage

 Explore 8 API references to this type 

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 2

- Property [ChartSeries.HierarchyItems](/api/chartforgex-core-chartseries/#property-hierarchyitems)
- Property [ChartSunburstLabelContext.Item](/api/chartforgex-core-chartsunburstlabelcontext/#property-item)

### Accepted by parameters 6

- Method [Chart.AddSunburst](/api/chartforgex-core-chart/#method-addsunburst-string-collections-generic-ienumerable-chartforgex-core-charthierarchyitem-nullable-chartforgex-primitives-chartcolor) parameter `items`
- Method [Chart.AddTreemap](/api/chartforgex-core-chart/#method-addtreemap-string-collections-generic-ienumerable-chartforgex-core-charthierarchyitem-nullable-chartforgex-primitives-chartcolor) parameter `items`
- Method [ChartSeries.CreateSunburst](/api/chartforgex-core-chartseries/#method-createsunburst-chartforgex-core-chartseriesid-string-collections-generic-ienumerable-chartforgex-core-charthierarchyitem-nullable-chartforgex-primitives-chartcolor) parameter `items`
- Method [ChartSeries.CreateTreemap](/api/chartforgex-core-chartseries/#method-createtreemap-chartforgex-core-chartseriesid-string-collections-generic-ienumerable-chartforgex-core-charthierarchyitem-nullable-chartforgex-primitives-chartcolor) parameter `items`
- Method [ChartSeries.ReplaceHierarchyItems](/api/chartforgex-core-chartseries/#method-replacehierarchyitems-collections-generic-ienumerable-chartforgex-core-charthierarchyitem) parameter `items`
- Constructor [ChartSunburstLabelContext.ChartSunburstLabelContext](/api/chartforgex-core-chartsunburstlabelcontext/#constructor-ctor-chartforgex-core-charthierarchyitem-double-string) parameter `item`

 Filter members   

    Show inherited   

 

## Constructors

 `public ChartHierarchyItem(string id, string label, string? parentId = null, double? value = null, double? colorValue = null)` [#](#constructor-ctor-string-string-string-nullable-system-double-nullable-system-double) 

[ChartHierarchyItem.cs:22](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartHierarchyItem.cs#L22)

Creates a node. Leaf/group size requirements are validated with the complete item collection and chart policy.

Parameters

**id string required**

**label string required**

**parentId string? = null optional**

**value double? = null optional**

**colorValue double? = null optional**

## Inherited Methods

 `public override bool Equals(object? obj)` [#](#method-equals-object) 

Inherited from ValueType

Parameters

**obj object? required**

Returns

 `bool` 

 `public override int GetHashCode()` [#](#method-gethashcode) 

Inherited from ValueType

Returns

 `int` 

 `public Type GetType()` [#](#method-gettype) 

Inherited from object

Returns

 `Type` 

 `public override string? ToString()` [#](#method-tostring) 

Inherited from ValueType

Returns

 `string?` 

## Properties

 `public string Id { get; }` [#](#property-id) 

[ChartHierarchyItem.cs:9](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartHierarchyItem.cs#L9)

Gets the authored ID used by parents and interactive targets.

 `public string Label { get; }` [#](#property-label) 

[ChartHierarchyItem.cs:11](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartHierarchyItem.cs#L11)

Gets the display label, which may repeat on other nodes.

 `public string? ParentId { get; }` [#](#property-parentid) 

[ChartHierarchyItem.cs:13](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartHierarchyItem.cs#L13)

Gets the parent ID, or null for a root or standalone leaf.

 `public double? Value { get; }` [#](#property-value) 

[ChartHierarchyItem.cs:15](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartHierarchyItem.cs#L15)

Gets the authored size. Leaves require a value; the chart's parent-value policy determines group sizing.

 `public double? ColorValue { get; }` [#](#property-colorvalue) 

[ChartHierarchyItem.cs:17](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartHierarchyItem.cs#L17)

Gets the independent numeric color value, or null when no color measurement is supplied.

<!-- PowerForge markdown artifact sha256:4163BB5494B0E6BF59423DCD764EEF0DB248466BA02909B22691A3E5E1085703 -->
