# ChartValueFormat

An immutable numeric display policy shared by axes, marks, totals and compact visuals.

 Class  

`ChartForgeX.Core`

**Namespace**

`ChartForgeX.Core`

**Assembly**

`ChartForgeX`

**Source**

[ChartValueFormat.cs:25](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartValueFormat.cs#L25)

**Modifiers**

sealed

An immutable numeric display policy shared by axes, marks, totals and compact visuals.

## Inheritance

- object
- ChartValueFormat

## Remarks

Culture data is copied at construction. A custom callback remains responsible for its own captured state.

## Usage

 Explore 24 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 10

- Property [ChartAxis.ValueFormat](/api/chartforgex-core-chartaxis/#property-valueformat)
- Property [ChartColorDimensionOptions.ValueFormat](/api/chartforgex-core-chartcolordimensionoptions/#property-valueformat)
- Property [ChartOptions.ValueFormat](/api/chartforgex-core-chartoptions/#property-valueformat)
- Property [ChartSizeDimensionOptions.ValueFormat](/api/chartforgex-core-chartsizedimensionoptions/#property-valueformat)
- Method [ChartValueFormat.Compact](/api/chartforgex-core-chartvalueformat/#method-compact-globalization-cultureinfo)
- Method [ChartValueFormat.Custom](/api/chartforgex-core-chartvalueformat/#method-custom-func-system-double-system-string)
- Method [ChartValueFormat.Number](/api/chartforgex-core-chartvalueformat/#method-number-string-globalization-cultureinfo)
- Property [Sparkline.ValueFormat](/api/chartforgex-core-sparkline/#property-valueformat)
- Property [MermaidTreemapRenderOptions.ValueFormat](/api/chartforgex-mermaid-mermaidtreemaprenderoptions/#property-valueformat)
- Property [VisualArtifactInterchangeWaterfallArtifact.ValueFormat](/api/chartforgex-visualartifacts-visualartifactinterchangewaterfallartifact/#property-valueformat)

### Accepted by parameters 14

- Extension method [Chart.ValueFormat](/api/chartforgex-core-chart/#extension-valueformat-chartforgex-core-chart-chartforgex-core-chartvalueformat) parameter `value`
- Extension method [ChartAxis.ValueFormat](/api/chartforgex-core-chartaxis/#extension-valueformat-chartforgex-core-chartaxis-chartforgex-core-chartvalueformat) parameter `value`
- Method [ChartAxisFluent.ValueFormat](/api/chartforgex-core-chartaxisfluent/#method-valueformat-chartforgex-core-chartaxis-chartforgex-core-chartvalueformat) parameter `value`
- Extension method [ChartColorDimensionOptions.ValueFormat](/api/chartforgex-core-chartcolordimensionoptions/#extension-valueformat-chartforgex-core-chartcolordimensionoptions-chartforgex-core-chartvalueformat) parameter `value`
- Method [ChartColorDimensionOptionsFluent.ValueFormat](/api/chartforgex-core-chartcolordimensionoptionsfluent/#method-valueformat-chartforgex-core-chartcolordimensionoptions-chartforgex-core-chartvalueformat) parameter `value`
- Method [ChartFluent.ValueFormat](/api/chartforgex-core-chartfluent/#method-valueformat-chartforgex-core-chart-chartforgex-core-chartvalueformat) parameter `value`
- Extension method [ChartOptions.ValueFormat](/api/chartforgex-core-chartoptions/#extension-valueformat-chartforgex-core-chartoptions-chartforgex-core-chartvalueformat) parameter `value`
- Method [ChartOptionsFluent.ValueFormat](/api/chartforgex-core-chartoptionsfluent/#method-valueformat-chartforgex-core-chartoptions-chartforgex-core-chartvalueformat) parameter `value`
- Extension method [ChartSizeDimensionOptions.ValueFormat](/api/chartforgex-core-chartsizedimensionoptions/#extension-valueformat-chartforgex-core-chartsizedimensionoptions-chartforgex-core-chartvalueformat) parameter `value`
- Method [ChartSizeDimensionOptionsFluent.ValueFormat](/api/chartforgex-core-chartsizedimensionoptionsfluent/#method-valueformat-chartforgex-core-chartsizedimensionoptions-chartforgex-core-chartvalueformat) parameter `value`
- Extension method [Sparkline.ValueFormat](/api/chartforgex-core-sparkline/#extension-valueformat-chartforgex-core-sparkline-chartforgex-core-chartvalueformat) parameter `value`
- Method [SparklineFluent.ValueFormat](/api/chartforgex-core-sparklinefluent/#method-valueformat-chartforgex-core-sparkline-chartforgex-core-chartvalueformat) parameter `value`
- Method [ChartTableCell.FromValue](/api/chartforgex-visualblocks-charttablecell/#method-fromvalue-double-chartforgex-core-chartvalueformat) parameter `format`
- Method [MetricCard.Metric](/api/chartforgex-visualblocks-metriccard/#method-metric-string-double-chartforgex-core-chartvalueformat-string) parameter `format`

 Filter members   

    Show inherited   

 

## Methods

 `public static ChartValueFormat Compact(CultureInfo? culture = null)` [#](#method-compact-globalization-cultureinfo) 

[ChartValueFormat.cs:31](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartValueFormat.cs#L31)

Uses compact k, M and B suffixes, invariant by default.

Parameters

**culture System.Globalization.CultureInfo? = null optional**

Returns

 `ChartValueFormat` 

 `public static ChartValueFormat Custom(Func<double, string> formatter)` [#](#method-custom-func-system-double-system-string) 

[ChartValueFormat.cs:35](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartValueFormat.cs#L35)

Uses a custom formatter. A null result is displayed as empty text.

Parameters

**formatter System.Func<double, string> required**

Returns

 `ChartValueFormat` 

 `public string Format(double value)` [#](#method-format-double) 

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

Formats a finite numeric observation.

Parameters

**value double required**

Returns

 `string` 

 `public static ChartValueFormat Number(string format = "0.##", CultureInfo? culture = null)` [#](#method-number-string-globalization-cultureinfo) 

[ChartValueFormat.cs:25](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartValueFormat.cs#L25)

Uses a .NET numeric format and an explicit culture, invariant by default.

Parameters

**format string = "0.##" optional**

**culture System.Globalization.CultureInfo? = null optional**

Returns

 `ChartValueFormat` 

## Inherited Methods

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

Inherited from object

Parameters

**obj object? required**

Returns

 `bool` 

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

Inherited from object

Returns

 `int` 

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

Inherited from object

Returns

 `Type` 

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

Inherited from object

Returns

 `string?` 

## Properties

 `public CultureInfo Culture { get; }` [#](#property-culture) 

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

Gets the detached, read-only display culture.

<!-- PowerForge markdown artifact sha256:908C3D33F56A0344F60FDD33F1C4208FB96921F8F542CACEA4EC2F23AE77636C -->
