Project

PSWriteHTML

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

Stars 1,019
Forks 115
Open issues 54
PowerShell Gallery downloads 7,576,901
Release v1.41.0
Language: PowerShell Updated: 2026-10-03
Command

New-ChartGrid

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>]
#
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

Authored help example

EXAMPLE 1

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

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.