Question: How to change outline color of ChartType Line?
How can I change the outline color of my generated line chart directly with ImportExcel?
I always have to change the standard Microsoft blue colored outline manually.
$Import = Import-Csv "$Output\Logs\UserLoggedIn.csv" -Delimiter "," -Encoding UTF8
$ChartDef = New-ExcelChartDefinition -XRange Date -YRange Count -Title "User Logins" -ChartType Line -NoLegend -Width 1200
$Outline = [System.Drawing.Color]::FromArgb(255,120,0)
$Import | Export-Excel -Path "$Output\Logs\UserLoggedIn.xlsx" -Append -WorksheetName "Line Chart" -AutoNameRange -ExcelChartDefinition $ChartDefinition
Thank you!
Thank you for using the module.
Good question. I would google to see "changing chart outline color EPPlus" to see if there is a way.
Then use -PassThru on the Export-Excel, get the object model and code to that.