Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Add-OfficeExcelDashboardChart

Aliases: ExcelDashboardChart
Module PSWriteOffice
Aliases
ExcelDashboardChart
Inputs
OfficeIMO.Excel.ExcelDocument

Adds a dashboard-ready chart using an OfficeIMO chart preset.

Syntax

Add-OfficeExcelDashboardChart [-ChartType <ExcelChartType>] [-ColorStyleId <Int32>] -Column <Int32> [-HasHeaders <Boolean>] [-HeightPixels <Int32>] [-IncludeCachedData <Boolean>] [-PassThru] [-Preset <Comparison|Trend|Contribution|CompactComparison>] [-Range] <String> -Row <Int32> [-StyleId <Int32>] [-Title <String>] [-WidthPixels <Int32>] [<CommonParameters>]
#
Parameter set: ContextRange
Add-OfficeExcelDashboardChart [-ChartType <ExcelChartType>] [-ColorStyleId <Int32>] -Column <Int32> -Document <ExcelDocument> [-HasHeaders <Boolean>] [-HeightPixels <Int32>] [-IncludeCachedData <Boolean>] [-PassThru] [-Preset <Comparison|Trend|Contribution|CompactComparison>] [-Range] <String> -Row <Int32> [-Sheet <String>] [-SheetIndex <Int32>] [-StyleId <Int32>] [-Title <String>] [-WidthPixels <Int32>] [<CommonParameters>]
#
Parameter set: DocumentRange
Add-OfficeExcelDashboardChart [-ChartType <ExcelChartType>] [-ColorStyleId <Int32>] -Column <Int32> -Document <ExcelDocument> [-HeightPixels <Int32>] [-IncludeCachedData <Boolean>] [-PassThru] [-Preset <Comparison|Trend|Contribution|CompactComparison>] -Row <Int32> [-Sheet <String>] [-SheetIndex <Int32>] [-StyleId <Int32>] [-TableName] <String> [-Title <String>] [-WidthPixels <Int32>] [<CommonParameters>]
#
Parameter set: DocumentTable
Add-OfficeExcelDashboardChart [-ChartType <ExcelChartType>] [-ColorStyleId <Int32>] -Column <Int32> [-HeightPixels <Int32>] [-IncludeCachedData <Boolean>] [-PassThru] [-Preset <Comparison|Trend|Contribution|CompactComparison>] -Row <Int32> [-StyleId <Int32>] [-TableName] <String> [-Title <String>] [-WidthPixels <Int32>] [<CommonParameters>]
#
Parameter set: ContextTable

Examples

Authored help example

Add a compact comparison chart.

ExcelSheet 'Dashboard' { Add-OfficeExcelDashboardChart -Range A1:B12 -Preset CompactComparison -Row 1 -Column 5 -Title 'Revenue' }

Creates a styled chart from the range using reusable OfficeIMO dashboard chart defaults.

Parameters

-ChartType ExcelChartType optional
Optional chart type override.
Possible values: ColumnClustered, ColumnStacked, ColumnStacked100, Column3DClustered, Column3DStacked, Column3DStacked100, BarClustered, BarStacked, BarStacked100, Bar3DClustered, Bar3DStacked, Bar3DStacked100, Line, LineStacked, LineStacked100, Line3D, Area, AreaStacked, AreaStacked100, Area3D, Area3DStacked, Area3DStacked100, Pie, Pie3D, PieOfPie, BarOfPie, Doughnut, Scatter, Bubble, Radar, Stock, Surface, SurfaceWireframe, SurfaceContour, SurfaceContourWireframe
-ColorStyleId Int32 optional
Optional chart color style id override.
-Column Int32 required
Top-left column (1-based) where the chart should be placed.
-HasHeaders Boolean optionalsets: ContextRange, DocumentRange
Whether the range includes headers.
-HeightPixels Int32 optional
Optional chart height in pixels.
-IncludeCachedData Boolean optional
Include cached data in the chart for portability.
-PassThru SwitchParameter optional
Emit the created chart.
-Preset ExcelDashboardChartPreset optional
Dashboard chart preset.
Possible values: Comparison, Trend, Contribution, CompactComparison
-Range String requiredposition: 0sets: ContextRange, DocumentRange
A1 range containing chart data.
-Row Int32 required
Top-left row (1-based) where the chart should be placed.
-StyleId Int32 optional
Optional chart style id override.
-Title String optional
Chart title.
-WidthPixels Int32 optional
Optional chart width in pixels.
-Document ExcelDocument requiredpipeline: True (ByValue)sets: DocumentRange, DocumentTable
Workbook to operate on outside the DSL context.
-Sheet String optionalsets: DocumentRange, DocumentTable
Worksheet name when using Document.
-SheetIndex Int32 optionalsets: DocumentRange, DocumentTable
Worksheet index (0-based) when using Document.
-TableName String requiredposition: 0sets: DocumentTable, ContextTable
Table name containing chart data.

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.