Skip to content
ChartForgeX
Class

ChartBarOptions

ChartForgeX.Core

Namespace
ChartForgeX.Core
Assembly
ChartForgeX
Modifiers
sealed
Attributes
Fluent(Copy = "Clone")

Bar layout, stacking and styling. Configure it through ChartOptions.Bars.

Inheritance

  • object
  • ChartBarOptions

Usage

Explore 37 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.

Accepted by parameters 22

Constructors

public ChartBarOptions() #

Properties

public ChartBarMode Mode { get; set; } #
FluentPreset("Grouped", 0, Summary = "Places bars of one category side by side.") FluentPreset("Stacked", 1, Summary = "Stacks bars of one category.")

Gets or sets how multiple bar series are arranged within each category.

public ChartBarStyle Style { get; set; } #

Gets or sets the visual treatment used by bar and horizontal-bar renderers.

public ChartBarVisualStyle VisualStyle { get; set; } #
NoFluent

Gets or sets reusable visual tokens for bar and horizontal-bar renderers.

public bool ShowTotals { get; set; } #

Gets or sets a value indicating whether stacked bar totals are rendered above each category.

public double? MaxWidth { get; set; } #

Maximum regular bar thickness in drawing pixels, or null to use the theme's 64-pixel default. Histograms retain their bin widths.

Extension Methods

public static ChartBarOptions Grouped(ChartBarOptions 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) #

Sets ChartBarOptions.MaxWidth: 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

// C# initializer or property                                         // C# fluent
new global::ChartForgeX.Core.ChartBarOptions { MaxWidth = value };    chartBarOptions.MaxWidth(value);
public static ChartBarOptions Mode(ChartBarOptions chartBarOptions, ChartBarMode value) #

Sets ChartBarOptions.Mode: 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

// 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) #

Sets ChartBarOptions.ShowTotals: 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

// C# initializer or property                                           // C# fluent
new global::ChartForgeX.Core.ChartBarOptions { ShowTotals = value };    chartBarOptions.ShowTotals(value);
public static ChartBarOptions Stacked(ChartBarOptions 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) #

Sets ChartBarOptions.Style: 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

// 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) #

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) #

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.