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-ChartBar

Module PSWriteHTML

Creates a new bar chart object with specified name, value, and color.

Syntax

New-ChartBar [[-Color] <String[]>] [-Name] <String> [-Value] <Object> [<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

This function creates a new bar chart object with the provided name, value, and color. The name is used as the identifier for the bar, the value represents the data to be displayed, and the color determines the color of the bar.

Examples

Authored help example

EXAMPLE 1

New-ChartBar -Name 'Sales' -Value 1000 -Color 'blue'

Creates a new bar chart object named 'Sales' with a value of 1000 and a blue color.

EXAMPLE 2

New-ChartBar -Name 'Expenses' -Value 750 -Color 'red'

Creates a new bar chart object named 'Expenses' with a value of 750 and a red color.

Parameters

-Color String[] optionalposition: 2
The color of the bar. If not specified, a default color will be used.
-Name String requiredposition: 0
The name of the bar chart object.
-Value Object requiredposition: 1
The value or data to be displayed in the bar chart.

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.