OfficeIMO

API Reference

Command

Add-OfficePowerPointChart

Namespace PSWriteOffice
Inputs
OfficeIMO.PowerPoint.PowerPointSlide
Outputs
OfficeIMO.PowerPoint.PowerPointChart

Adds a chart to a PowerPoint slide.

Remarks

Adds a chart to a PowerPoint slide.

Examples

Add a clustered column chart from objects.


PS>Add-OfficePowerPointChart -Slide $slide -Data $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.


PS>Add-OfficePowerPointChart -Slide $slide -Type Scatter -Data $rows -XProperty Quarter -YProperty Revenue -Title 'Revenue trend'
        

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

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.

Syntax

Add-OfficePowerPointChart [-Height <Double>] [-Slide <PowerPointSlide>] [-Title <String>] [-Type <ClusteredColumn|Line|Pie|Doughnut|Scatter>] [-Width <Double>] [-X <Double>] [-Y <Double>] [<CommonParameters>]
#
Parameter set: Default

Parameters

Height Double optionalposition: namedpipeline: False
Chart height in points.
Slide PowerPointSlide optionalposition: namedpipeline: True (ByValue)
Target slide that will receive the chart (optional inside DSL).
Title String optionalposition: namedpipeline: False
Optional chart title.
Type PowerPointChartType optionalposition: namedpipeline: Falsevalues: 5
Chart type to create.
Possible values: ClusteredColumn, Line, Pie, Doughnut, Scatter
Width Double optionalposition: namedpipeline: False
Chart width in points.
X Double optionalposition: namedpipeline: False
Left offset in points from the slide origin.
Y Double optionalposition: namedpipeline: False
Top offset in points from the slide origin.

Outputs

OfficeIMO.PowerPoint.PowerPointChart

Add-OfficePowerPointChart -CategoryProperty <String> -Data <Object[]> [-Height <Double>] -SeriesProperty <String[]> [-Slide <PowerPointSlide>] [-Title <String>] [-Type <ClusteredColumn|Line|Pie|Doughnut|Scatter>] [-Width <Double>] [-X <Double>] [-Y <Double>] [<CommonParameters>]
#
Parameter set: Categorical

Parameters

CategoryProperty String requiredposition: namedpipeline: False
Property name used for category labels on standard charts.
Data Object[] requiredposition: namedpipeline: False
Source objects used to build chart data.
Height Double optionalposition: namedpipeline: False
Chart height in points.
SeriesProperty String[] requiredposition: namedpipeline: False
Property names used as numeric series on standard charts.
Slide PowerPointSlide optionalposition: namedpipeline: True (ByValue)
Target slide that will receive the chart (optional inside DSL).
Title String optionalposition: namedpipeline: False
Optional chart title.
Type PowerPointChartType optionalposition: namedpipeline: Falsevalues: 5
Chart type to create.
Possible values: ClusteredColumn, Line, Pie, Doughnut, Scatter
Width Double optionalposition: namedpipeline: False
Chart width in points.
X Double optionalposition: namedpipeline: False
Left offset in points from the slide origin.
Y Double optionalposition: namedpipeline: False
Top offset in points from the slide origin.

Outputs

OfficeIMO.PowerPoint.PowerPointChart

Add-OfficePowerPointChart -Data <Object[]> [-Height <Double>] [-Slide <PowerPointSlide>] [-Title <String>] [-Type <ClusteredColumn|Line|Pie|Doughnut|Scatter>] [-Width <Double>] [-X <Double>] -XProperty <String> [-Y <Double>] -YProperty <String[]> [<CommonParameters>]
#
Parameter set: Scatter

Parameters

Data Object[] requiredposition: namedpipeline: False
Source objects used to build chart data.
Height Double optionalposition: namedpipeline: False
Chart height in points.
Slide PowerPointSlide optionalposition: namedpipeline: True (ByValue)
Target slide that will receive the chart (optional inside DSL).
Title String optionalposition: namedpipeline: False
Optional chart title.
Type PowerPointChartType optionalposition: namedpipeline: Falsevalues: 5
Chart type to create.
Possible values: ClusteredColumn, Line, Pie, Doughnut, Scatter
Width Double optionalposition: namedpipeline: False
Chart width in points.
X Double optionalposition: namedpipeline: False
Left offset in points from the slide origin.
XProperty String requiredposition: namedpipeline: False
Property name used for the X axis on scatter charts.
Y Double optionalposition: namedpipeline: False
Top offset in points from the slide origin.
YProperty String[] requiredposition: namedpipeline: False
Property names used as numeric Y series on scatter charts.

Outputs

OfficeIMO.PowerPoint.PowerPointChart