# Add-OfficePowerPointChart

Adds a chart to a PowerPoint slide. Review available syntax, parameters, pipeline guidance, and reference details in PSWriteOffice API Reference.

Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

[View on GitHub](https://github.com/EvotecIT/OfficeIMO/tree/master/PowerShell/PSWriteOffice) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteOffice/releases/tag/v3.0.5) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteOffice/0.2.0)

Stars **725**

Forks **84**

Open issues **3**

Total downloads **5,231,343**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-23

Cmdlet 

Aliases: PptChart

**Module**

`PSWriteOffice`

**Aliases**

`PptChart`

**Inputs**

`OfficeIMO.PowerPoint.PowerPointSlide`

**Outputs**

`OfficeIMO.PowerPoint.PowerPointChart`

**Source**

[AddOfficePowerPointChartCommand.cs:58](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/PowerPoint/AddOfficePowerPointChartCommand.cs#L58) 

Adds a chart to a PowerPoint slide.

## Syntax

```
Add-OfficePowerPointChart
[-Height <Double>]
[-PassThru]
[-Slide <PowerPointSlide>]
[-Title <String>]
[-Type <ClusteredColumn|Line|Pie|Doughnut|Scatter>]
[-Width <Double>]
[-X <Double>]
[-Y <Double>]
[<CommonParameters>]
```

[#](#method-add-officepowerpointchart-double-switchparameter-powerpointslide-string-powerpointcharttype-double-double-double)

Parameter set: `Default`

```
Add-OfficePowerPointChart
-CategoryProperty <String>
[-Height <Double>]
-InputObject <Object[]>
[-PassThru]
-SeriesProperty <String[]>
[-Slide <PowerPointSlide>]
[-Title <String>]
[-Type <ClusteredColumn|Line|Pie|Doughnut|Scatter>]
[-Width <Double>]
[-X <Double>]
[-Y <Double>]
[<CommonParameters>]
```

[#](#method-add-officepowerpointchart-string-double-object-switchparameter-string-powerpointslide-string-powerpointcharttype-double-double-double)

Parameter set: `Categorical`

```
Add-OfficePowerPointChart
[-Height <Double>]
-InputObject <Object[]>
[-PassThru]
[-Slide <PowerPointSlide>]
[-Title <String>]
[-Type <ClusteredColumn|Line|Pie|Doughnut|Scatter>]
[-Width <Double>]
[-X <Double>]
-XProperty <String>
[-Y <Double>]
-YProperty <String[]>
[<CommonParameters>]
```

[#](#method-add-officepowerpointchart-double-object-switchparameter-powerpointslide-string-powerpointcharttype-double-double-string-double-string)

Parameter set: `Scatter`

## Description

Supports default chart data or object-based category/series mappings for standard and scatter charts.

## Examples

### Add a clustered column chart from objects.

```powershell
$rows = @(
    [pscustomobject]@{ Month = 'Jan'; Sales = 42; Profit = 9 }
    [pscustomobject]@{ Month = 'Feb'; Sales = 55; Profit = 13 }
)
New-OfficePowerPoint -Path .\Examples\Documents\PowerPointChart.pptx {
    $slide = Add-OfficePowerPointSlide -Layout 1 -PassThru
    Add-OfficePowerPointChart -Slide $slide -InputObject $rows -CategoryProperty Month -SeriesProperty Sales,Profit -Title 'Monthly performance'
}
```

Creates a clustered column chart using Month for categories and Sales/Profit as series.

### Add a scatter chart from numeric properties.

```powershell
$rows = @(
    [pscustomobject]@{ Quarter = 1; Revenue = 20 }
    [pscustomobject]@{ Quarter = 2; Revenue = 34 }
)
New-OfficePowerPoint -Path .\Examples\Documents\PowerPointScatter.pptx {
    $slide = Add-OfficePowerPointSlide -Layout 1 -PassThru
    Add-OfficePowerPointChart -Slide $slide -Type Scatter -InputObject $rows -XProperty Quarter -YProperty Revenue -Title 'Revenue trend'
}
```

Creates a scatter chart using Quarter on the X axis and Revenue on the Y axis.

## Parameters

**-Height Double optional**

Chart height in points.

**-PassThru SwitchParameter optional**

Emit the object created or changed by the command.

**-Slide PowerPointSlide optionalpipeline: True (ByValue)**

Target slide that will receive the chart (optional inside DSL).

**-Title String optional**

Optional chart title.

**-Type PowerPointChartType optional**

Chart type to create.

Possible values: `ClusteredColumn`, `Line`, `Pie`, `Doughnut`, `Scatter`

**-Width Double optional**

Chart width in points.

**-X Double optional**

Left offset in points from the slide origin.

**-Y Double optional**

Top offset in points from the slide origin.

**-CategoryProperty String requiredsets: Categorical**

Property name used for category labels on standard charts.

**-InputObject Object[] requiredaliases: Datasets: Categorical, Scatter**

Source objects used to build chart data.

**-SeriesProperty String[] requiredsets: Categorical**

Property names used as numeric series on standard charts.

**-XProperty String requiredsets: Scatter**

Property name used for the X axis on scatter charts.

**-YProperty String[] requiredsets: Scatter**

Property names used as numeric Y series on scatter charts.

## 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).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:5802CF9B5F997C45B10971EF87596AF81947334C50D465941CCB0453D6D9B167 -->
