Skip to content

New-SpectreChartItem

Synopsis

Creates a new SpectreChartItem object.


Description

The New-SpectreChartItem function creates a new SpectreChartItem object with the specified label, value, and color for use in Format-SpectreBarChart and Format-SpectreBreakdownChart.


Examples

EXAMPLE 1

New-SpectreChartItem -Label "Sales" -Value 1000 -Color "green"
This example creates a new SpectreChartItem object with a label of "Sales", a value of 1000, and a green color.

Parameters

Label

The label for the chart item.

TypeRequiredPositionPipelineInput
[String]true1false

Value

The value for the chart item.

TypeRequiredPositionPipelineInput
[Double]true2false

Color

The color for the chart item. Must be a valid Spectre color as name, hex or a Spectre.Console.Color object.

TypeRequiredPositionPipelineInput
[String]true3false

Syntax

New-SpectreChartItem [-Label] <String> [-Value] <Double> [-Color] <String> [<CommonParameters>]