# Set-OfficeExcelChartSeries

Styles a chart series or one of its data points.

Cmdlet 

Aliases: ExcelChartSeries

**Module**

`PSWriteOffice`

**Aliases**

`ExcelChartSeries`

**Inputs**

`OfficeIMO.Excel.ExcelChart`

**Source**

[SetOfficeExcelChartSeriesCommand.cs:36](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Excel/SetOfficeExcelChartSeriesCommand.cs#L36) 

Styles a chart series or one of its data points.

## Syntax

```
Set-OfficeExcelChartSeries
[-Chart] <ExcelChart>
[-FillColor <OfficeColor>]
-Index <Int32>
[-LineColor <OfficeColor>]
[-LineWidth <OfficeLength>]
[-MarkerFillColor <OfficeColor>]
[-MarkerLineColor <OfficeColor>]
[-MarkerLineWidth <OfficeLength>]
[-MarkerSize <Int32>]
[-MarkerStyle <OfficeChartMarkerShape>]
[-PassThru]
[-Point <UInt32>]
[<CommonParameters>]
```

[#](#method-set-officeexcelchartseries-excelchart-officecolor-int32-officecolor-officelength-officecolor-officecolor-officelength-int32-officechartmarkershape-switchparameter-uint32)

Parameter set: `Index`

```
Set-OfficeExcelChartSeries
[-CaseSensitive]
[-Chart] <ExcelChart>
[-FillColor <OfficeColor>]
[-LineColor <OfficeColor>]
[-LineWidth <OfficeLength>]
[-MarkerFillColor <OfficeColor>]
[-MarkerLineColor <OfficeColor>]
[-MarkerLineWidth <OfficeLength>]
[-MarkerSize <Int32>]
[-MarkerStyle <OfficeChartMarkerShape>]
-Name <String>
[-PassThru]
[-Point <UInt32>]
[<CommonParameters>]
```

[#](#method-set-officeexcelchartseries-switchparameter-excelchart-officecolor-officecolor-officelength-officecolor-officecolor-officelength-int32-officechartmarkershape-string-switchparameter-uint32)

Parameter set: `Name`

## Examples

### Colour a series

```powershell
New-OfficeExcel -Path .\Reports\Helpdesk-Trend.xlsx {
    ExcelSheet 'Trend' {
        ExcelChart -InputObject (Import-OfficeCsv -Path .\Data\Ticket-Trend.csv) -Category Week -Value Opened, Closed -Type Line -Address A1 -PassThru | ExcelChartSeries -Index 2 -LineColor Success
    }
}
```

Draws the second series, Closed, in the theme's success colour.

### Highlight one bar

```powershell
New-OfficeExcel -Path .\Reports\Regions.xlsx {
    ExcelSheet 'Summary' {
        $chart = ExcelChart -InputObject (Import-OfficeCsv -Path .\Data\Region-Revenue.csv) -Category Region -Value Revenue -Address A1 -Type Column -PassThru
        ExcelChartSeries -Chart $chart -Name Revenue -Point 3 -FillColor Danger
    }
}
```

Colours the bar of the region that missed its target in the danger colour and leaves the others on the theme palette.

## Parameters

**-Chart ExcelChart requiredposition: 0pipeline: True (ByValue)**

Chart to update.

**-FillColor OfficeColor optional**

Series fill color. Named colors and hexadecimal values are accepted.

**-Index Int32 requiredsets: Index**

One-based index identifying the target item.

**-LineColor OfficeColor optional**

Series line color. Named colors and hexadecimal values are accepted.

**-LineWidth OfficeLength optional**

Physical line width; numbers are interpreted as points.

**-MarkerFillColor OfficeColor optional**

Marker fill color. Named colors and hexadecimal values are accepted.

**-MarkerLineColor OfficeColor optional**

Marker line color. Named colors and hexadecimal values are accepted.

**-MarkerLineWidth OfficeLength optional**

Physical width of the marker outline; omission preserves the existing width.

**-MarkerSize Int32 optional**

Marker size.

**-MarkerStyle OfficeChartMarkerShape optional**

Marker style name.

Possible values: `Auto`, `Circle`, `Dash`, `Diamond`, `Dot`, `Picture`, `Plus`, `Square`, `Star`, `Triangle`, `X`

**-PassThru SwitchParameter optional**

Emits the native result after the operation.

**-Point UInt32 optional**

One-based point index within the selected chart series.

**-CaseSensitive SwitchParameter optionalsets: Name**

Matches names and text using ordinal case sensitivity. Omission ignores case.

**-Name String requiredsets: Name**

Named range name.

## 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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

<!-- PowerForge markdown artifact sha256:EAF1FB4AC737FC1731879C076B8334E0A766E30AF0CEE7A35883A77B62A01A45 -->
