# ChartPieSliceLabelContext

Provides pie and donut slice values to custom slice label formatters.

 Struct  

`ChartForgeX.Core`

**Namespace**

`ChartForgeX.Core`

**Assembly**

`ChartForgeX`

**Source**

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

**Base**

`ValueType`

**Modifiers**

sealed

Provides pie and donut slice values to custom slice label formatters.

## Inheritance

- ValueType
- ChartPieSliceLabelContext

## Usage

 Explore 3 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 1

- Property [ChartPieOptions.SliceLabelFormatter](/api/chartforgex-core-chartpieoptions/#property-slicelabelformatter)

### Accepted by parameters 2

- Extension method [ChartPieOptions.SliceLabelBy](/api/chartforgex-core-chartpieoptions/#extension-slicelabelby-chartforgex-core-chartpieoptions-func-chartforgex-core-chartpieslicelabelcontext-system-string) parameter `value`
- Method [ChartPieOptionsFluent.SliceLabelBy](/api/chartforgex-core-chartpieoptionsfluent/#method-slicelabelby-chartforgex-core-chartpieoptions-func-chartforgex-core-chartpieslicelabelcontext-system-string) parameter `value`

 Filter members   

    Show inherited   

 

## Constructors

 `public ChartPieSliceLabelContext(string seriesName, string label, double value, double percent, string formattedValue, string formattedPercent, int pointIndex)` [#](#constructor-ctor-string-string-double-double-string-string-int32) 

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

Initializes a new instance of the [ChartPieSliceLabelContext](/api/chartforgex-core-chartpieslicelabelcontext/) struct.

Parameters

**seriesName string required**

**label string required**

**value double required**

**percent double required**

**formattedValue string required**

**formattedPercent string required**

**pointIndex int required**

## 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 SeriesName { get; }` [#](#property-seriesname) 

[ChartPieSliceLabelContext.cs:21](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartPieSliceLabelContext.cs#L21)

Gets the series name.

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

[ChartPieSliceLabelContext.cs:24](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartPieSliceLabelContext.cs#L24)

Gets the slice category label.

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

[ChartPieSliceLabelContext.cs:27](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartPieSliceLabelContext.cs#L27)

Gets the raw slice value.

 `public double Percent { get; }` [#](#property-percent) 

[ChartPieSliceLabelContext.cs:30](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartPieSliceLabelContext.cs#L30)

Gets the slice percentage as a ratio from zero to one.

 `public string FormattedValue { get; }` [#](#property-formattedvalue) 

[ChartPieSliceLabelContext.cs:33](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartPieSliceLabelContext.cs#L33)

Gets the slice value formatted with the chart value formatter.

 `public string FormattedPercent { get; }` [#](#property-formattedpercent) 

[ChartPieSliceLabelContext.cs:36](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartPieSliceLabelContext.cs#L36)

Gets the slice percentage formatted as display text.

 `public int PointIndex { get; }` [#](#property-pointindex) 

[ChartPieSliceLabelContext.cs:39](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartPieSliceLabelContext.cs#L39)

Gets the zero-based point index.

<!-- PowerForge markdown artifact sha256:E6CFBB0D41EE7A1CC0875EAF86ACE8E0C52C8C6348F405AC35790A00CD0F1D91 -->
