Skip to content
ConsoleMonster
Cmdlet

New-ConsoleChart

Module
ConsoleMonster
Inputs
System.Management.Automation.PSObject
Outputs
ConsoleMonster.Layout.IWidget

Creates one numeric chart representation from records or samples.

Syntax

New-ConsoleChart
[-Capacity <Int32>]
[-Content <ScriptBlock>]
[-CountColumn <ColumnFormat>]
[-Critical <Double>]
[-Edges <Double[]>]
[-Height <Int32>]
[[-InputObject] <PSObject>]
[-Label <Object>]
[-LabelColumn <ColumnFormat>]
[-Maximum <Double>]
[-MaxLegendColumns <Int32>]
[-Minimum <Double>]
[-NoLatest]
[-NoLegend]
[-NoValues]
[-PercentColumn <ColumnFormat>]
[-Role <ThemeToken>]
[-Series <Object[]>]
[-Shape <Block|Line>]
[-Signed]
-Type <ChartType>
[-Unit <String>]
[-ValueColumn <ColumnFormat>]
[-Values <Double[]>]
[-Warning <Double>]
[[-WidgetId] <String>]
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

Type selects Bar, Stacked, Line, Scatter, Histogram or Sparkline. The shared C# Chart factory rejects options that do not apply to the selected kind. InputObject accepts ordinary records; Content emits the same records. Use Update-Console for live changes.

Examples

Example 1

[pscustomobject] @{ Label = 'Cloudflare'; Value = 12 } | New-ConsoleChart -Type Bar -Unit ' ms' | Show-Console

Show resolver latency

Parameters

-Capacity Int32 optional
Retained Line, Scatter or Sparkline samples; omitted uses the selected kind default.
-Content ScriptBlock optional
A script block emitting the same records accepted by InputObject.
-CountColumn ColumnFormat optional
Stacked count-column settings.
-Critical Double optional
The critical threshold for Bar.
-Edges Double[] optional
Strictly ascending Histogram bucket edges.
-Height Int32 optional
Plot rows; omitted uses the selected kind default.
-InputObject PSObject optionalposition: 1pipeline: True (ByValue)
Records, numeric samples or a dictionary of labels to values/series.
-Label Object optional
The sparkline label.
-LabelColumn ColumnFormat optional
Stacked legend-label settings.
-Maximum Double optional
The upper numeric limit.
-MaxLegendColumns Int32 optional
Maximum Stacked legend columns; zero fits the available width.
-Minimum Double optional
The lower numeric limit.
-NoLatest SwitchParameter optional
Hides the latest Sparkline value.
-NoLegend SwitchParameter optional
Hides the Stacked-chart legend.
-NoValues SwitchParameter optional
Hides Bar-chart numeric value labels.
-PercentColumn ColumnFormat optional
Stacked percent-column settings.
-Role ThemeToken optional
The chart theme role.
Possible values: Text, Muted, Subtle, Accent, Accent2, Pass, Fail, Warn, Info, Skip, Running, Pending, Border, Title, Header, Highlight, Surface, SurfaceAccent, Series1, Series2, Series3, Series4, Series5, Series6, Focus
-Series Object[] optional
Initial Line/Scatter series names, or records with Key, Label, Role and Values.
-Shape BarShape optional
The bar shape, Block by default.
Possible values: Block, Line
-Signed SwitchParameter optional
Shows signed Bar values on both sides of zero.
-Type ChartType required
The numeric chart kind: Bar, Stacked, Line, Scatter, Histogram or Sparkline.
Possible values: Bar, Stacked, Line, Scatter, Histogram, Sparkline
-Unit String optional
The unit on numeric labels.
-ValueColumn ColumnFormat optional
Bar numeric-column settings.
-Values Double[] optional
Initial numeric samples for Histogram or Sparkline.
-Warning Double optional
The warning threshold for Bar.
-WidgetId String optionalposition: 0
The live identifier; omitted uses the selected kind default.

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.