# New-ImageChartBar

Creates bar chart data item. Review available syntax, parameters, pipeline guidance, and reference details in ImagePlayground commands for ChartForgeX.

 Command  

**Module**

`imageplayground`

**Inputs**

 `None` 

**Outputs**

 `ImagePlayground.ChartBar` 

Creates bar chart data item.

## Syntax

```
New-ImageChartBar
[-Color <ChartColor>]
[-Name] <String>
[-SecondaryAxis]
[-Value] <Double[]>
[<CommonParameters>]
```

 [#](#method-new-imagechartbar-chartcolor-string-switchparameter-double) 

Parameter set: `All Parameter Sets`

## Description

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

## Examples

### Create bar-series data

```powershell
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

```powershell
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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

## Outputs

ImagePlayground.ChartBar: Bar chart definition.

<!-- PowerForge markdown artifact sha256:18DAB39654CF21E54696B1D2F13F6534DD0BD67B3893BF0FFD84B9BCE579764A -->
