Cmdlet
Add-OfficePdfChart
Adds a themed chart from data.
Syntax
Add-OfficePdfChart
[-Alignment <OfficeAlignment>]
[-AlternativeText <String>]
-Category <String>
[-Height <OfficeLength>]
-InputObject <Object[]>
[-Title <String>]
[-Type <OfficeChartType>]
-Value <String[]>
[-Width <OfficeLength>]
[<CommonParameters>]#Parameter set:
ContextAdd-OfficePdfChart
[-Alignment <OfficeAlignment>]
[-AlternativeText <String>]
-Category <String>
-Document <PdfDocument>
[-Height <OfficeLength>]
-InputObject <Object[]>
[-PassThru]
[-Title <String>]
[-Type <OfficeChartType>]
-Value <String[]>
[-Width <OfficeLength>]
[<CommonParameters>]#Parameter set:
DocumentExamples
Use the native OfficePdfChart command.
$sales = @(
[pscustomobject]@{ Region = 'North'; Q1 = 1.42; Q2 = 1.55; Q3 = 1.71 }
[pscustomobject]@{ Region = 'South'; Q1 = 0.98; Q2 = 1.04; Q3 = 1.12 }
[pscustomobject]@{ Region = 'East'; Q1 = 1.21; Q2 = 1.18; Q3 = 1.36 }
[pscustomobject]@{ Region = 'West'; Q1 = 1.65; Q2 = 1.79; Q3 = 1.88 }
)
New-OfficePdf -Path .\Sales.pdf {
PdfChart -InputObject $sales -Category Region -Value Q3 -Title 'Q3 revenue by region (USD m)'
}Parameters
- -Alignment OfficeAlignment
- Alignment for this operation.
- Possible values:
Left,Center,Right,Justify,Start,End - -AlternativeText String
- AlternativeText for this operation.
- -Category String
- Category for this operation.
- -Height OfficeLength
- Height for this operation.
- -InputObject Object[]
- InputObject for this operation.
- -Title String
- Title for this operation.
- -Type OfficeChartType
- Type for this operation.
- Possible values:
ColumnClustered,Column,ColumnStacked,ColumnStacked100,BarClustered,Bar,BarStacked,BarStacked100,Line,LineStacked,LineStacked100,Area,AreaStacked,AreaStacked100,Scatter,Radar,Pie,Doughnut,Bubble,Column3DClustered,Column3DStacked,Column3DStacked100,Bar3DClustered,Bar3DStacked,Bar3DStacked100,Line3D,Area3D,Area3DStacked,Area3DStacked100,Pie3D,PieOfPie,BarOfPie,Stock,Surface,SurfaceWireframe,SurfaceContour,Funnel,Waterfall,BoxWhisker,Treemap,SurfaceContourWireframe,Sunburst - -Value String[]
- Value for this operation.
- -Width OfficeLength
- Width for this operation.
- -Document PdfDocument
- Document for this operation.
- -PassThru SwitchParameter
- Document set only; inside a block the document is returned by New-OfficePdf.
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.