# ChartBarOptionsFluent

Hand-written methods of ChartBarOptions: an assigned bar style overrides theme geometry, while a callback refines it.

 Class  

`ChartForgeX.Core`

**Namespace**

`ChartForgeX.Core`

**Assembly**

`ChartForgeX`

**Source**

[Chart.Shortcuts.cs:56](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/Chart.Shortcuts.cs#L56)

**Modifiers**

static

Hand-written methods of [ChartBarOptions](/api/chartforgex-core-chartbaroptions/): an assigned bar style overrides theme geometry, while a callback refines it.

## Inheritance

- object
- ChartBarOptionsFluent

 Filter members   

    Show inherited   

 

## Methods

 `public static ChartBarOptions Grouped(ChartBarOptions chartBarOptions)` [#](#method-grouped-chartforgex-core-chartbaroptions) 

Places bars of one category side by side.

Parameters

**chartBarOptions ChartForgeX.Core.ChartBarOptions required**

The instance.

Returns

 `ChartBarOptions` The same instance. 

 `public static ChartBarOptions MaxWidth(ChartBarOptions chartBarOptions, double? value)` [#](#method-maxwidth-chartforgex-core-chartbaroptions-nullable-system-double) 

Sets [ChartBarOptions.MaxWidth](/api/chartforgex-core-chartbaroptions/): Maximum regular bar thickness in drawing pixels, or null to use the theme's 64-pixel default. Histograms retain their bin widths.

Parameters

**chartBarOptions ChartForgeX.Core.ChartBarOptions required**

The instance.

**value double? required**

The value.

Returns

 `ChartBarOptions` The same instance. 

Examples

```csharp
// C# initializer or property                                         // C# fluent
new global::ChartForgeX.Core.ChartBarOptions { MaxWidth = value };    chartBarOptions.MaxWidth(value);
```

 `public static ChartBarOptions Mode(ChartBarOptions chartBarOptions, ChartBarMode value)` [#](#method-mode-chartforgex-core-chartbaroptions-chartforgex-core-chartbarmode) 

Sets [ChartBarOptions.Mode](/api/chartforgex-core-chartbaroptions/): Gets or sets how multiple bar series are arranged within each category.

Parameters

**chartBarOptions ChartForgeX.Core.ChartBarOptions required**

The instance.

**value ChartForgeX.Core.ChartBarMode required**

The value.

Returns

 `ChartBarOptions` The same instance. 

Examples

```csharp
// C# initializer or property                                     // C# fluent
new global::ChartForgeX.Core.ChartBarOptions { Mode = value };    chartBarOptions.Mode(value);
```

 `public static ChartBarOptions ShowTotals(ChartBarOptions chartBarOptions, bool value = true)` [#](#method-showtotals-chartforgex-core-chartbaroptions-boolean) 

Sets [ChartBarOptions.ShowTotals](/api/chartforgex-core-chartbaroptions/): Gets or sets a value indicating whether stacked bar totals are rendered above each category.

Parameters

**chartBarOptions ChartForgeX.Core.ChartBarOptions required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

 `ChartBarOptions` The same instance. 

Examples

```csharp
// C# initializer or property                                           // C# fluent
new global::ChartForgeX.Core.ChartBarOptions { ShowTotals = value };    chartBarOptions.ShowTotals(value);
```

 `public static ChartBarOptions Stacked(ChartBarOptions chartBarOptions)` [#](#method-stacked-chartforgex-core-chartbaroptions) 

Stacks bars of one category.

Parameters

**chartBarOptions ChartForgeX.Core.ChartBarOptions required**

The instance.

Returns

 `ChartBarOptions` The same instance. 

 `public static ChartBarOptions Style(ChartBarOptions chartBarOptions, ChartBarStyle value)` [#](#method-style-chartforgex-core-chartbaroptions-chartforgex-core-chartbarstyle) 

Sets [ChartBarOptions.Style](/api/chartforgex-core-chartbaroptions/): Gets or sets the visual treatment used by bar and horizontal-bar renderers.

Parameters

**chartBarOptions ChartForgeX.Core.ChartBarOptions required**

The instance.

**value ChartForgeX.Core.ChartBarStyle required**

The value.

Returns

 `ChartBarOptions` The same instance. 

Examples

```csharp
// C# initializer or property                                      // C# fluent
new global::ChartForgeX.Core.ChartBarOptions { Style = value };    chartBarOptions.Style(value);
```

 VisualStyle 2 overloads 

 `public static ChartBarOptions VisualStyle(ChartBarOptions bars, ChartBarVisualStyle style)` [#](#method-visualstyle-chartforgex-core-chartbaroptions-chartforgex-core-chartbarvisualstyle) 

[Chart.Shortcuts.cs:56](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/Chart.Shortcuts.cs#L56)

Sets the bar style. An assigned style overrides the theme's bar corner radius.

Parameters

**bars ChartForgeX.Core.ChartBarOptions required**

The bar options to configure.

**style ChartForgeX.Core.ChartBarVisualStyle required**

The style; a copy is stored.

Returns

 `ChartBarOptions` The same options. 

 `public static ChartBarOptions VisualStyle(ChartBarOptions bars, Action<ChartBarVisualStyle> configure)` [#](#method-visualstyle-chartforgex-core-chartbaroptions-action-chartforgex-core-chartbarvisualstyle) 

[Chart.Shortcuts.cs:66](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/Chart.Shortcuts.cs#L66)

Refines the bar style on a copy, installed when the callback returns. Unlike assigning a style, it keeps the theme's corner radius unless the callback sets one.

Parameters

**bars ChartForgeX.Core.ChartBarOptions required**

The bar options to configure.

**configure System.Action<ChartForgeX.Core.ChartBarVisualStyle> required**

Edits the copy.

Returns

 `ChartBarOptions` The same options. 

## 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?` 

<!-- PowerForge markdown artifact sha256:70FED9ECF2094B682C1EC71C2F9160B5B7D75739B1538E73A406A248D32DF0AB -->
