Skip to content
ConsoleMonster
Class

ChartOptions

ConsoleMonster.Widgets

Namespace
ConsoleMonster.Widgets
Assembly
ConsoleMonster
Modifiers
sealed

Presence-aware numeric chart configuration, shared by the C# factory and PowerShell.

Inheritance

  • object
  • ChartOptions

Usage

Explore 116 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 53

Accepted by parameters 63

Constructors

public ChartOptions() #

Properties

public ChartType Type { get; set; } #

The numeric chart kind.

public string? WidgetId { get; set; } #

The live identifier; omitted uses the chart kind.

public string? Unit { get; set; } #

The unit on numeric labels.

public string? Label { get; set; } #

The sparkline label.

public int? Height { get; set; } #

The plot height; omitted uses the selected kind default.

public double? Minimum { get; set; } #

The lower numeric limit.

public double? Maximum { get; set; } #

The upper numeric limit.

public ThemeToken? Role { get; set; } #

The chart color role.

public BarShape Shape { get; set; } #

The bar shape.

public double? Warning { get; set; } #

The warning threshold.

public double? Critical { get; set; } #

The critical threshold.

public bool ShowLatest { get; set; } #

Whether the latest sparkline value is shown.

public double[]? Edges { get; set; } #

Strictly ascending histogram bucket edges.

public double[]? Values { get; set; } #

Initial numeric samples.

public ColumnFormat? ValueColumn { get; set; } #

The bar numeric-column format.

public ColumnFormat? CountColumn { get; set; } #

The stacked numeric-column format.

public ColumnFormat? PercentColumn { get; set; } #

The stacked percent-column format.

public ColumnFormat? LabelColumn { get; set; } #

The stacked legend-label format.

public bool ShowValues { get; set; } #

Whether Bar charts show each numeric value.

public bool Signed { get; set; } #

Whether Bar charts reserve space on both sides of zero.

public bool ShowLegend { get; set; } #

Whether Stacked charts show their legend.

public int MaxLegendColumns { get; set; } #

Maximum Stacked legend columns; zero fits the available width.

public int? Capacity { get; set; } #

Retained Line, Scatter or Sparkline samples; null keeps that kind's default.

public IList<ChartItem> Items { get; } #

Labelled bars or stacked segments.

public IList<ChartSeries> Series { get; } #

Typed line/scatter series, retaining per-series colors.

Extension Methods

public static ChartOptions AddItem(ChartOptions chartOptions, ChartItem item) #

Adds an item to ChartOptions.Items: Labelled bars or stacked segments.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance.
item ConsoleMonster.Widgets.ChartItem required
The item.

Returns

ChartOptions The same instance.
AddItems 2 overloads
public static ChartOptions AddItems(ChartOptions chartOptions, params ChartItem[] items) #

Adds items to ChartOptions.Items: Labelled bars or stacked segments.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance.
items ConsoleMonster.Widgets.ChartItem[] required
The items, in order.

Returns

ChartOptions The same instance.
public static ChartOptions AddItems(ChartOptions chartOptions, IEnumerable<ChartItem> items) #

Adds items to ChartOptions.Items: Labelled bars or stacked segments.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance.
items System.Collections.Generic.IEnumerable<ConsoleMonster.Widgets.ChartItem> required
The items, in order.

Returns

ChartOptions The same instance.
AddSeries 3 overloads
public static ChartOptions AddSeries(ChartOptions chartOptions, ChartSeries item) #

Adds an item to ChartOptions.Series: Typed line/scatter series, retaining per-series colors.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance.
item ConsoleMonster.Widgets.ChartSeries required
The item.

Returns

ChartOptions The same instance.
public static ChartOptions AddSeries(ChartOptions chartOptions, params ChartSeries[] items) #

Adds items to ChartOptions.Series: Typed line/scatter series, retaining per-series colors.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance.
items ConsoleMonster.Widgets.ChartSeries[] required
The items, in order.

Returns

ChartOptions The same instance.
public static ChartOptions AddSeries(ChartOptions chartOptions, IEnumerable<ChartSeries> items) #

Adds items to ChartOptions.Series: Typed line/scatter series, retaining per-series colors.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance.
items System.Collections.Generic.IEnumerable<ConsoleMonster.Widgets.ChartSeries> required
The items, in order.

Returns

ChartOptions The same instance.
public static IWidget Build(ChartOptions options) #

Creates the selected chart through the shared validated factory.

Parameters

options ConsoleMonster.Widgets.ChartOptions required
The configured definition.

Returns

IWidget The chart.
public static T Build<T>(ChartOptions options) #

Materializes a numeric chart and verifies the concrete handle type.

Type Parameters

T
The expected renderer.

Parameters

options ConsoleMonster.Widgets.ChartOptions required
The definition.

Returns

T The typed renderer.
public static ChartOptions Capacity(ChartOptions chartOptions, int? value) #

Sets ChartOptions.Capacity: Retained Line, Scatter or Sparkline samples; null keeps that kind's default.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance.
value int? required
The value.

Returns

ChartOptions The same instance.

Examples

// C# initializer or property                                            // C# fluent
new global::ConsoleMonster.Widgets.ChartOptions { Capacity = value };    Ui.Chart().Capacity(value);
CountColumn 2 overloads
public static ChartOptions CountColumn(ChartOptions chartOptions, ColumnFormat? value) #

Sets ChartOptions.CountColumn: The stacked numeric-column format.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance.
value ConsoleMonster.Layout.ColumnFormat? required
The value.

Returns

ChartOptions The same instance.

Examples

// C# initializer or property                                               // C# fluent
new global::ConsoleMonster.Widgets.ChartOptions { CountColumn = value };    Ui.Chart().CountColumn(value);
public static ChartOptions CountColumn(ChartOptions chartOptions, Action<ColumnFormat> configure) #

Configures ChartOptions.CountColumn in place: The stacked numeric-column format.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance.
configure System.Action<ConsoleMonster.Layout.ColumnFormat> required
Configures the value.

Returns

ChartOptions The same instance.
public static ChartOptions Critical(ChartOptions chartOptions, double? value) #

Sets ChartOptions.Critical: The critical threshold.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance.
value double? required
The value.

Returns

ChartOptions The same instance.

Examples

// C# initializer or property                                            // C# fluent
new global::ConsoleMonster.Widgets.ChartOptions { Critical = value };    Ui.Chart().Critical(value);
public static ChartOptions Edges(ChartOptions chartOptions, double[]? value) #

Sets ChartOptions.Edges: Strictly ascending histogram bucket edges.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance.
value double[]? required
The value.

Returns

ChartOptions The same instance.

Examples

// C# initializer or property                                         // C# fluent
new global::ConsoleMonster.Widgets.ChartOptions { Edges = value };    Ui.Chart().Edges(value);
public static void Export(ChartOptions definition, string path, string? format = null, ExportOptions? options = null, IFrameExportProvider? provider = null) #

Exports the configured definition through the shared core/add-on dispatcher.

Parameters

definition ConsoleMonster.Widgets.ChartOptions required
The configured definition.
path string required
The destination.
format string? = null optional
The format.
options ConsoleMonster.Export.ExportOptions? = null optional
The export options.
provider ConsoleMonster.Export.IFrameExportProvider? = null optional
An optional add-on provider.
public static ChartOptions Height(ChartOptions chartOptions, int? value) #

Sets ChartOptions.Height: The plot height; omitted uses the selected kind default.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance.
value int? required
The value.

Returns

ChartOptions The same instance.

Examples

// C# initializer or property                                          // C# fluent
new global::ConsoleMonster.Widgets.ChartOptions { Height = value };    Ui.Chart().Height(value);
public static ChartOptions Label(ChartOptions chartOptions, string? value) #

Sets ChartOptions.Label: The sparkline label.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance.
value string? required
The value.

Returns

ChartOptions The same instance.

Examples

// C# initializer or property                                         // C# fluent
new global::ConsoleMonster.Widgets.ChartOptions { Label = value };    Ui.Chart().Label(value);
LabelColumn 2 overloads
public static ChartOptions LabelColumn(ChartOptions chartOptions, ColumnFormat? value) #

Sets ChartOptions.LabelColumn: The stacked legend-label format.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance.
value ConsoleMonster.Layout.ColumnFormat? required
The value.

Returns

ChartOptions The same instance.

Examples

// C# initializer or property                                               // C# fluent
new global::ConsoleMonster.Widgets.ChartOptions { LabelColumn = value };    Ui.Chart().LabelColumn(value);
public static ChartOptions LabelColumn(ChartOptions chartOptions, Action<ColumnFormat> configure) #

Configures ChartOptions.LabelColumn in place: The stacked legend-label format.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance.
configure System.Action<ConsoleMonster.Layout.ColumnFormat> required
Configures the value.

Returns

ChartOptions The same instance.
public static ChartOptions Maximum(ChartOptions chartOptions, double? value) #

Sets ChartOptions.Maximum: The upper numeric limit.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance.
value double? required
The value.

Returns

ChartOptions The same instance.

Examples

// C# initializer or property                                           // C# fluent
new global::ConsoleMonster.Widgets.ChartOptions { Maximum = value };    Ui.Chart().Maximum(value);
public static ChartOptions MaxLegendColumns(ChartOptions chartOptions, int value) #

Sets ChartOptions.MaxLegendColumns: Maximum Stacked legend columns; zero fits the available width.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance.
value int required
The value.

Returns

ChartOptions The same instance.

Examples

// C# initializer or property                                                    // C# fluent
new global::ConsoleMonster.Widgets.ChartOptions { MaxLegendColumns = value };    Ui.Chart().MaxLegendColumns(value);
public static ChartOptions Minimum(ChartOptions chartOptions, double? value) #

Sets ChartOptions.Minimum: The lower numeric limit.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance.
value double? required
The value.

Returns

ChartOptions The same instance.

Examples

// C# initializer or property                                           // C# fluent
new global::ConsoleMonster.Widgets.ChartOptions { Minimum = value };    Ui.Chart().Minimum(value);
PercentColumn 2 overloads
public static ChartOptions PercentColumn(ChartOptions chartOptions, ColumnFormat? value) #

Sets ChartOptions.PercentColumn: The stacked percent-column format.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance.
value ConsoleMonster.Layout.ColumnFormat? required
The value.

Returns

ChartOptions The same instance.

Examples

// C# initializer or property                                                 // C# fluent
new global::ConsoleMonster.Widgets.ChartOptions { PercentColumn = value };    Ui.Chart().PercentColumn(value);
public static ChartOptions PercentColumn(ChartOptions chartOptions, Action<ColumnFormat> configure) #

Configures ChartOptions.PercentColumn in place: The stacked percent-column format.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance.
configure System.Action<ConsoleMonster.Layout.ColumnFormat> required
Configures the value.

Returns

ChartOptions The same instance.
public static ChartOptions Role(ChartOptions chartOptions, ThemeToken? value) #

Sets ChartOptions.Role: The chart color role.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance.
value ConsoleMonster.Styling.ThemeToken? required
The value.

Returns

ChartOptions The same instance.

Examples

// C# initializer or property                                        // C# fluent
new global::ConsoleMonster.Widgets.ChartOptions { Role = value };    Ui.Chart().Role(value);
public static ChartOptions Shape(ChartOptions chartOptions, BarShape value) #

Sets ChartOptions.Shape: The bar shape.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance.
value ConsoleMonster.Widgets.BarShape required
The value.

Returns

ChartOptions The same instance.

Examples

// C# initializer or property                                         // C# fluent
new global::ConsoleMonster.Widgets.ChartOptions { Shape = value };    Ui.Chart().Shape(value);
public static void Show(ChartOptions definition, TerminalProfile? profile = null, ITerminalWriter? writer = null) #

Displays the configured definition through the shared widget pipeline.

Parameters

definition ConsoleMonster.Widgets.ChartOptions required
The configured definition.
profile ConsoleMonster.Capabilities.TerminalProfile? = null optional
The terminal profile.
writer ConsoleMonster.Output.ITerminalWriter? = null optional
The output writer.
ShowLatest 2 overloads
public static ChartOptions ShowLatest(ChartOptions chartOptions, bool value) #

Sets ChartOptions.ShowLatest: Whether the latest sparkline value is shown.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance.
value bool required
The value.

Returns

ChartOptions The same instance.

Examples

// C# initializer or property                                              // C# fluent
new global::ConsoleMonster.Widgets.ChartOptions { ShowLatest = value };    Ui.Chart().ShowLatest(value);
public static ChartOptions ShowLatest(ChartOptions chartOptions) #

Sets ChartOptions.ShowLatest to true.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance to configure.

Returns

ChartOptions The same instance.
ShowLegend 2 overloads
public static ChartOptions ShowLegend(ChartOptions chartOptions, bool value) #

Sets ChartOptions.ShowLegend: Whether Stacked charts show their legend.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance.
value bool required
The value.

Returns

ChartOptions The same instance.

Examples

// C# initializer or property                                              // C# fluent
new global::ConsoleMonster.Widgets.ChartOptions { ShowLegend = value };    Ui.Chart().ShowLegend(value);
public static ChartOptions ShowLegend(ChartOptions chartOptions) #

Sets ChartOptions.ShowLegend to true.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance to configure.

Returns

ChartOptions The same instance.
ShowValues 2 overloads
public static ChartOptions ShowValues(ChartOptions chartOptions, bool value) #

Sets ChartOptions.ShowValues: Whether Bar charts show each numeric value.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance.
value bool required
The value.

Returns

ChartOptions The same instance.

Examples

// C# initializer or property                                              // C# fluent
new global::ConsoleMonster.Widgets.ChartOptions { ShowValues = value };    Ui.Chart().ShowValues(value);
public static ChartOptions ShowValues(ChartOptions chartOptions) #

Sets ChartOptions.ShowValues to true.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance to configure.

Returns

ChartOptions The same instance.
Signed 2 overloads
public static ChartOptions Signed(ChartOptions chartOptions, bool value) #

Sets ChartOptions.Signed: Whether Bar charts reserve space on both sides of zero.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance.
value bool required
The value.

Returns

ChartOptions The same instance.

Examples

// C# initializer or property                                          // C# fluent
new global::ConsoleMonster.Widgets.ChartOptions { Signed = value };    Ui.Chart().Signed(value);
public static ChartOptions Signed(ChartOptions chartOptions) #

Sets ChartOptions.Signed to true.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance to configure.

Returns

ChartOptions The same instance.
public static ChartOptions Type(ChartOptions chartOptions, ChartType value) #

Sets ChartOptions.Type: The numeric chart kind.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance.
value ConsoleMonster.Widgets.ChartType required
The value.

Returns

ChartOptions The same instance.

Examples

// C# initializer or property                                        // C# fluent
new global::ConsoleMonster.Widgets.ChartOptions { Type = value };    Ui.Chart().Type(value);
public static ChartOptions Unit(ChartOptions chartOptions, string? value) #

Sets ChartOptions.Unit: The unit on numeric labels.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance.
value string? required
The value.

Returns

ChartOptions The same instance.

Examples

// C# initializer or property                                        // C# fluent
new global::ConsoleMonster.Widgets.ChartOptions { Unit = value };    Ui.Chart().Unit(value);
ValueColumn 2 overloads
public static ChartOptions ValueColumn(ChartOptions chartOptions, ColumnFormat? value) #

Sets ChartOptions.ValueColumn: The bar numeric-column format.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance.
value ConsoleMonster.Layout.ColumnFormat? required
The value.

Returns

ChartOptions The same instance.

Examples

// C# initializer or property                                               // C# fluent
new global::ConsoleMonster.Widgets.ChartOptions { ValueColumn = value };    Ui.Chart().ValueColumn(value);
public static ChartOptions ValueColumn(ChartOptions chartOptions, Action<ColumnFormat> configure) #

Configures ChartOptions.ValueColumn in place: The bar numeric-column format.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance.
configure System.Action<ConsoleMonster.Layout.ColumnFormat> required
Configures the value.

Returns

ChartOptions The same instance.
public static ChartOptions Values(ChartOptions chartOptions, double[]? value) #

Sets ChartOptions.Values: Initial numeric samples.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance.
value double[]? required
The value.

Returns

ChartOptions The same instance.

Examples

// C# initializer or property                                          // C# fluent
new global::ConsoleMonster.Widgets.ChartOptions { Values = value };    Ui.Chart().Values(value);
public static ChartOptions Warning(ChartOptions chartOptions, double? value) #

Sets ChartOptions.Warning: The warning threshold.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance.
value double? required
The value.

Returns

ChartOptions The same instance.

Examples

// C# initializer or property                                           // C# fluent
new global::ConsoleMonster.Widgets.ChartOptions { Warning = value };    Ui.Chart().Warning(value);
public static ChartOptions WidgetId(ChartOptions chartOptions, string? value) #

Sets ChartOptions.WidgetId: The live identifier; omitted uses the chart kind.

Parameters

chartOptions ConsoleMonster.Widgets.ChartOptions required
The instance.
value string? required
The value.

Returns

ChartOptions The same instance.

Examples

// C# initializer or property                                            // C# fluent
new global::ConsoleMonster.Widgets.ChartOptions { WidgetId = value };    Ui.Chart().WidgetId(value);