Evotec

Project

PSWriteHTML

PSWriteHTML is an open-source PowerShell project with packages, release history, and working documentation.

Stars 995
Forks 114
Open issues 69
PowerShell Gallery downloads 7,436,513
Release v1.41.0
Language: PowerShell Updated: 2026-04-11

API Reference

Function

New-ChartBarOptions

Namespace PSWriteHTML

Creates options for a bar chart with customizable parameters.

Remarks

This function creates options for a bar chart with the provided parameters. It allows customization of the bar type, data labels, colors, patterns, gradients, and distribution.

Examples

Authored help example

EXAMPLE 1


New-ChartBarOptions -Type 'barStacked' -DataLabelsEnabled $true -DataLabelsOffsetX -6 -DataLabelsFontSize '12px' -DataLabelsColor 'black' -Patterned -Distributed
        

Creates options for a stacked bar chart with data labels enabled, offset of -6, font size '12px', black data labels, patterned colors, and distributed bars.

EXAMPLE 2


New-ChartBarOptions -Type 'bar' -DataLabelsEnabled $false -Gradient -Vertical
        

Creates options for a regular bar chart with data labels disabled, gradient colors, and vertical bars.

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.

Syntax

New-ChartBarOptions [-DataLabelsColor <String>] [-DataLabelsEnabled <Boolean>] [-DataLabelsFontSize <String>] [-DataLabelsOffsetX <Int32>] [-Distributed] [-Gradient] [-Patterned] [-Type <bar|barStacked|barStacked100Percent>] [-Vertical] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

DataLabelsColor String optionalposition: 4pipeline: False
The color of the data labels.
DataLabelsEnabled Boolean optionalposition: 1pipeline: False
Indicates whether data labels are enabled. Default is $true.
DataLabelsFontSize String optionalposition: 3pipeline: False
The font size of the data labels. Default is '12px'.
DataLabelsOffsetX Int32 optionalposition: 2pipeline: False
The horizontal offset of the data labels. Default is -6.
Distributed SwitchParameter optionalposition: namedpipeline: False
Indicates whether the bars are distributed.
Gradient SwitchParameter optionalposition: namedpipeline: Falsealiases: GradientColors
Indicates whether gradient colors are used.
Patterned SwitchParameter optionalposition: namedpipeline: Falsealiases: PatternedColors
Indicates whether patterned colors are used.
Type Object optionalposition: 0pipeline: Falsevalues: 3
The type of the bar chart. Accepted values are 'bar', 'barStacked', 'barStacked100Percent'. Default is 'bar'.
Possible values: bar, barStacked, barStacked100Percent
Vertical SwitchParameter optionalposition: namedpipeline: False
Indicates whether the bars are vertical.