ChartItem
ConsoleMonster.Widgets
A labelled value in a BarChart or StackedBar.
Inheritance
- object
- ChartItem
Usage
Explore 27 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 13
- Property BarChart.Items
- Extension method ChartItem.LabelText
- Extension method ChartItem.MissingText
- Extension method ChartItem.Role
- Extension method ChartItem.Status
- Extension method ChartItem.Value
- Method ChartItemFluent.LabelText
- Method ChartItemFluent.MissingText
- Method ChartItemFluent.Role
- Method ChartItemFluent.Status
- Method ChartItemFluent.Value
- Property ChartOptions.Items
- Property StackedBar.Segments
Accepted by parameters 14
- Extension method ChartItem.LabelText
- Extension method ChartItem.MissingText
- Extension method ChartItem.Role
- Extension method ChartItem.Status
- Extension method ChartItem.Value
- Method ChartItemFluent.LabelText
- Method ChartItemFluent.MissingText
- Method ChartItemFluent.Role
- Method ChartItemFluent.Status
- Method ChartItemFluent.Value
- Extension method ChartOptions.Item
- Extension method ChartOptions.Items
- Method ChartOptionsFluent.Item
- Method ChartOptionsFluent.Items
Constructors
public ChartItem(string label, double value, ThemeToken? role = null, string? key = null) #Creates an item.
Parameters
- label string
- The label (plain text).
- value double
- The value.
- role ConsoleMonster.Styling.ThemeToken? = null
- The colour role, or null for the chart default.
- key string? = null
- Stable identity, or null to use the label.
Inherited Methods
Properties
public string Key { get; } #The stable key used by live updates; defaults to the label.
public RichText? LabelText { get; set; } #A multicolour label shown instead of ChartItem.Label (which stays the key), or null.
public string? MissingText { get; set; } #A plain text replacement for a non-finite value in a bar chart; null uses the chart default.
public StatusKind? Status { get; set; } #An explicit status, shown as a glyph as well as a theme role in bar charts.
Extension Methods
public static ChartItem LabelText(ChartItem chartItem, RichText? value) #Sets ChartItem.LabelText: A multicolour label shown instead of ChartItem.Label (which stays the key), or null.
Parameters
- chartItem ConsoleMonster.Widgets.ChartItem
- The instance.
- value ConsoleMonster.Text.RichText?
- The value.
Examples
// C# initializer or property // C# fluent
chartItem.LabelText = value; chartItem.LabelText(value);public static ChartItem LabelText(ChartItem chartItem, Action<RichText> configure) #Configures ChartItem.LabelText in place: A multicolour label shown instead of ChartItem.Label (which stays the key), or null.
Parameters
- chartItem ConsoleMonster.Widgets.ChartItem
- The instance.
- configure System.Action<ConsoleMonster.Text.RichText>
- Configures the value.
public static ChartItem MissingText(ChartItem chartItem, string? value) #Sets ChartItem.MissingText: A plain text replacement for a non-finite value in a bar chart; null uses the chart default.
Parameters
- chartItem ConsoleMonster.Widgets.ChartItem
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
chartItem.MissingText = value; chartItem.MissingText(value);public static ChartItem Role(ChartItem chartItem, ThemeToken? value) #Sets ChartItem.Role: The colour role.
Parameters
- chartItem ConsoleMonster.Widgets.ChartItem
- The instance.
- value ConsoleMonster.Styling.ThemeToken?
- The value.
Examples
// C# initializer or property // C# fluent
chartItem.Role = value; chartItem.Role(value);public static ChartItem Status(ChartItem chartItem, StatusKind? value) #Sets ChartItem.Status: An explicit status, shown as a glyph as well as a theme role in bar charts.
Parameters
- chartItem ConsoleMonster.Widgets.ChartItem
- The instance.
- value ConsoleMonster.Styling.StatusKind?
- The value.
Examples
// C# initializer or property // C# fluent
chartItem.Status = value; chartItem.Status(value);public static ChartItem Value(ChartItem chartItem, double value) #Sets ChartItem.Value: The value.
Parameters
- chartItem ConsoleMonster.Widgets.ChartItem
- The instance.
- value double
- The value.
Examples
// C# initializer or property // C# fluent
chartItem.Value = value; chartItem.Value(value);