Skip to content
ChartForgeX
Command

New-ImageChartBar

Module imageplayground
Inputs
None
Outputs
ImagePlayground.ChartBar

Creates bar chart data item.

Syntax

New-ImageChartBar [-Color <ChartColor>] [-Name] <String> [-SecondaryAxis] [-Value] <Double[]> [<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

Use this cmdlet inside New-ImageChart to define one bar series.

Examples

Authored help example

Create bar-series data

New-ImageChartBar -Name 'Revenue' -Value 12,18,25 -Color Blue

Creates a single bar-series definition that can be passed into New-ImageChart.

Bars and a target line on one chart

New-ImageChart -Title 'Builds' -XLabel Mon, Tue, Wed -FilePath builds.png {
    New-ImageChartBar -Name Passed -Value 41, 38, 45
    New-ImageChartLine -Name Target -Value 40, 40, 40 -Color '#c78404'
}

Bar and line definitions can be mixed in one chart.

Parameters

-Color ChartColor optional
Bar color.
-Name String requiredposition: 0aliases: Label
Label for the bar data.
-SecondaryAxis SwitchParameter optional
Plot the bars against the secondary (right) Y axis. Use New-ImageChart -SecondaryYTitle to name that axis.
-Value Double[] requiredposition: 1
Values for the bar.

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.

Outputs

ImagePlayground.ChartBar: Bar chart definition.