Command
New-ImageChartBar
Creates bar chart data item.
Syntax
New-ImageChartBar [-Color <ChartColor>] [-Name] <String> [-SecondaryAxis] [-Value] <Double[]> [<CommonParameters>]#Parameter set:
All Parameter SetsDescription
Use this cmdlet inside New-ImageChart to define one bar series.
Examples
Create bar-series data
New-ImageChartBar -Name 'Revenue' -Value 12,18,25 -Color BlueCreates 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
- Bar color.
- -Name String
- Label for the bar data.
- -SecondaryAxis SwitchParameter
- Plot the bars against the secondary (right) Y axis. Use New-ImageChart -SecondaryYTitle to name that axis.
- -Value Double[]
- 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.