mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-15 15:53:32 +00:00
See readme.md
This commit is contained in:
@@ -1,37 +1,38 @@
|
||||
function New-ExcelChart {
|
||||
function New-ExcelChartDefinition {
|
||||
[cmdletbinding()]
|
||||
[Alias("New-ExcelChart")] #This was the former name. The new name reflects that we are defining a chart, not making one in the workbook.
|
||||
param(
|
||||
$Title="Chart Title",
|
||||
$Title = "Chart Title",
|
||||
$Header,
|
||||
[OfficeOpenXml.Drawing.Chart.eChartType]$ChartType="ColumnStacked",
|
||||
[OfficeOpenXml.Drawing.Chart.eChartType]$ChartType = "ColumnStacked",
|
||||
$XRange,
|
||||
$YRange,
|
||||
$Width=500,
|
||||
$Height=350,
|
||||
$Row=0,
|
||||
$RowOffSetPixels=10,
|
||||
$Column=6,
|
||||
$ColumnOffSetPixels=5,
|
||||
$Width = 500,
|
||||
$Height = 350,
|
||||
$Row = 0,
|
||||
$RowOffSetPixels = 10,
|
||||
$Column = 6,
|
||||
$ColumnOffSetPixels = 5,
|
||||
[Switch]$NoLegend,
|
||||
[Switch]$ShowCategory,
|
||||
[Switch]$ShowPercent,
|
||||
$SeriesHeader
|
||||
)
|
||||
|
||||
if ( $Header ) {Write-Warning "The header parameter is ignored."} #Nothing was done with it when creating a chart.
|
||||
[PSCustomObject]@{
|
||||
Title=$Title
|
||||
Header=$Header
|
||||
ChartType=$ChartType
|
||||
XRange=$XRange
|
||||
YRange=$YRange
|
||||
Width=$Width
|
||||
Height=$Height
|
||||
Row=$Row
|
||||
RowOffSetPixels=$RowOffSetPixels
|
||||
Column=$Column
|
||||
ColumnOffSetPixels=$ColumnOffSetPixels
|
||||
NoLegend = if($NoLegend) {$true} else {$false}
|
||||
ShowCategory = if($ShowCategory) {$true} else {$false}
|
||||
ShowPercent = if($ShowPercent) {$true} else {$false}
|
||||
SeriesHeader=$SeriesHeader
|
||||
}
|
||||
Title = $Title
|
||||
ChartType = $ChartType
|
||||
XRange = $XRange
|
||||
YRange = $YRange
|
||||
Width = $Width
|
||||
Height = $Height
|
||||
Row = $Row
|
||||
RowOffSetPixels = $RowOffSetPixels
|
||||
Column = $Column
|
||||
ColumnOffSetPixels = $ColumnOffSetPixels
|
||||
NoLegend = $NoLegend -as [Boolean]
|
||||
ShowCategory = $ShowCategory-as [Boolean]
|
||||
ShowPercent = $ShowPercent -as [Boolean]
|
||||
SeriesHeader = $SeriesHeader
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user