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

Module PSWriteHTML

Creates a new Y-axis for a chart with customizable parameters.

Syntax

New-ChartAxisY [-Floating] [-ForceNiceScale] [[-LabelAlign] <left|center|right>] [[-LabelFontColor] <String[]>] [[-LabelFontFamily] <String>] [[-LabelFontSize] <Object>] [[-LabelFontWeight] <String>] [[-LabelMaxWidth] <Int32>] [[-LabelMinWidth] <Int32>] [-Logarithmic] [[-MaxValue] <Int32>] [[-MinValue] <Int32>] [-Opposite] [-Reversed] [[-SeriesName] <String>] [-Show] [-ShowAlways] [[-TitleColor] <String>] [[-TitleFontFamily] <String>] [[-TitleFontSize] <Int32>] [[-TitleFontWeight] <String>] [[-TitleOffsetX] <Int32>] [[-TitleOffsetY] <Int32>] [[-TitleRotate] <90|270>] [[-TitleText] <String>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

This function creates a new Y-axis for a chart with the provided parameters. It allows customization of the axis visibility, title, labels, range, style, and other options.

Examples

Authored help example

EXAMPLE 1

New-ChartAxisY -Show -TitleText 'Sales' -MinValue 0 -MaxValue 1000 -LabelAlign 'center'

Creates a new Y-axis with the title 'Sales', range from 0 to 1000, and center-aligned labels.

EXAMPLE 2

New-ChartAxisY -Show -ShowAlways -TitleText 'Temperature' -TitleColor 'red' -LabelAlign 'right'

Creates a new Y-axis with the title 'Temperature', always visible, red-colored title, and right-aligned labels.

Parameters

-Floating SwitchParameter optional
Indicates whether the Y-axis should be floating.
-ForceNiceScale SwitchParameter optional
Indicates whether the Y-axis should have a nice scale.
-LabelAlign String optionalposition: 12
The alignment of the Y-axis labels. Accepted values are 'left', 'center', or 'right'.
Possible values: left, center, right
-LabelFontColor String[] optionalposition: 16
The color of the Y-axis labels.
-LabelFontFamily String optionalposition: 14
The font family of the Y-axis labels.
-LabelFontSize Object optionalposition: 13
The font size of the Y-axis labels.
-LabelFontWeight String optionalposition: 15
The font weight of the Y-axis labels.
Possible values: normal, bold, bolder, lighter, 100, 200, 300, 400, 500, 600, 700, 800, 900
-LabelMaxWidth Int32 optionalposition: 11
The maximum width of the Y-axis labels.
-LabelMinWidth Int32 optionalposition: 10
The minimum width of the Y-axis labels.
-Logarithmic SwitchParameter optional
Indicates whether the Y-axis should have a logarithmic scale.
-MaxValue Int32 optionalposition: 9
The maximum value of the Y-axis.
-MinValue Int32 optionalposition: 8
The minimum value of the Y-axis.
-Opposite SwitchParameter optional
Indicates whether the Y-axis should be positioned on the opposite side.
-Reversed SwitchParameter optional
Indicates whether the Y-axis should be reversed.
-SeriesName String optionalposition: 17
The name of the series associated with the Y-axis.
-Show SwitchParameter optional
Indicates whether the Y-axis should be displayed.
-ShowAlways SwitchParameter optional
Indicates whether the Y-axis should always be visible.
-TitleColor String optionalposition: 5aliases: TitleStyleColor
The color of the Y-axis title.
-TitleFontFamily String optionalposition: 7aliases: TitleStyleFontFamily
The font family of the Y-axis title.
-TitleFontSize Int32 optionalposition: 6aliases: TitleStyleFontSize
The font size of the Y-axis title.
-TitleFontWeight String optionalposition: 4
The font weight of the Y-axis title.
Possible values: normal, bold, bolder, lighter, 100, 200, 300, 400, 500, 600, 700, 800, 900
-TitleOffsetX Int32 optionalposition: 2
The horizontal offset of the Y-axis title.
-TitleOffsetY Int32 optionalposition: 3
The vertical offset of the Y-axis title.
-TitleRotate String optionalposition: 1
The rotation angle of the Y-axis title. Accepted values are '90' or '270'.
Possible values: 90, 270
-TitleText String optionalposition: 0
The text to be displayed as the title of the Y-axis.

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.