mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-11 05:43:17 +00:00
Changes to match latest style rules (trailing spaces & position of null)
This commit is contained in:
@@ -847,7 +847,7 @@
|
||||
|
||||
foreach ($chartDef in $ExcelChartDefinition) {
|
||||
$params = @{}
|
||||
$chartDef.PSObject.Properties | ForEach-Object {if ($_.value -ne $null) {$params[$_.name] = $_.value}}
|
||||
$chartDef.PSObject.Properties | ForEach-Object {if ( $null -ne $_.value) {$params[$_.name] = $_.value}}
|
||||
Add-ExcelChart -Worksheet $ws @params
|
||||
}
|
||||
|
||||
@@ -1296,8 +1296,8 @@ function Add-ExcelChart {
|
||||
if ($XAxisPosition) {$chart.XAxis.AxisPosition = $XAxisPosition}
|
||||
if ($XMajorUnit) {$chart.XAxis.MajorUnit = $XMajorUnit}
|
||||
if ($XMinorUnit) {$chart.XAxis.MinorUnit = $XMinorUnit}
|
||||
if ($XMinValue -ne $null) {$chart.XAxis.MinValue = $XMinValue}
|
||||
if ($XMaxValue -ne $null) {$chart.XAxis.MaxValue = $XMaxValue}
|
||||
if ($null -ne $XMinValue) {$chart.XAxis.MinValue = $XMinValue}
|
||||
if ($null -ne $XMaxValue) {$chart.XAxis.MaxValue = $XMaxValue}
|
||||
if ($XAxisNumberformat) {$chart.XAxis.Format = $XAxisNumberformat}
|
||||
|
||||
if ($YAxisTitleText) {
|
||||
@@ -1308,10 +1308,10 @@ function Add-ExcelChart {
|
||||
if ($YAxisPosition) {$chart.YAxis.AxisPosition = $YAxisPosition}
|
||||
if ($YMajorUnit) {$chart.YAxis.MajorUnit = $YMajorUnit}
|
||||
if ($YMinorUnit) {$chart.YAxis.MinorUnit = $YMinorUnit}
|
||||
if ($YMinValue-ne $null) {$chart.YAxis.MinValue = $YMinValue}
|
||||
if ($YMaxValue-ne $null) {$chart.YAxis.MaxValue = $YMaxValue}
|
||||
if ($null -ne $YMinValue){$chart.YAxis.MinValue = $YMinValue}
|
||||
if ($null -ne $YMaxValue){$chart.YAxis.MaxValue = $YMaxValue}
|
||||
if ($YAxisNumberformat) {$chart.YAxis.Format = $YAxisNumberformat}
|
||||
if ($chart.Datalabel -ne $null) {
|
||||
if ($null -ne $chart.Datalabel) {
|
||||
$chart.Datalabel.ShowCategory = [boolean]$ShowCategory
|
||||
$chart.Datalabel.ShowPercent = [boolean]$ShowPercent
|
||||
}
|
||||
|
||||
2
ToDo.md
2
ToDo.md
@@ -7,3 +7,5 @@
|
||||
[ ] Copy parameter help from function Add-ExcelChart into New-ExcelChart.ps1
|
||||
- [ ] Examples and tests for new "Quick charts" in Export Excel
|
||||
- [ ] Charting.ps1,GetXYRange.ps1, InferData.PS1 move to deprecated. (replace examples)
|
||||
- [ ] Refactor Set-Row and Set-Column to use set-format and add conditional format support.
|
||||
- [ ] Examples and tests for set-Row and Set-column; review test coverage and examples for Set-Format adn Add-Conditional formatting
|
||||
Reference in New Issue
Block a user