Format-SpectreBarChart
Description
This function takes an array of data and displays it as a bar chart using the Spectre Console module. The chart can be customized with a title and width.
See https://spectreconsole.net/widgets/barchart for more information.
Examples
Example 1
This example demonstrates how to display a bar chart of various data points.
Parameters
Data
An array of objects containing the data to be displayed in the chart. Each object should have a Label, Value, and Color property.
Type | Required | Position | PipelineInput |
---|---|---|---|
[Object] | true | 1 | true (ByValue) |
Label
The title to be displayed above the chart.
Type | Required | Position | PipelineInput | Aliases |
---|---|---|---|---|
[String] | false | 2 | false | Title |
Width
The width of the chart in characters.
Type | Required | Position | PipelineInput |
---|---|---|---|
[Int32] | false | 3 | false |
HideValues
Hides the values from being displayed on the chart.
Type | Required | Position | PipelineInput |
---|---|---|---|
[Switch] | false | named | false |