New-SpectreChartItem
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 # This example demonstrates how to use SpectreChartItems to create a breakdown chart.
Parameters
Label
The label for the chart item.
Type | Required | Position | PipelineInput |
---|---|---|---|
[String] | true | 1 | false |
Value
The value for the chart item.
Type | Required | Position | PipelineInput |
---|---|---|---|
[Double] | true | 2 | false |
Color
The color for the chart item. Must be a valid Spectre color as name, hex or a Spectre.Console.Color object.
Type | Required | Position | PipelineInput |
---|---|---|---|
[Color] | true | 3 | false |