# New-ChartGrid

Creates a new chart grid with customizable options. Review available syntax, parameters, pipeline guidance, and reference details in PSWriteHTML API Reference.

Project

PSWriteHTML

Generate HTML reports, dashboards, and emails from PowerShell without writing HTML, CSS, or JavaScript.

[View on GitHub](https://github.com/EvotecIT/PSWriteHTML) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteHTML/releases/tag/v1.41.0) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteHTML/1.40.0)

Stars **1,025**

Forks **114**

Open issues 

PowerShell Gallery downloads **7,576,901**

Release **v1.45.0**

Language: PowerShell Updated: 2026-11-19

Command 

**Module**

`PSWriteHTML`

Creates a new chart grid with customizable options.

## Syntax

```
New-ChartGrid
[[-BorderColor] <String>]
[[-ColumnColors] <String[]>]
[[-ColumnOpacity] <Double>]
[[-PaddingBottom] <Int32>]
[[-PaddingLeft] <Int32>]
[[-PaddingRight] <Int32>]
[[-PaddingTop] <Int32>]
[[-Position] <front|back|default>]
[[-RowColors] <String[]>]
[[-RowOpacity] <Double>]
[-Show]
[[-StrokeDash] <Int32>]
[-xAxisLinesShow]
[-yAxisLinesShow]
[<CommonParameters>]
```

[#](#method-new-chartgrid-string-string-double-int32-int32-int32-int32-string-string-double-switchparameter-int32-switchparameter-switchparameter)

Parameter set: `All Parameter Sets`

## Description

This function creates a new chart grid with the provided parameters. It allows customization of the grid visibility, colors, opacity, padding, and other styling options.

## Examples

### Example 1

```powershell
New-ChartGrid -Show -BorderColor 'black' -StrokeDash 2 -Position 'front' -xAxisLinesShow -yAxisLinesShow -RowColors @('red', 'blue') -RowOpacity 0.7 -ColumnColors @('green', 'yellow') -ColumnOpacity 0.8 -PaddingTop 10 -PaddingRight 5 -PaddingBottom 15 -PaddingLeft 5
```

Creates a new chart grid with specified options including visible grid, black border color, dashed border style, front position, visible x-axis and y-axis lines, red and blue row colors with 0.7 opacity, green and yellow column colors with 0.8 opacity, and padding values.

### Example 2

```powershell
New-ChartGrid -Show -BorderColor 'gray' -RowColors @('orange', 'purple') -ColumnColors @('pink', 'cyan') -PaddingTop 5 -PaddingRight 5 -PaddingBottom 5 -PaddingLeft 5
```

Creates a new chart grid with visible grid, gray border color, orange and purple row colors, pink and cyan column colors, and equal padding values.

## Parameters

**-BorderColor String optionalposition: 0**

The color of the grid border.

**-ColumnColors String[] optionalposition: 5**

An array of colors for the columns in the grid.

**-ColumnOpacity Double optionalposition: 6**

The opacity of the column colors. Valid range is 0 to 1. Default is 0.5.

**-PaddingBottom Int32 optionalposition: 9**

The bottom padding of the grid.

**-PaddingLeft Int32 optionalposition: 10**

The left padding of the grid.

**-PaddingRight Int32 optionalposition: 8**

The right padding of the grid.

**-PaddingTop Int32 optionalposition: 7**

The top padding of the grid.

**-Position String optionalposition: 2**

The position of the grid. Accepted values are 'front', 'back', 'default'. Default is 'default'.

Possible values: `front`, `back`, `default`

**-RowColors String[] optionalposition: 3**

An array of colors for the rows in the grid.

**-RowOpacity Double optionalposition: 4**

The opacity of the row colors. Valid range is 0 to 1. Default is 0.5.

**-Show SwitchParameter optional**

Indicates whether the grid is visible.

**-StrokeDash Int32 optionalposition: 1**

The style of the grid border. Default is 0.

**-xAxisLinesShow SwitchParameter optional**

Indicates whether the x-axis lines are visible.

**-yAxisLinesShow SwitchParameter optional**

Indicates whether the y-axis lines are visible.

## 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).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:4F67BB9BC58D6843A372D447D6A00F633EE0BA54D94D17C32E1FD9DD28328186 -->
